A photovoltaic power generation power prediction method and system based on improved TPE-CatBoost

Through the improved TPE-CatBoost method and multi-arm gambling algorithm, the CatBoost model is optimized, combined with random forest and RFECV algorithm to screen meteorological characteristics, the problems of complexity and low prediction accuracy in the existing photovoltaic power prediction are solved, and the problem of ultra-parameter selection is low and the prediction accuracy is achieved. Efficient photovoltaic power prediction.

CN118944087BActive Publication Date: 2025-01-17STATE GRID HUBEI MARKETING SERVICE CENT (MEASUREMENT CENT) +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411425999.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-01-17
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

The existing photovoltaic power prediction methods are difficult to achieve accurate photovoltaic power prediction due to the numerous hyperparameters and complex selection of neural network algorithms.

Method used

The improved TPE-CatBoost method is adopted to optimize the hyperparameters of the CatBoost model through the multi-arm gambling machine algorithm, and combine random forests and RFECV algorithm to screen meteorological characteristics to build a high-precision photovoltaic power prediction model to improve prediction accuracy and reduce calculation complexity.

Benefits of technology

It improves the accuracy of photovoltaic power generation prediction, saves calculation time, overcomes the algorithm redundancy caused by huge data, and provides more accurate prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118944087B_ABST
    Figure CN118944087B_ABST
Patent Text Reader

Abstract

A photovoltaic power generation power prediction method and system based on improved TPE-CatBoost, the method first screens out a meteorological feature combination data set that minimizes the photovoltaic power generation power error, and based on the screened meteorological feature combination data set, constructs an improved TPE-CatBoost photovoltaic power generation power prediction model, and then obtains the predicted value of photovoltaic power generation by solving the improved TPE-CatBoost photovoltaic power generation power prediction model. The present invention not only finds the meteorological feature data set most relevant to photovoltaic power generation in the huge meteorological feature data, overcoming the algorithm redundancy phenomenon caused by the huge data, but also optimizes the CatBoost photovoltaic power generation power prediction model using the improved TPE algorithm, thereby improving the prediction accuracy of photovoltaic power generation, saving calculation time, reducing the complexity of calculation, and providing auxiliary support for predicting photovoltaic power generation in different environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of photovoltaic output prediction, and in particular relates to a photovoltaic power prediction method and system based on improved TPE-CatBoost. Background Art

[0002] Developing distributed energy is an important way to meet the growing demand for electricity. In 2017, the National Energy Administration clearly pointed out that by 2020, the total installed capacity of photovoltaic power generation will be 86.5GW, and distributed installed capacity will not be limited by scale. It is estimated that distributed photovoltaic power generation can reach 60 million kW. Photovoltaic power generation refers to the amount of electrical energy generated by photovoltaic panels per unit time. It is an important indicator for measuring the output power of photovoltaic power generation systems. The size of the power generation directly affects the actual power generation capacity and economic benefits of photovoltaic panels. When photovoltaic power stations are connected to the power grid, the photovoltaic power generation power will be affected by factors such as meteorological fluctuations, resulting in unstable output power, which is not conducive to the dispatching and management of power grid power. Therefore, accurate prediction of photovoltaic power generation is crucial for the dispatching and management of power.

[0003] The commonly used method for photovoltaic power generation prediction is to use a neural network model to predict the power generation in the future based on historical photovoltaic data. However, due to the large number of hyperparameters of the deep learning algorithm of the neural network itself and the randomness in the selection of hyperparameters, the computational complexity of the deep learning algorithm based on the neural network on such problems is quite high. Most machine learning algorithms are used in load forecasting. Algorithms such as SVR, GBDT, XgBoost, GBDT, and random forest are widely used in the industrial field, but they are also subject to the complexity of feature extraction methods and hyperparameter adjustment. The detection results show overfitting and low precision. At present, the hyperparameter optimization method for machine learning relies on hyperparameter methods such as grid search, random grid search, Halving grid search, and Bayesian (GP). However, these hyperparameter methods are unsatisfactory in running time, running efficiency, and hyperparameter selection. Therefore, a good hyperparameter optimization method and a machine learning algorithm with stronger learning ability are urgently needed to solve the problem of photovoltaic power generation prediction. Summary of the invention

