A photovoltaic power generation amount model training method, system, device and medium
By extracting and processing meteorological and photovoltaic data, constructing prior and posterior models, and combining the posterior distribution of reference locations, the training data bias problem in traditional photovoltaic power generation prediction is solved, and high-precision photovoltaic power generation prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SPIC INTEGRATED SMART ENERGY TECH CO LTD
- Filing Date
- 2023-08-03
- Publication Date
- 2026-06-02
AI Technical Summary
In traditional machine learning for photovoltaic power generation prediction, training data bias can lead to misleading model predictions, making it impossible to accurately predict photovoltaic power generation.
By acquiring and preprocessing meteorological and photovoltaic data, prior and posterior feature vectors are extracted, prior and posterior models are constructed, and the model parameters are adjusted by combining the posterior distribution of the reference location to obtain the final high-precision photovoltaic power generation prediction model.
The model bias was reduced, enabling high-precision prediction of photovoltaic power generation.
Smart Images

Figure CN116821690B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic power generation technology, and in particular relates to a photovoltaic power generation model training method, system, equipment and medium. Background Technology
[0002] When using traditional machine learning to predict photovoltaic power generation, the distribution of correct values may be highly skewed in the training set. For example, under good weather conditions, most power generation will approximate the theoretical value of sunlight intensity. When there is too much of this kind of training data, the resulting bias may mislead the model. In other words, the model's predicted values tend to follow the empirical distribution of the training set.
[0003] Therefore, it is necessary to provide a new method, system, device, and medium for training photovoltaic power generation models to solve the above-mentioned technical problems. Summary of the Invention
[0004] The purpose of this invention is to provide a photovoltaic power generation model training method, system, device, and medium to solve the above-mentioned problems.
[0005] The present invention achieves the above objectives through the following technical solutions:
[0006] A method for training a photovoltaic power generation model includes the following steps:
[0007] Acquire regional meteorological and photovoltaic data and preprocess them to obtain preprocessed meteorological and photovoltaic data.
[0008] Feature extraction is performed on the preprocessed meteorological data and the preprocessed photovoltaic data to obtain prior feature vectors and posterior feature vectors, respectively.
[0009] Construct a prior model and a posterior model, and train the prior model and the posterior model using the prior feature vector and the posterior feature vector respectively to obtain a trained prior model and a trained posterior model.
[0010] A prediction model is constructed based on the trained prior model and the trained posterior model;
[0011] A reference location is selected, and the posterior distribution of the reference location is obtained based on the trained posterior model. A processed prediction model is obtained based on the prediction model and the posterior distribution of the reference location.
[0012] The parameters of the processed prediction model are adjusted to obtain the final model.
[0013] As a further optimization of the present invention, the meteorological data includes daily average temperature data, daily maximum temperature data, total cloud cover data, low cloud cover data, and precipitation data;
[0014] The photovoltaic data includes daily power generation data, latitude and longitude data of the installation location, altitude data, and tilt angle data.
[0015] As a further optimization of the present invention, the specific process of acquiring regional meteorological data and photovoltaic data and preprocessing them to obtain preprocessed meteorological data and preprocessed photovoltaic data is as follows:
[0016] The meteorological and photovoltaic data are processed by removing or imputing missing values, repairing extreme values, standardizing data, and dummy variableization to obtain preprocessed meteorological and photovoltaic data.
[0017] As a further optimization of the present invention, the specific process of constructing a prediction model based on the trained prior model and the trained posterior model is as follows:
[0018] The prior model and the posterior model characterize the prior distribution and the posterior distribution, respectively. A prediction model is constructed based on the prior distribution and the posterior distribution, as shown in the following formula:
[0019]
[0020] in, Let logit(p) represent the predicted value of photovoltaic power generation, where logit(p) represents the prior distribution and p represents the prior vector, and logit(b) represents the posterior distribution and b represents the posterior vector.
[0021] As a further optimization of the present invention, the specific process of selecting a reference location, obtaining the posterior distribution of the reference location based on the trained posterior model, and obtaining the processed prediction model based on the prediction model and the posterior distribution of the reference location is as follows:
[0022] With a reference location selected, the coefficient G(x) characterizing the posterior distribution at that location is used. The formula for the change in the predicted photovoltaic power generation is as follows:
[0023]
[0024] Where x represents the set of prior and posterior feature vectors, and b0 represents the posterior vector of the reference location.
[0025] As a further optimization of the present invention, the parameters of the processed prediction model are adjusted to obtain the final model, as shown in the following formula:
[0026]
[0027] in, This is an over-parameter and can be adjusted according to actual conditions.
[0028] As a further optimization of the present invention, the specific process of adjusting the parameters of the processed prediction model to obtain the final model is as follows:
[0029] The results of different parameter learning methods are evaluated based on the processed prediction model, and the model parameters are selected based on the minimum standard deviation.
[0030] The preprocessed meteorological data and the preprocessed photovoltaic data are divided into training set and test set. The test set is used to verify the difference between the model prediction value and the actual value, and the one with the smallest difference is selected as the final model.
[0031] A photovoltaic power generation model training system, comprising:
[0032] The acquisition module is used to acquire regional meteorological and photovoltaic data;
[0033] The preprocessing module is used to preprocess meteorological data and photovoltaic data to obtain preprocessed meteorological data and preprocessed photovoltaic data.
[0034] The feature extraction module is used to extract features from the preprocessed meteorological data and the preprocessed photovoltaic data to obtain prior feature vectors and posterior feature vectors, respectively.
[0035] The model building module is used to build prior and posterior models;
[0036] The model training module is used to train the prior model and the posterior model using the prior feature vector and the posterior feature vector respectively, to obtain the trained prior model and the trained posterior model.
[0037] A prediction model building module is used to build a prediction model based on the trained prior model and the trained posterior model.
[0038] The model processing module is used to select a reference location, obtain the posterior distribution of the reference location based on the trained posterior model, and obtain a processed prediction model based on the prediction model and the posterior distribution of the reference location.
[0039] The parameter tuning module is used to tune the parameters of the processed prediction model to obtain the final model.
[0040] An electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0041] Memory, used to store computer programs;
[0042] The processor, when executing a program stored in memory, implements the photovoltaic power generation model training method according to any one of claims 1-7.
[0043] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the photovoltaic power generation model training method according to any one of claims 1-7.
[0044] The beneficial effects of this invention are as follows:
[0045] This invention uses a model that characterizes the posterior distribution to reduce bias and achieve high-precision power generation prediction. Attached Figure Description
[0046] Figure 1 This is a flowchart of the method of the present invention;
[0047] Figure 2 This is a system structure block diagram of the present invention;
[0048] Figure 3 This is the device structure frame of the present invention. Detailed Implementation
[0049] The present application will now be described in further detail with reference to the accompanying drawings. It should be noted that the following specific embodiments are only used to further illustrate the present application and should not be construed as limiting the scope of protection of the present application. Those skilled in the art can make some non-essential improvements and adjustments to the present application based on the above application content.
[0050] like Figure 1 As shown, a photovoltaic power generation model training method includes the following steps:
[0051] S1: Acquire regional meteorological and photovoltaic data and preprocess them to obtain preprocessed meteorological and photovoltaic data;
[0052] S2: Feature extraction is performed on the preprocessed meteorological data and preprocessed photovoltaic data to obtain the prior feature vector and posterior feature vector, respectively;
[0053] S3: Construct a prior model and a posterior model, and train the prior model and the posterior model using the prior feature vector and the posterior feature vector respectively to obtain the trained prior model and the trained posterior model.
[0054] S4: Construct a prediction model based on the pre-trained model and the posterior model;
[0055] S5: Select a reference location, obtain the posterior distribution of the reference location based on the trained posterior model, and obtain the processed prediction model based on the prediction model and the posterior distribution of the reference location.
[0056] S6: Adjust the parameters of the processed prediction model to obtain the final model.
[0057] Meteorological data includes daily average temperature data, daily maximum temperature data, total cloud cover data, low cloud cover data, and precipitation data; photovoltaic data includes daily power generation data, latitude and longitude data of installation location, altitude data, and tilt angle data.
[0058] The specific process of acquiring and preprocessing regional meteorological and photovoltaic data to obtain preprocessed meteorological and photovoltaic data is as follows:
[0059] The meteorological and photovoltaic data are processed by removing or imputing missing values, repairing extreme values, standardizing data, and dummy variableization to obtain preprocessed meteorological and photovoltaic data.
[0060] The specific process of constructing a prediction model based on the post-trained prior model and the post-trained posterior model is as follows:
[0061] The prior and posterior distributions are characterized by a prior model and a posterior model, respectively. A prediction model is then constructed based on the prior and posterior distributions, as shown in the following formula:
[0062]
[0063] in, Let logit(p) represent the predicted value of photovoltaic power generation, where logit(p) represents the prior distribution and p represents the prior vector, and logit(b) represents the posterior distribution and b represents the posterior vector.
[0064] The specific process of selecting a reference location, obtaining the posterior distribution of the reference location based on the trained posterior model, and obtaining the processed prediction model based on the prediction model and the posterior distribution of the reference location is as follows:
[0065] With a reference location selected, the coefficient G(x) characterizing the posterior distribution at that location is used. The formula for the change in the predicted photovoltaic power generation is as follows:
[0066]
[0067] Where x represents the set of prior and posterior feature vectors, and b0 represents the posterior vector of the reference location.
[0068] The parameters of the processed prediction model are tuned to obtain the final model, as shown in the following formula:
[0069]
[0070] in, This is an over-parameter and can be adjusted according to actual conditions.
[0071] The specific process of tuning the parameters of the processed prediction model to obtain the final model is as follows:
[0072] The results of different parameter learning methods are evaluated based on the processed prediction model, and the model parameters are selected based on the minimum standard deviation.
[0073] The preprocessed meteorological data and preprocessed photovoltaic data were divided into training set and test set. The test set was used to verify the difference between the model's predicted values and the actual values, and the one with the smallest difference was selected as the final model.
[0074] In this embodiment, the specific process of the above steps is as follows:
[0075] The region will collect photovoltaic and meteorological data. Photovoltaic data includes, but is not limited to, daily power generation, latitude and longitude of installation location, altitude, and tilt angle. Meteorological data includes, but is not limited to, daily average temperature, daily maximum temperature, total cloud cover, low cloud cover, and precipitation.
[0076] Missing values were removed or imputed, extreme values were repaired, data were standardized, and data were dummy variables were created for the collected photovoltaic and meteorological data. Photovoltaic data does not possess spatiotemporal variation attributes; therefore, data with missing values or unreasonable extreme values was removed. Meteorological data does possess spatiotemporal variation attributes; it was imputed and repaired using spatiotemporal interpolation. Data with large-scale, long-term (threshold can be manually set) missing values or unreasonable extreme values was removed. For metric variables in the data preparation, such as daily power generation, power generation rate, contracted capacity, altitude, daily average temperature, daily maximum temperature, total cloud cover, low cloud cover, and precipitation, data standardization was performed to convert the data magnitudes of different metric variables to the same magnitude (facilitating model regularization). Specific standardization methods can include, but are not limited to, min-max standardization and z-score standardization.
[0077] Different machine learning methods are used to establish a prediction model for the photovoltaic power generation of a single device. Specific methods include, but are not limited to, linear regression, LASSO regression, ridge regression, SVM regression, random forest regression, transformer, bidirectional LSTM and other time-series neural networks. The preprocessed data is divided into training set and test set, and the specific ratio can be, but is not limited to, 7:3 and 8:2. The training set is used as the input of the model for training.
[0078] Feature extraction was performed on the preprocessed meteorological data and preprocessed photovoltaic data to obtain prior feature vectors and posterior feature vectors, respectively.
[0079] By splitting the selected model into two separate models to characterize the prior and posterior distributions, the predicted distribution of power generation can be described as follows:
[0080]
[0081] Where p represents factors with no obvious regularity, such as weather, and b represents fixed values or features such as latitude, longitude, altitude, and time, or features with proven theoretical values (in the case of no loss).
[0082] With sufficient training data, the coefficients of the prior probability at a certain reference location can be further characterized by the model:
[0083]
[0084] Where x represents the latitude, longitude, altitude, prediction time, and other features of the target, and b0 is the set of prior and posterior feature vectors. b0 is the posterior feature vector of the reference location (e.g., a place on the equator, Haidian District of Beijing, China).
[0085] The posterior distribution value of point b0 is characterized by a mechanistic model;
[0086] Fixed logit(b0), training the posterior model by removing the prior parts of the features, such as latitude and longitude, time, altitude, tilt angle, etc. (If using a deep model such as Informer, these signals should also be removed in the embedding layer).
[0087] Perform photovoltaic power generation forecasting. Adjust parameters as needed to reduce or increase the impact of delay probability on the forecast results.
[0088]
[0089] in This is an over-parameter and can be adjusted based on experience or actual conditions.
[0090] The results of different hyperparameter learning methods are evaluated based on the final model, and the hyperparameters of the final model are selected based on the minimum standard deviation. The difference between the model's predicted values and the actual values is verified using a test set, and the model with the smallest difference is selected as the final model. The selection criteria for the final model based on the minimum standard deviation are determined by specific needs, including but not limited to the minimum standard deviation and the Nash efficiency coefficient.
[0091] like Figure 2 As shown, a photovoltaic power generation model training system includes:
[0092] Module 11 is used to acquire regional meteorological and photovoltaic data;
[0093] Preprocessing module 12 is used to preprocess meteorological data and photovoltaic data to obtain preprocessed meteorological data and preprocessed photovoltaic data;
[0094] Feature extraction module 13 is used to extract features from preprocessed meteorological data and preprocessed photovoltaic data to obtain prior feature vectors and posterior feature vectors, respectively.
[0095] Model building module 14 is used to build prior and posterior models;
[0096] Model training module 15 is used to train the prior model and the posterior model using prior feature vectors and posterior feature vectors respectively, to obtain the trained prior model and the trained posterior model.
[0097] Prediction model building module 16 is used to build a prediction model based on the trained prior model and the trained posterior model;
[0098] The model processing module 17 is used to select a reference location, obtain the posterior distribution of the reference location based on the trained posterior model, and obtain the processed prediction model based on the prediction model and the posterior distribution of the reference location.
[0099] The parameter tuning module 18 is used to tune the parameters of the processed prediction model to obtain the final model.
[0100] The implementation process of the functions and roles of each module in the above system is detailed in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0101] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The system embodiments described above are merely illustrative, and the modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0102] In the above embodiments, any number of modules can be combined into one module, or any one module can be split into multiple modules. Alternatively, at least some functionality of one or more modules can be combined with at least some functionality of other modules and implemented in one module. At least one of the modules can be at least partially implemented as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-Chip, a System-on-Substrate, a System-on-Package, an Application-Specific Integrated Circuit (ASIC), or any other reasonable method of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three methods. Alternatively, at least one of the modules can be at least partially implemented as a computer program module that, when run, performs a corresponding function.
[0103] like Figure 3 As shown, the electronic device provided in the embodiments of this disclosure includes a processor 1110, a communication interface 1120, a memory 1130, and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 communicate with each other through the communication bus 1140.
[0104] Memory 1130 is used to store computer programs;
[0105] When the processor 1110 executes the program stored in the memory 1130, it implements the photovoltaic power generation model training method shown below.
[0106] The aforementioned communication bus 1140 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus.
[0107] The communication interface 1120 is used for communication between the above-mentioned electronic device and other devices.
[0108] The memory 1130 may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1130 may also be at least one storage device located remotely from the aforementioned processor 1110.
[0109] The processor 1110 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0110] Embodiments of this disclosure also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the photovoltaic power generation model training method described above.
[0111] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; or it may exist independently and not assembled into the device / apparatus. The computer-readable storage medium carries one or more programs that, when executed, implement the photovoltaic power generation model training method according to embodiments of this disclosure.
[0112] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0113] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. A method for training a photovoltaic power generation model, characterized in that, Includes the following steps: Acquire regional meteorological and photovoltaic data and preprocess them to obtain preprocessed meteorological and photovoltaic data. Feature extraction is performed on the preprocessed meteorological data and the preprocessed photovoltaic data to obtain prior feature vectors and posterior feature vectors, respectively. Construct a prior model and a posterior model, and train the prior model and the posterior model using the prior feature vector and the posterior feature vector respectively to obtain a trained prior model and a trained posterior model. A prediction model is constructed based on the trained prior model and the trained posterior model; A reference location is selected, and the posterior distribution of the reference location is obtained based on the trained posterior model. A processed prediction model is obtained based on the prediction model and the posterior distribution of the reference location. The parameters of the processed prediction model are tuned to obtain the final model, including: evaluating the results of different parameter learning methods based on the processed prediction model, and selecting model parameters based on the minimum standard deviation; dividing the preprocessed meteorological data and the preprocessed photovoltaic data into training sets and test sets, using the test set to verify the difference between the model prediction value and the actual value, and selecting the one with the smallest difference as the final model; The specific process of constructing the prediction model based on the trained prior model and the trained posterior model is as follows: The prior model and the posterior model characterize the prior distribution and the posterior distribution, respectively. A prediction model is constructed based on the prior distribution and the posterior distribution, as shown in the following formula: ; in, This represents the predicted value of photovoltaic power generation. Describe the prior distribution, Represents the prior vector, Denotes the posterior distribution. Represents the posterior vector; The specific process of selecting a reference location, obtaining the posterior distribution of the reference location based on the trained posterior model, and obtaining the processed prediction model based on the prediction model and the posterior distribution of the reference location is as follows: Select a reference location and characterize the coefficients of its posterior distribution. The formula for the change in the predicted value of photovoltaic power generation is as follows: ; Where x represents the set of prior and posterior feature vectors. Represents the posterior vector of the reference location; The parameters of the processed prediction model are tuned to obtain the final model, as shown in the following formula: ; in, This is an over-parameter and can be adjusted according to actual conditions.
2. The photovoltaic power generation model training method according to claim 1, characterized in that, The meteorological data includes daily average temperature data, daily maximum temperature data, total cloud cover data, low cloud cover data, and precipitation data; The photovoltaic data includes daily power generation data, latitude and longitude data of the installation location, altitude data, and tilt angle data.
3. The photovoltaic power generation model training method according to claim 1, characterized in that, The specific process of acquiring and preprocessing regional meteorological and photovoltaic data to obtain preprocessed meteorological and photovoltaic data is as follows: The meteorological and photovoltaic data are processed by removing or imputing missing values, repairing extreme values, standardizing data, and dummy variableization to obtain preprocessed meteorological and photovoltaic data.
4. A photovoltaic power generation model training system, used to implement the photovoltaic power generation model training method as described in any one of claims 1-3, characterized in that, include: The acquisition module is used to acquire regional meteorological and photovoltaic data; The preprocessing module is used to preprocess meteorological data and photovoltaic data to obtain preprocessed meteorological data and preprocessed photovoltaic data. The feature extraction module is used to extract features from the preprocessed meteorological data and the preprocessed photovoltaic data to obtain prior feature vectors and posterior feature vectors, respectively. The model building module is used to build prior and posterior models; The model training module is used to train the prior model and the posterior model using the prior feature vector and the posterior feature vector respectively, to obtain the trained prior model and the trained posterior model. A prediction model building module is used to build a prediction model based on the trained prior model and the trained posterior model. The model processing module is used to select a reference location, obtain the posterior distribution of the reference location based on the trained posterior model, and obtain a processed prediction model based on the prediction model and the posterior distribution of the reference location. The parameter tuning module is used to tune the parameters of the processed prediction model to obtain the final model, including: evaluating the results of different parameter learning methods based on the processed prediction model, and selecting model parameters based on the minimum standard deviation. The preprocessed meteorological data and the preprocessed photovoltaic data are divided into training set and test set. The test set is used to verify the difference between the model prediction value and the actual value, and the one with the smallest difference is selected as the final model.
5. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor, when executing a program stored in memory, implements the photovoltaic power generation model training method according to any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the photovoltaic power generation model training method according to any one of claims 1-3.