CART-integrated Adaboost photovoltaic power generation power prediction method, readable storage medium and equipment
Through the Adaboost photovoltaic power prediction method integrated CART, the integrated model is constructed using meteorological data, which solves the accuracy and speed problems of photovoltaic power prediction in the existing technology, and achieves efficient prediction results, supporting grid scheduling and improving energy utilization efficiency.
Patent Information
- Application Number
- CN202411829030.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-05-13
AI Technical Summary
The existing photovoltaic power prediction methods are difficult to achieve accurate and fast predictions due to data volatility and randomness, and complex models are prone to overfitting.
Adaboost photovoltaic power prediction method with integrated CART is adopted to collect and clean photovoltaic power generation historical data, use Spearman's rank correlation coefficient to determine key parameters, build an Adaboost model of integrated CART, and form a weighted combination model of multiple basis learners through iterative training and weighting combination.
The rapid and accurate prediction of photovoltaic power generation is achieved, which significantly improves the accuracy of prediction, reduces the grid scheduling pressure, and improves the energy utilization efficiency of the photovoltaic system.
Smart Images

Figure CN119990387A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation prediction, and in particular to an Adaboost photovoltaic power generation prediction method integrated with CART, and a readable storage medium and device. Background Art
[0002] Photovoltaic power generation, as a renewable energy technology, has been widely used in China due to its significant advantages such as high efficiency, low cost and sustainability. However, the output of photovoltaic power generation is significantly affected by meteorological conditions and has a high degree of volatility and randomness, which poses a major challenge to the dispatching and stable operation of the power grid. Therefore, accurate prediction of photovoltaic power generation is of great significance to reducing the pressure of power grid dispatching and improving the energy utilization efficiency of photovoltaic systems.
[0003] With the rapid development of artificial intelligence technology, a variety of machine learning and deep learning models have been introduced into photovoltaic power prediction. However, in the existing prediction methods based on these technologies, due to the volatility of the data itself, simple models often fail to meet performance expectations, while complex models are prone to fall into local optimality and overfitting. In view of this, there is an urgent need to develop a high-performance prediction model to achieve fast and accurate prediction of photovoltaic power. Summary of the invention
[0004] In order to overcome the shortcomings of current photovoltaic power prediction methods, the main purpose of the present invention is to provide an Adaboost photovoltaic power prediction method and a readable storage medium and device integrated with CART, so as to realize fast and accurate prediction of photovoltaic power based on meteorological data.
[0005] The present invention adopts the following technical solution:
[0006] A CART-integrated Adaboost photovoltaic power generation prediction method comprises the following steps:
[0007] Step 1: Collect historical data of photovoltaic power generation;
[0008] Step 2: Obtain valid data through data cleaning;
[0009] Step 3: Use the Spearman rank correlation coefficient to determine the key parameters that affect the power generation;
[0010] Step 4: Build and divide the data set;
[0011] Step 5: Construct an Adaboost photovoltaic power prediction model integrated with CART;
[0012] Step 6: Test and evaluate the model;
[0013] Step 7: Use the model to predict photovoltaic power generation.
[0014] Specifically, in step 1, the photovoltaic power generation historical data includes photovoltaic power generation power and meteorological data.
[0015] Specifically, the meteorological data includes air pressure, atmospheric temperature, humidity, wind speed at 10 m from the wind tower, wind direction at 10 m from the wind tower, total radiation, direct radiation, and scattered radiation.
[0016] Specifically, in step 2, the data cleaning is performed by manual screening.
[0017] Specifically, in step 5, CART (Classification and Regression Tree) is used as the base learner of the AdaBoost model, sample weights are updated through iterative training, and the final model is a weighted combination of multiple base learners.
[0018] Specifically, in step 6, the test set is input into the Adaboost photovoltaic power prediction model integrated with CART and other machine learning models respectively. The prediction performance of the Adaboost model integrated with CART is evaluated through the test results of each model.
[0019] Specifically, in step 7, the meteorological data acquired in real time is input into the Adaboost model integrated with CART to obtain the prediction result of photovoltaic power generation.
[0020] A computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the above method.
[0021] A computer device comprises a memory, a processor and a program stored and executable on the memory, wherein the program implements the steps of the above method when executed by the processor.
[0022] The beneficial effects of the present invention are: the rapid prediction of photovoltaic power generation is achieved through meteorological data such as atmospheric temperature, radiation intensity and wind speed, and the prediction accuracy is significantly improved, overcoming the impact of data volatility and randomness on the performance of the prediction model. It provides a powerful decision support tool for power grid operators and photovoltaic power station managers, reduces the pressure of power grid dispatching and improves the energy utilization efficiency of photovoltaic systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flow chart of the Adaboost photovoltaic power prediction method integrating CART of the present invention.
[0024] Figure 2It is a schematic diagram of feature correlation analysis involved in an embodiment of the present invention.
[0025] Figure 3 It is a schematic diagram of the training and evaluation process of the Adaboost model integrated with CART involved in an embodiment of the present invention.
[0026] Figure 4 Schematic diagram of prediction performance of different models involved in the embodiments of the present invention.
[0027] Figure 5 It is a real prediction result of an Adaboost photovoltaic power generation prediction model integrated with CART involved in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to make those of ordinary skill in the art better understand the technical solutions of the present application, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0029] like Figure 1 As shown, the Adaboost photovoltaic power generation prediction method integrated with CART has the following steps:
[0030] Step 1: Collect historical data of photovoltaic power generation, including photovoltaic power generation and corresponding meteorological data, where the meteorological data includes air pressure, atmospheric temperature, humidity, total radiation, direct radiation, scattered radiation, wind speed at 10m from the wind tower, and wind direction at 10m from the wind tower. In this embodiment, a total of 35,040 data items were collected for the entire year of 2019 in a certain area.
[0031] Step 2: Get valid data through data cleaning. Since photovoltaics do not generate electricity at night, there is data with zero power generation. In order to ensure the accuracy and operation speed of the model, the original data is manually screened. In this embodiment, only the data from 6:00 to 18:00 every day is retained for analysis. After screening, a total of 17,250 valid data are obtained.
[0032] Step 3: Use the Spearman rank correlation coefficient to determine the main meteorological parameters that affect the power generation. In this embodiment, the Spearman rank correlation coefficient of each meteorological parameter is obtained by Spearman rank correlation analysis, such as Figure 2As shown, the Spearman correlation coefficients of air pressure, atmospheric temperature, humidity, total radiation, direct radiation, scattered radiation, wind speed at 10m of the wind tower, and wind direction at 10m of the wind tower are 0.518, 0.684, 0.605, 0.827, 0.794, 0.733, 0.128, and 0.205, respectively. In this embodiment, the meteorological parameters with a Spearman rank correlation coefficient greater than 0.5 are used as the main meteorological parameters affecting the power generation. Therefore, air pressure, atmospheric temperature, humidity, total radiation, direct radiation, and scattered radiation are determined to be the main meteorological parameters affecting the power generation. These parameters are then selected as the feature inputs of the prediction model.
[0033] Step 4: Build and divide the data set. After determining the input of the model, it is necessary to build the data set required by the model. In this embodiment, the input parameters of the model are six parameters: air pressure, atmospheric temperature, humidity, total radiation, direct radiation, and scattered radiation, and the output is photovoltaic power generation. The data set is divided into a training set and a test set in a ratio of 8:2. After the division, the training set is 13,800 data and the test set is 3,450 data.
[0034] Step 5: Build an Adaboost photovoltaic power prediction model integrated with CART. After the data set is built, start training and testing the Adaboost photovoltaic power prediction model integrated with CART. The training and evaluation process of the model is as follows: Figure 3 As shown. After the training sample is input into the model, for each sample i, its weight w is initialized i = 1 / N, where N is the total number of training samples. This indicates that all samples are equally important at the beginning. Then for each round of training t, you need to first calculate the weight of the current sample based on w i To train a CART model (base learner), we get the classifier h t (x). Then calculate the current classification error ε of the model t , whose expression is:
[0035]
[0036] Where 1(·) is the indicator function, y i is the true output. After the error calculation, the weight α of the classifier is calculated according to the error rate t , the expression is:
[0037]
[0038] Then update the weight of each sample and normalize all sample weights so that their sum is 1. When the number of iterations exceeds the maximum number of iterations T, the model training ends, and the final model H(x) is represented as a weighted combination of multiple base learners, expressed as:
[0039]
[0040] After the model training is completed, the test sample is input into the trained model, and a weighted vote is performed based on the calculation results and weights of each base learner, and then the prediction results of each test sample are output.
[0041] In this embodiment, during model training, 5-fold cross validation is added to evaluate the model. The method divides the training set into 5 mutually exclusive subsets of similar size, and then performs 5 training and validation cycles. In each cycle, one subset (20%) is used for model validation, and the remaining 4 subsets (80%) are used for model training. The model is evaluated using the average performance of 5 trainings to ensure the reliability of the test results. In addition, a hyperparameter space is established, including the number of iterations of the model, the number of base learners, the learning rate, the maximum depth of CART, the minimum number of samples required for internal node partitioning, and the minimum number of samples of leaf nodes. Six hyperparameters. Then, with accuracy as the evaluation index, the GridSearchCV function is used to perform a grid search on the hyperparameter space to select the optimal hyperparameter combination.
[0042] Step 6: Input the test set into the Adaboost photovoltaic power prediction model of the integrated CART and other machine learning models respectively. The prediction performance of the Adaboost model of the integrated CART is evaluated by the test results of each model. In this embodiment, the regression tree model and the LightGbm model are selected as comparison models. During the training of these two models, 5-fold cross validation was also used to evaluate the models. A hyperparameter space is established for each model. The hyperparameter space of the regression tree model includes four parameters: tree depth, minimum sample split number, minimum sample node number, and maximum leaf node number. The hyperparameter space of the LightGbm model includes four parameters: the number of trees, maximum depth, learning rate, and regularization parameter. After the hyperparameter space is established, the accuracy is used as the evaluation index, and the GridSearchCV function is used to perform a grid search on the hyperparameter space of each model to obtain the optimal hyperparameter combination.
[0043] After the three models are trained, the performance of each model is verified using the test set. In this embodiment, the mean absolute error (MAE) and the mean absolute percentage error (MAPE) are used as evaluation indicators of the model, where MAE represents the mean absolute error between the predicted value and the actual observed value, and its expression is:
[0044]
[0045] In the formula, y represents the true value, y *Represents the predicted value, n represents the number of values, and the smaller the MAE value is, the higher the accuracy of the prediction model is.
[0046] MAPE represents the average percentage of the prediction error of each observation. The smaller the value of MAPE, the higher the accuracy of the prediction model. Its expression is:
[0047]
[0048] The evaluation results of the three models are as follows: Figure 4 By comparison, it is found that the Adaboost photovoltaic power prediction model integrated with CART has a MAE of 1.2 and a MAPE of 5.05%, which are much smaller than the other two models, indicating that the model has excellent performance and is suitable for photovoltaic power prediction.
[0049] Step 7: Use the Adaboost photovoltaic power prediction model integrated with CART to predict photovoltaic power generation. In this embodiment, the model is verified using data from a certain region in January 2020. The verification results are as follows: Figure 5 As shown, it can be seen that the prediction effect of the model is excellent, with a MAE of 0.52, indicating that the method proposed in this application has extremely high accuracy and practicality.
[0050] A computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the above method.
[0051] A computer device comprises a memory, a processor and a program stored and executable on the memory, wherein the program implements the steps of the above method when executed by the processor.
[0052] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When the use is implemented in whole or in part in the form of a computer program product, the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.
[0053] Unless otherwise stated, any technical solution disclosed in the present invention disclosed above, if it discloses a numerical range, then the disclosed numerical range is a preferred numerical range, and any technician in the field should understand that the preferred numerical range is only a numerical value with a more obvious technical effect or representative value among many implementable numerical values. Since there are too many numerical values to be exhaustive, the present invention discloses some numerical values to illustrate the technical solution of the present invention, and the numerical values listed above should not constitute a limitation on the scope of protection of the present invention.
[0054] The above embodiments are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications may be made based on the above description. It is not necessary and impossible to list all the embodiments here. However, the obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. A CART-integrated Adaboost photovoltaic power generation prediction method, characterized in that: The following steps are involved: Step 1, collecting historical data of photovoltaic power generation; Step 2: Obtain valid data through data cleaning; Step 3, using the Spearman rank correlation coefficient to determine the key parameters that affect the power generation; Step 4: Build and divide the data set; Step 5, construct an Adaboost photovoltaic power prediction model integrated with CART; Step 6: Test and evaluate the model; Step 7: Use the model to predict photovoltaic power generation.
2. The Adaboost photovoltaic power prediction method integrated with CART according to claim 1 is characterized in that: In step 1, the photovoltaic power generation historical data includes photovoltaic power generation power and meteorological data.
3. The Adaboost photovoltaic power prediction method integrated with CART according to claim 2 is characterized in that: The meteorological data include component temperature, air pressure, atmospheric temperature, humidity, wind speed at 10m from the wind tower, wind direction at 10m from the wind tower, total radiation, direct radiation, and scattered radiation.
4. The Adaboost photovoltaic power generation prediction method integrated with CART according to claim 1 is characterized in that: In step 2, the data cleaning is performed by manual screening.
5. The Adaboost photovoltaic power generation prediction method integrated with CART according to claim 1, characterized in that: In step 5, the classification and regression tree CART is used as the base learner of the AdaBoost model, and the sample weights are updated through iterative training, and the final model is a weighted combination of multiple base learners.
6. The Adaboost photovoltaic power prediction method integrated with CART according to claim 1, characterized in that: In step 6, the test set is input into the Adaboost photovoltaic power prediction model integrated with CART and other machine learning models respectively, and the prediction performance of the Adaboost model integrated with CART is evaluated through the test results of each model.
7. The Adaboost photovoltaic power generation prediction method integrated with CART according to claim 1, characterized in that: In step 7, the meteorological data acquired in real time is input into the Adaboost model integrated with CART to obtain the prediction result of photovoltaic power generation.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
9. A computer device, characterized in that: The computer device comprises a memory, a processor and a program stored and executable on the memory, and the program implements the steps of the method according to any one of claims 1 to 7 when executed by the processor.
Citation Information
Cited By
Asphalt panel temperature calibration model training and calibration method, system and device
CN122016088A