[0004] The purpose of the present invention is to provide a photovoltaic power prediction method and system based on improved TPE-CatBoost in order to solve the above problems in the prior art.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] In a first aspect, the present invention proposes a photovoltaic power generation power prediction method based on improved TPE-CatBoost, comprising:

[0007] S1. Based on the meteorological feature combined data set, an improved TPE-CatBoost photovoltaic power generation prediction model is constructed;

[0008] S2. Solve the improved TPE-CatBoost photovoltaic power generation prediction model to obtain the predicted value of photovoltaic power generation.

[0009] The S1 includes:

[0010] S11, dividing the screened meteorological feature combination data set into a training set and a test set;

[0011] S12, using the training set data to train the CatBoost photovoltaic power generation prediction model;

[0012] S13, using the TPE algorithm improved by the multi-armed bandit algorithm to optimize the trained CatBoost photovoltaic power generation prediction model, to obtain an improved TPE-CatBoost photovoltaic power generation prediction model;

[0013] S14. Input the test set data into the improved TPE-CatBoost photovoltaic power generation prediction model, and judge the accuracy of the prediction model through the judgment index.

[0014] The S13 includes:

[0015] A. Determine the tuning parameters and parameter search space in the CatBoost photovoltaic power prediction model;

[0016] B. Randomly sample the CatBoost hyperparameters to be searched from the parameter search space, set each hyperparameter combination as an arm, and set the initial reward information as the objective function value;

[0017] C. Use the multi-armed bandit algorithm to perform preliminary screening and select the arms for sampling;

[0018] D. Based on the screening results of the multi-armed bandit algorithm, the TPE algorithm model is used for sampling, the objective function value of the CatBoost photovoltaic power generation prediction model composed of each sampling arm is calculated, and the CatBoost photovoltaic power generation prediction model with the highest prediction accuracy is selected as the optimal model;

[0019] E. Repeat steps B, C, and D until the termination condition is reached, compare the prediction accuracy of all selected optimal models, and use the optimal model with the highest prediction accuracy as the improved TPE-CatBoost photovoltaic power generation prediction model.

[0020] The method further comprises:

[0021] S0. Normalize the acquired measured comprehensive meteorological data and photovoltaic power generation data, and perform feature selection based on the normalized data set to screen out the meteorological feature combination data set that minimizes the photovoltaic power generation error.

[0022] The S0 includes:

[0023] S01. Rank the importance of each meteorological feature in the normalized new data set;

[0024] S02, delete the feature with the lowest importance rating in the sorting table, and update the current meteorological feature combination;

[0025] S03, cross-validating and evaluating the updated meteorological feature combination to obtain an evaluation score of the corresponding meteorological feature combination;

[0026] S04, return to step S01, repeat the above operation flow until the evaluation of all meteorological feature combinations is completed, and the meteorological feature combination data set with the highest evaluation score is selected.

[0027] In a second aspect, the present invention proposes a photovoltaic power prediction system based on improved TPE-CatBoost, including a model building module and a model solving module;

[0028] The model building module is used to build an improved TPE-CatBoost photovoltaic power generation prediction model based on a meteorological feature combined data set;

[0029] The model solving module is used to solve the improved TPE-CatBoost photovoltaic power generation prediction model to obtain the predicted value of photovoltaic power generation.

[0030] The model building module includes a data partitioning unit, a model training unit, a model optimization unit, and an accuracy judgment unit;

[0031] The data division unit is used to divide the screened meteorological feature combination data set into a training set and a test set;

[0032] The model training unit is used to train the CatBoost photovoltaic power generation prediction model using the training set data;

[0033] The model optimization unit is used to optimize the trained CatBoost photovoltaic power generation prediction model using the TPE algorithm improved by the multi-armed bandit algorithm to obtain an improved TPE-CatBoost photovoltaic power generation prediction model;

[0034] The accuracy judgment unit is used to input the test set data into the improved TPE-CatBoost photovoltaic power generation prediction model, and judge the accuracy of the prediction model through the judgment index.

[0035] The model optimization unit is used to:

[0036] A. Determine the tuning parameters and parameter search space in the CatBoost photovoltaic power prediction model;

[0037] B. Randomly sample the CatBoost hyperparameters to be searched from the parameter search space, set each hyperparameter combination as an arm, and set the initial reward information as the objective function value;

[0038] C. Use the multi-armed bandit algorithm to perform preliminary screening and select the arms for sampling;

[0039] D. Based on the screening results of the multi-armed bandit algorithm, the TPE algorithm model is used for sampling, the objective function value of the CatBoost photovoltaic power generation prediction model composed of each sampling arm is calculated, and the CatBoost photovoltaic power generation prediction model with the highest prediction accuracy is selected as the optimal model;

[0040] E. Repeat steps B, C, and D until the termination condition is reached, compare the prediction accuracy of all selected optimal models, and use the optimal model with the highest prediction accuracy as the improved TPE-CatBoost photovoltaic power generation prediction model.

[0041] The system also includes a feature screening module;

[0042] The data screening module is used to normalize the acquired measured comprehensive meteorological data and photovoltaic power generation data, and perform feature selection based on the normalized data set to screen out the meteorological feature combination data set that minimizes the photovoltaic power generation error.

[0043] The feature screening module includes a feature sorting unit, a feature updating unit, a feature evaluation unit, and a repeated screening unit;

[0044] The feature ranking unit is used to rank the importance of each meteorological feature in the normalized new data set;

[0045] The feature updating unit is used to delete the feature with the lowest importance rating in the ranking table and update the current meteorological feature combination;

[0046] The feature evaluation unit is used to cross-validate and evaluate the updated meteorological feature combination to obtain an evaluation score of the corresponding meteorological feature combination;

[0047] The repeated screening unit is used to return to the feature sorting unit and repeat the above operation process until the evaluation of all meteorological feature combinations is completed, and the meteorological feature combination data set with the highest evaluation score is selected.

[0048] Compared with the prior art, the present invention has the following beneficial effects:

[0049] 1. The present invention proposes a photovoltaic power prediction method and system based on improved TPE-CatBoost. The method constructs an improved TPE-CatBoost photovoltaic power prediction model based on a meteorological feature combined data set, and then obtains the predicted value of photovoltaic power by solving the improved TPE-CatBoost photovoltaic power prediction model. The method optimizes the hyperparameters in the CatBoost photovoltaic power prediction model by improving the TPE algorithm, improves the prediction accuracy of photovoltaic power, saves calculation time, reduces the complexity of calculation, and provides auxiliary support for predicting photovoltaic power in different environments.

[0050] 2. The present invention proposes a photovoltaic power prediction method and system based on improved TPE-CatBoost, normalizes the acquired measured comprehensive meteorological data and photovoltaic power data, and screens out the meteorological feature combination data set that minimizes the photovoltaic power error based on the normalized data set. This method extracts feature data sets through meteorological feature screening, finds the meteorological feature data set that is most relevant to photovoltaic power in the huge meteorological feature data, and overcomes the algorithm redundancy caused by the huge data. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 The figure is an overall flow chart of the method of the present invention.

[0052] Figure 2 The structure diagram of the system of the present invention is shown in FIG. DETAILED DESCRIPTION

[0053] The present invention is further described in detail below in conjunction with specific implementations and drawings.

[0054] The present invention proposes a photovoltaic power prediction method and system based on improved TPE-CatBoost, obtains 16 kinds of meteorological data including wind speed, humidity, longitude, temperature, latitude, cloud height, air pressure, season and the like and photovoltaic power data, normalizes all the data, performs feature selection based on the normalized data set, uses a random forest algorithm and an RFECV combined algorithm to screen out a meteorological feature combination data set that minimizes the photovoltaic power error, divides the screened meteorological feature combination data set into a training set and a test set at a ratio of 7:3, inputs the training set data into a CatBoost photovoltaic power prediction model to train the model, uses the improved TPE algorithm to optimize the hyperparameters of the trained CatBoost photovoltaic power prediction model, and obtains a photovoltaic power prediction model with better prediction accuracy.

[0055] Embodiment 1:

[0056] This embodiment takes photovoltaic power stations in 12 regions of the United States as research objects and predicts their photovoltaic power generation power.

[0057] like Figure 1 As shown, a photovoltaic power generation power prediction method based on improved TPE-CatBoost is performed in the following steps:

[0058] 1. Obtain 14 months of public comprehensive meteorological characteristic data of photovoltaic power stations in 12 regions of the United States, including 16 meteorological characteristic data such as wind speed, humidity, longitude, temperature, latitude, cloud height, air pressure, season, and photovoltaic power generation data, and use the following formula to normalize all data:

[0059] ;

[0060] In the above formula, It is the result of normalization of comprehensive meteorological characteristics and photovoltaic power generation data. For each column of data named after each meteorological characteristic data and target variable data, , They are the minimum and maximum values ​​of each column of the original data respectively.

[0061] 2. Based on the normalized data set, feature selection is performed, and the meteorological feature combination data set that minimizes the photovoltaic power generation error is screened out using the random forest algorithm and the RFECV combination algorithm;

[0062] The RFECV algorithm includes the RFE feature recursive elimination stage and the CV cross-validation stage. RFE is a method for feature screening based on model training results. It continuously eliminates useless features through recursion. Its essence is a greedy algorithm for feature sorting. It uses the elimination method RFECV formed by adding cross-validation on the basis of the classic recursive elimination method RFE, which has better credibility.

[0063] The normalized data set is used to select features using a combination of random forest and RFECV. The meteorological feature combination with the highest cross-validation score is selected. The random forest is used as a feature effect evaluator. The score of each meteorological feature in the current data set is calculated on the given evaluator to evaluate the importance of each meteorological feature subset. The RFECV algorithm is used to remove the feature with the smallest importance calculation result. This is repeated until the last feature is reached. The meteorological feature combination with the highest score is selected to obtain the meteorological feature subset with the highest score. Different feature combinations are performed based on the features selected by the feature screening. The feature combination with the best performance is brought into the subsequent integrated algorithm for subsequent prediction. The specific steps include:

[0064] The normalized data set is used as a new data set. The RFE algorithm is used to sort the importance of each meteorological feature in the new data set, and one or more features with the lowest importance rating in the sorting table are deleted to update the current meteorological feature combination. This cycle is repeated to obtain n sets of feature sets until no features can be deleted.

[0065] The CV algorithm is used to cross-validate the updated meteorological feature combination. The random forest is used as the evaluator. During the cross-validation process, the meteorological feature combination set is evaluated and scored to determine the feature set with the highest average score. The feature combination is screened by comparing the evaluation indicators to obtain the evaluation score of the corresponding meteorological feature combination.

[0066] Repeat the above operation process until the evaluation of all meteorological feature combinations is completed, and select the meteorological feature combination data set with the highest score under the random forest algorithm evaluation as shown in Table 1;

[0067] Table 1. Ranking of meteorological characteristics by importance score

[0068] .

[0069] 3. The optimal meteorological feature combination selected is temperature, humidity, latitude, longitude, and wind speed. The meteorological feature combination data set is divided into a training set and a test set in a ratio of 7:3. The model is trained by inputting the training set data into the CatBoost photovoltaic power generation prediction model;

[0070] CatBoost is an improved ensemble learning model based on GBDT. In order to suppress model overfitting, Symmetric fully mirrored binary tree is used as the base learner. In data iteration, the same segmentation rule is applied to the same layer of the tree, and the left and right subtrees are completely symmetrical and balanced. During prediction, the evaluation results are calculated through binary features, and an independent ensemble model is built for each sample. The model is trained by all sample data sets except this sample. The CatBoost algorithm uses each model to estimate the gradient of the loss function on all data sets to obtain an unbiased estimate of the gradient, overcome the prediction offset problem, and improve the fitting accuracy of photovoltaic power data. The model shows good adaptability. The important parameters after optimization are iterations, learning_rate, and depth are 376, 0.15, and 13 respectively.

[0071] The four key steps in CatBoost are:

[0072] 1. Sort the training set samples and use the following formula to calculate the gradient vector G of each sample point in the root node of each tree;

[0073] ;

[0074] In the above formula, For the Sample point The gradient vector of the iteration, is the loss function, For the The true value of the sample points, For the The sample point is The predicted value at the iteration;

[0075] Second, split the root node according to the screened meteorological feature combination data set to obtain the corresponding split result, and use the following formula to calculate the leaf increment of each sample:

[0076] ;

[0077] In the above formula, For the The leaf increment of samples, For the The gradient vector of each sample point;

[0078] 3. Based on cosine similarity, we define the node splitting loss under various meteorological features to evaluate the quality of the split, select the smallest feature for tree splitting, and maximize the similarity between the gradient vector of the child node and the parent node. The cosine similarity formula is:

[0079] ;

[0080] In the above formula, is the cosine similarity, The sample weight randomly assigned to each sample;

[0081] 4. Repeat steps 2 and 3 until the tree is split.

[0082] 4. Optimize the hyperparameters of the trained CatBoost photovoltaic power generation prediction model through the improved TPE algorithm to obtain the improved TPE-CatBoost photovoltaic power generation prediction model;

[0083] TPE optimization refers to the use of the TPE algorithm to optimize hyperparameters during machine learning training. Generally, the machine learning model with default hyperparameters is called the baseline model. The basic idea of ​​the TPE algorithm is to transform the hyperparameter optimization problem into an optimization problem of a probability model, and to optimize it by constructing two independent probability density functions.

[0084] The goal of the TPE algorithm is to find a better parameter combination by maximizing the following ratio:

[0085] ;

[0086] In the above formula, is the optimized parameter, is the parameter to be optimized in the algorithm, To describe the probability distribution of parameter sets with smaller objective function values, i.e., better performance, To describe the probability distribution of parameter sets with larger objective function values, i.e., poorer performance;

[0087] The improved TPE algorithm of this embodiment combines the TPE algorithm with the multi-armed bandit algorithm, and has obvious advantages in stability and computing time compared with the commonly used hyperparameter optimization algorithm, and can reduce the time of parameter optimization without losing accuracy, specifically including:

[0088] A. Initialize the CatBoost photovoltaic power generation prediction model, determine the tuning parameters and parameter search space in the CatBoost photovoltaic power generation prediction model, the tuning parameters include iterations, learning_rate, random_seed, subsample, depth, best_model_min_trees, min_data_in_leaf, l2_leaf_reg, and the search spaces are [50, 500], [0.01, 0.1], 123, [0.1, 1], [1, 30], [0, inf], [100, 1000], [0, inf] respectively;

[0089] B. Randomly sample the CatBoost hyperparameters to be searched from the parameter search space, evaluate their objective function values, that is, minimize the RMSE and MAE of the actual value and the predicted value, set each hyperparameter combination in the CatBoost photovoltaic power generation prediction model as an arm, and set the initial reward information as the objective function value of the photovoltaic power generation prediction model;

[0090] C. Use the multi-armed bandit algorithm to perform preliminary screening and select the arms for sampling. The specific selection strategies include:

[0091] C1. Initialize each arm Average Reward is 0 or a random value, each arm Number of times selected 0, the total number of selections is 0;

[0092] C2. Use the following formula to select the arm with the highest average reward:

[0093] ;

[0094] In the above formula, To adjust the parameters, The total number of times currently selected;

[0095] C3. Update the average reward of the selected arm using the following formula:

[0096] ;

[0097] In the above formula, The reward for the selected arm;

[0098] C4. Update selection times , return to step B2 and repeat the above operation until the maximum number of cycles is reached;

[0099] C5. Evaluate the average reward of all arms and select the best arm as the arm for sampling;

[0100] D. Based on the screening results of the multi-armed bandit algorithm, the TPE algorithm model is used for sampling, the objective function value of the CatBoost photovoltaic power generation prediction model composed of each sampling arm is calculated, and the CatBoost photovoltaic power generation prediction model with the highest prediction accuracy is selected as the optimal model;

[0101] E. Repeat steps B, C, and D until the termination condition, i.e., the maximum number of iterations, is reached. The prediction accuracy of all selected optimal models is compared, and the optimal model with the highest prediction accuracy is used as the improved TPE-CatBoost photovoltaic power prediction model.

[0102] Using the actual data set collected, the time for hyperparameter optimization was calculated using the TPE algorithm and the improved TPE algorithm, as shown in Table 2.

[0103] Table 2. Time comparison of hyperparameter optimization

[0104] .

[0105] 5. Input the test set data into the improved TPE-CatBoost photovoltaic power prediction model to obtain the output value, and judge the error between the predicted value and the actual value through the judgment index. The smaller the judgment index, the better the prediction accuracy.

[0106] The range of RMSE is between 20 and 30, and the range of MAE is between 13 and 20. The judgment index of this method is superior to the existing research and has reached the accuracy requirement;

[0107] The judgment index is calculated using the following formula:

[0108] ;

[0109] ;

[0110] In the above formula, is the root mean square error index between the measured value and the predicted value, is the total number of test set data, For the The measured photovoltaic power generation value, For the The predicted photovoltaic discharge power value, It is the mean absolute error indicator between the measured value and the predicted value.

[0111] 6. By solving the improved TPE-CatBoost photovoltaic power prediction model, the predicted value of photovoltaic power generation is obtained.

[0112] The selected optimal meteorological feature combination is introduced into the optimized TPE-CatBoost power generation prediction model and the unoptimized CatBoost power generation prediction model, and the performance of the power generation prediction model before and after optimization is compared by using the discriminant indicators RMSE and MAE, as shown in Table 3;

[0113] Table 3 Comparison of discrimination indicators before and after optimization

[0114] ;

[0115] It can be seen from Table 3 that the predicted value obtained by the optimized and improved TPE-CatBoost power generation prediction model is more accurate than the predicted value obtained by the unoptimized CatBoost power generation prediction model, and the prediction performance of the model is better.

[0116] Embodiment 2:

[0117] like Figure 2 As shown, a photovoltaic power generation prediction system based on improved TPE-CatBoost includes a feature screening module, a model building module, and a model solving module;

[0118] The data screening module is used to normalize the acquired measured comprehensive meteorological data and photovoltaic power generation data, and perform feature selection based on the normalized data set to screen out the meteorological feature combination data set that minimizes the photovoltaic power generation error;

[0119] The model building module is used to build an improved TPE-CatBoost photovoltaic power generation prediction model based on a meteorological feature combined data set;

[0120] The model solving module is used to solve the improved TPE-CatBoost photovoltaic power generation prediction model to obtain the predicted value of photovoltaic power generation.

[0121] The feature screening module includes a feature sorting unit, a feature updating unit, a feature evaluation unit, and a repeated screening unit;

[0122] The feature ranking unit is used to rank the importance of each meteorological feature in the normalized new data set;

[0123] The feature updating unit is used to delete the feature with the lowest importance rating in the ranking table and update the current meteorological feature combination;

[0124] The feature evaluation unit is used to cross-validate and evaluate the updated meteorological feature combination to obtain an evaluation score of the corresponding meteorological feature combination;

[0125] The repeated screening unit is used to return to the feature sorting unit and repeat the above operation process until the evaluation of all meteorological feature combinations is completed, and the meteorological feature combination data set with the highest evaluation score is selected.

[0126] The model building module includes a data partitioning unit, a model training unit, a model optimization unit, and an accuracy judgment unit;

[0127] The data division unit is used to divide the screened meteorological feature combination data set into a training set and a test set;

[0128] The model training unit is used to train the CatBoost photovoltaic power generation prediction model using the training set data;

[0129] The model optimization unit is used to optimize the trained CatBoost photovoltaic power generation prediction model using the TPE algorithm improved by the multi-armed bandit algorithm to obtain an improved TPE-CatBoost photovoltaic power generation prediction model;

[0130] The accuracy judgment unit is used to input the test set data into the improved TPE-CatBoost photovoltaic power generation prediction model, and judge the accuracy of the prediction model through the judgment index.

[0131] The model optimization unit is used to:

[0132] A. Initialize the CatBoost photovoltaic power prediction model, determine the tuning parameters and parameter search space in the CatBoost photovoltaic power prediction model, the tuning parameters include iterations, learning_rate, random_seed, subsample, depth, best_model_min_trees, min_data_in_leaf, l2_leaf_reg, and the search spaces are [50, 500], [0.01, 0.1], 123, [0.1, 1], [1, 30], [0, inf], [100, 1000], [0, inf] respectively;

[0133] B. Randomly sample the CatBoost hyperparameters to be searched from the parameter search space, evaluate their objective function values, that is, minimize the RMSE and MAE of the actual value and the predicted value, set each hyperparameter combination in the CatBoost photovoltaic power generation prediction model as an arm, and set the initial reward information as the objective function value of the photovoltaic power generation prediction model;

[0134] C. Use the multi-armed bandit algorithm to perform preliminary screening and select the arms for sampling. The specific selection strategies include:

[0135] C1. Initialize each arm Average Reward is 0 or a random value, each arm Number of times selected 0, the total number of selections is 0;

[0136] C2. Use the following formula to select the arm with the highest average reward:

[0137] ;

[0138] In the above formula, To adjust the parameters, The total number of times currently selected;

[0139] C3. Update the average reward of the selected arm using the following formula:

[0140] ;

[0141] In the above formula, The reward for the selected arm;

[0142] C4. Update selection times , return to step B2 and repeat the above operation until the maximum number of cycles is reached;

[0143] C5. Evaluate the average reward of all arms and select the best arm as the arm for sampling;

[0144] D. Based on the screening results of the multi-armed bandit algorithm, the TPE algorithm model is used for sampling, the objective function value of the CatBoost photovoltaic power generation prediction model composed of each sampling arm is calculated, and the CatBoost photovoltaic power generation prediction model with the highest prediction accuracy is selected as the optimal model;

[0145] E. Repeat steps B, C, and D until the termination condition, i.e., the maximum number of iterations, is reached. The prediction accuracy of all selected optimal models is compared, and the optimal model with the highest prediction accuracy is used as the improved TPE-CatBoost photovoltaic power prediction model.

Claims

1. A photovoltaic power prediction method based on improved TPE-CatBoost, characterized in that: The method comprises: S1. Based on the meteorological feature combined data set, an improved TPE-CatBoost photovoltaic power generation prediction model is constructed, including: S11, dividing the screened meteorological feature combination data set into a training set and a test set; S12, using the training set data to train the CatBoost photovoltaic power generation prediction model; S13, using the TPE algorithm improved by the multi-armed bandit algorithm to optimize the trained CatBoost photovoltaic power generation prediction model, the specific steps of obtaining the improved TPE-CatBoost photovoltaic power generation prediction model include: A. Determine the tuning parameters and parameter search space in the CatBoost photovoltaic power prediction model; B. Randomly sample the CatBoost hyperparameters to be searched from the parameter search space, set each hyperparameter combination as an arm, and set the initial reward information as the objective function value; C. Use the multi-armed bandit algorithm to perform preliminary screening and select the arms for sampling; D. Based on the screening results of the multi-armed bandit algorithm, the TPE algorithm model is used for sampling, the objective function value of the CatBoost photovoltaic power generation prediction model composed of each sampling arm is calculated, and the CatBoost photovoltaic power generation prediction model with the highest prediction accuracy is selected as the optimal model; E. Repeat steps B, C, and D until the termination condition is reached, compare the prediction accuracy of all the selected optimal models, and use the optimal model with the highest prediction accuracy as the improved TPE-CatBoost photovoltaic power prediction model; S14, input the test set data into the improved TPE-CatBoost photovoltaic power generation prediction model, and judge the accuracy of the prediction model through the judgment index; S2. Solve the improved TPE-CatBoost photovoltaic power generation prediction model to obtain the predicted value of photovoltaic power generation.

2. A photovoltaic power prediction method based on improved TPE-CatBoost according to claim 1, characterized in that: The method further comprises: S0. Normalize the acquired measured comprehensive meteorological data and photovoltaic power generation data, and perform feature selection based on the normalized data set to screen out the meteorological feature combination data set that minimizes the photovoltaic power generation error.

3. A photovoltaic power generation prediction method based on improved TPE-CatBoost according to claim 2, characterized in that: The S0 includes: S01. Rank the importance of each meteorological feature in the normalized new data set; S02, delete the feature with the lowest importance rating in the sorting table, and update the current meteorological feature combination; S03, cross-validating and evaluating the updated meteorological feature combination to obtain an evaluation score of the corresponding meteorological feature combination; S04, return to step S01, repeat the above operation flow until the evaluation of all meteorological feature combinations is completed, and the meteorological feature combination data set with the highest evaluation score is selected.

4. A photovoltaic power generation prediction system based on improved TPE-CatBoost, characterized in that: The system includes a model building module and a model solving module; The model building module is used to build an improved TPE-CatBoost photovoltaic power generation prediction model based on a meteorological feature combined data set, including a data partitioning unit, a model training unit, a model optimization unit, and an accuracy judgment unit; The data division unit is used to divide the screened meteorological feature combination data set into a training set and a test set; The model training unit is used to train the CatBoost photovoltaic power generation prediction model using the training set data; The model optimization unit is used to optimize the trained CatBoost photovoltaic power generation prediction model using the TPE algorithm improved by the multi-armed bandit algorithm to obtain an improved TPE-CatBoost photovoltaic power generation prediction model, and the specific steps include: A. Determine the tuning parameters and parameter search space in the CatBoost photovoltaic power prediction model; B. Randomly sample the CatBoost hyperparameters to be searched from the parameter search space, set each hyperparameter combination as an arm, and set the initial reward information as the objective function value; C. Use the multi-armed bandit algorithm to perform preliminary screening and select the arms for sampling; D. Based on the screening results of the multi-armed bandit algorithm, the TPE algorithm model is used for sampling, the objective function value of the CatBoost photovoltaic power generation prediction model composed of each sampling arm is calculated, and the CatBoost photovoltaic power generation prediction model with the highest prediction accuracy is selected as the optimal model; E. Repeat steps B, C, and D until the termination condition is reached, compare the prediction accuracy of all the selected optimal models, and use the optimal model with the highest prediction accuracy as the improved TPE-CatBoost photovoltaic power generation prediction model; The accuracy judgment unit is used to input the test set data into the improved TPE-CatBoost photovoltaic power generation prediction model, and judge the accuracy of the prediction model through the judgment index; The model solving module is used to solve the improved TPE-CatBoost photovoltaic power generation prediction model to obtain the predicted value of photovoltaic power generation.

5. A photovoltaic power generation prediction system based on improved TPE-CatBoost according to claim 4, characterized in that: The system also includes a feature screening module; The data screening module is used to normalize the acquired measured comprehensive meteorological data and photovoltaic power generation data, and perform feature selection based on the normalized data set to screen out the meteorological feature combination data set that minimizes the photovoltaic power generation error.

6. A photovoltaic power generation prediction system based on improved TPE-CatBoost according to claim 5, characterized in that: The feature screening module includes a feature sorting unit, a feature updating unit, a feature evaluation unit, and a repeated screening unit; The feature ranking unit is used to rank the importance of each meteorological feature in the normalized new data set; The feature updating unit is used to delete the feature with the lowest importance rating in the ranking table and update the current meteorological feature combination; The feature evaluation unit is used to cross-validate and evaluate the updated meteorological feature combination to obtain an evaluation score of the corresponding meteorological feature combination; The repeated screening unit is used to return to the feature sorting unit and repeat the above operation process until the evaluation of all meteorological feature combinations is completed, and the meteorological feature combination data set with the highest evaluation score is selected.

Citation Information

Patent Citations

  • Optimized cascade-based distributed photovoltaic power prediction method and system

    CN117494888A

  • KR20240118244A