Distributed photovoltaic power generation power prediction method and system based on online modeling
Through the online modeling method, the rolling sampling model and weather type judgment algorithm are used to dynamically update the training samples, solving the problem of poor model timeliness and training set matching in the existing technology, and improving the accuracy of photovoltaic power generation prediction.
Patent Information
- Application Number
- CN202411781858.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-18
AI Technical Summary
The existing photovoltaic power prediction method based on offline modeling cannot update the model in time, resulting in poor timeliness of the model and the inability to effectively match the characteristics of the training set and the day to be predicted.
The distributed photovoltaic power generation prediction method based on online modeling is adopted, and the training samples are dynamically screened and updated through the rolling sampling model and the weather type judgment algorithm of numerical weather forecast to ensure that the characteristics of the model are basically consistent with the prediction date.
The online update of the photoelectric conversion model is realized, the accuracy of distributed photovoltaic power generation prediction is improved, and the problem of model update timeliness and training set matching is solved.
Smart Images

Figure CN119651586A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of renewable energy power generation technology, and in particular to a distributed photovoltaic power generation power prediction method and system based on online modeling. Background Art
[0002] In recent years, photovoltaic power prediction technology has gradually matured, and photovoltaic power prediction systems have also been put into practical use, playing an important role in formulating day-ahead power generation plans, promoting the consumption of new energy, and ensuring the economic and safe operation of power grids. Photovoltaic short-term power forecast refers to the power forecast for the next 1 to 3 days. In this direction, most forecasts are based on numerical weather forecasts and photoelectric conversion models. In order to improve the overall power prediction level, the solution is mainly to improve the accuracy of numerical weather forecasts and reduce photoelectric conversion errors.
[0003] Methods to improve the accuracy of numerical weather forecasts include improving numerical forecast performance and post-processing of numerical forecast models, which requires strong meteorological business capabilities. At present, it is very difficult to significantly improve the performance of numerical forecasts in the short term. In the photovoltaic conversion module, deep learning algorithms, data mining technology, some new AI technologies and other methods have also been introduced into predictive modeling to improve the decision-making power of photovoltaic short-term forecasts. In addition, technologies such as probability forecasting, combined forecasting, event forecasting, and grid forecasting have emerged one after another and are applied to different scenarios.
[0004] The shortcomings of existing modeling solutions are:
[0005] (1) It relies on a large number of historical samples and has a long modeling cycle. At the same time, due to factors such as the periodic changes in photovoltaic output and component attenuation, the historical long-period samples are very different from the daily characteristics to be predicted, which will interfere with the modeling.
[0006] (2) Existing modeling methods rarely classify numerical weather forecast samples and cannot reflect the forecast deviation trend under specific weather conditions, which affects the accuracy of the model. Summary of the invention
[0007] In order to solve the technical bottleneck that traditional prediction methods based on offline modeling cannot update models in time and improve the timeliness of models, the present invention proposes a distributed photovoltaic power generation prediction method and system based on online modeling; using numerical weather forecast data as input, the photoelectric conversion model is dynamically trained to automatically screen historical modeling samples that meet the requirements of short-term power prediction modeling. Through daily time window rollback, data quality analysis is performed, historical output and meteorological data in the database are selected, and modeling data that meets the index requirements is selected based on feature index calculation and trajectory classification. The sample data volume threshold is set, the sample screening cycle ends, and qualified training samples are output. After the training sample screening is completed, it can be used as an input sample for the online model. Using this method for daily rolling judgment can realize online updating of the photoelectric conversion model and improve the prediction accuracy of distributed photovoltaic power.
[0008] The present invention adopts the following technical solution.
[0009] In a first aspect, the present invention provides a distributed photovoltaic power generation power prediction method based on online modeling, the method comprising:
[0010] Step 1: Collect distributed photovoltaic historical data to build a historical data set;
[0011] Step 2: Establish a rolling sampling model, starting from the previous day, and perform rolling back calculations on a daily basis to judge the quality of the daily data set. If the valid sample is lower than the threshold, skip that day and continue rolling back until the number of valid sample days is greater than the set number of days N1;
[0012] Step 3: Based on the data after cyclic sampling, calculate the daily curve characteristic index and determine the weather trajectory type of the day to be predicted;
[0013] Step 4: Determine whether the weather trajectory type matches the weather type of the day to be predicted. If so, save the current day data to the valid data set;
[0014] Step 5: Determine whether the number of valid days of the data set meets the set condition N2. If so, perform photoelectric conversion modeling on the data set.
[0015] Optionally, in step 1, collecting distributed photovoltaic historical data to construct a historical data set includes:
[0016] Collect historical numerical weather forecast dataset F, historical active power dataset P and historical meteorological resource monitoring dataset W.
[0017] Optionally, in step 2, the quality judgment of the daily data set includes:
[0018] Statistical data is missing, abnormal, or has zero values, and the temporal consistency of the historical numerical weather forecast dataset F, the historical active power dataset P, and the historical meteorological resource monitoring dataset W is calculated. The threshold is 80% of the number of samples on the current day; the temporal consistency means that all three datasets have valid data at the same moment.
[0019] Among them, the weather forecast dataset F includes the forecast quantities of total radiation, direct radiation, diffuse radiation, and temperature; the historical meteorological resource monitoring dataset W includes the forecast quantities of total radiation, direct radiation, diffuse radiation, and temperature.
[0020] Optionally, in step 3, the calculated daily curve characteristic indicators include: the daily total radiation peak value G_max, the proportion R_rn of the daily direct radiation greater than the diffuse radiation, the direct-to-diffuse ratio R of the daily radiation amount, etc. The weather trajectory types include sunny days, cloudy days, overcast days, and rainy days.
[0021] Among them, for the proportion R_rn of the daily direct radiation greater than or equal to the diffuse radiation, it is judged whether the direct radiation is greater than or equal to the diffuse radiation at each moment. If it is greater, the count is 1. If there are a total of N moments, then R_rn = N / 96.
[0022] Optionally, the calculation formula for the direct-to-diffuse ratio R of the radiation amount is as follows:
[0023]
[0024] In the formula, DR t represents the direct radiation at time t, DN t represents the diffuse radiation at time t, and T 0 represents the time period from sunrise to sunset within the day.
[0025] Optionally, in step 4, the judgment process for determining whether the weather trajectory type matches the weather type of the day to be predicted is as follows:
[0026] If G_max > G_ref && (R_rn > 0.5 && R > 1), it is a sunny day;
[0027] If G_max > G_ref &&!(R_rn > 0.5 && R > 1), it is a cloudy day;
[0028] If G_max < G_ref && (R < 1 && R_rn < 0.5), it is an overcast day;
[0029] If G_max < G_ref &&!(R < 1 && R_rn < 0.5), it is a rainy day.
[0030] In a second aspect, the present invention provides a distributed photovoltaic power prediction system based on online modeling, which operates according to the steps of any one of the methods in the first aspect of the present invention. The system includes:
[0031] The data collection module is used to collect distributed photovoltaic historical data and build a historical data set;
[0032] The rollback calculation module is used to establish a rolling sampling model. Starting from the previous day, the rollback calculation is performed on a daily basis to judge the quality of the daily data set. If the valid sample is lower than the threshold, the day is skipped and the rollback continues until the number of valid sample days is greater than the set number of days N1;
[0033] A trajectory type determination module is used to calculate the daily curve characteristic index based on the data after cyclic sampling and determine the weather trajectory type of the day to be predicted;
[0034] The first judgment module is used to judge whether the weather trajectory type matches the weather type of the day to be predicted. If it is satisfied, the current day data is saved in the valid data set;
[0035] The second judgment module is used to judge whether the number of valid days of the data set meets the set condition N2. If so, the data set is subjected to photoelectric conversion modeling.
[0036] In a third aspect, the present invention provides a terminal, including a processor and a storage medium;
[0037] The storage medium is used to store instructions;
[0038] The processor is used to operate according to the instructions to execute the steps of any one of the methods described in the first aspect of the present invention.
[0039] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect of the present invention.
[0040] The beneficial effects of the present invention are as follows:
[0041] The present invention proposes a distributed photovoltaic power generation power prediction method based on online modeling, the improvements of which are as follows: first, a rolling sampling model is established, and rolling sampling starts from the nearest day, thereby ensuring that the characteristics of the training samples are basically consistent with those of the day to be predicted; second, a weather type judgment algorithm for numerical weather forecasting is established, which realizes the automatic construction of a sample set under weather conditions similar to that of the day to be predicted; the model update timeliness problem of the existing technical solution and the optimal matching problem of the training set are solved; the photoelectric conversion model can be updated online to improve the prediction accuracy of distributed photovoltaic power. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flow chart of the distributed photovoltaic power generation power prediction method based on online modeling in the present invention;
[0043] Figure 2 It is a schematic diagram for comparative analysis of the measured power, the power predicted based on offline modeling and the power predicted based on online modeling of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in the present invention are only part of the embodiments of the present invention, not all of the embodiments. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0045] Embodiment 1:
[0046] Reference Figure 1 The embodiment of the present invention provides a distributed photovoltaic power generation power prediction method based on online modeling, which specifically includes the following steps:
[0047] Step 1: Collect distributed photovoltaic historical numerical weather forecast data, historical active power data, and historical meteorological resource monitoring data to build a historical data set;
[0048] Step 2: Determine the quality of yesterday's data set. If the number of valid samples is less than 80% of the number of samples on that day, roll back one day to determine the data quality. Repeat this cycle until the number of valid samples is no less than the threshold.
[0049] Step 3: Based on the valid samples, calculate the characteristic indicators such as the daily total radiation peak value and the daily radiation direct-scatter ratio to determine the actual weather trajectory type;
[0050] Step 4: Determine whether the weather trajectory type is sunny. If it is satisfied, save the current day data to the valid data set;
[0051] Step 5: Determine whether the number of valid days in the data set is greater than or equal to 30. If so, perform photoelectric conversion modeling on the data set.
[0052] Furthermore, in step 1 of this embodiment, distributed photovoltaic historical data is collected to construct a historical data set, including a historical numerical weather forecast data set F, a historical active power data set P, and a historical meteorological resource monitoring data set W.
[0053] Further, in step 2 of this embodiment, the quality judgment of the dataset of the previous day includes counting data missing, anomalies, and zero values, and calculating the temporal consistency of the historical numerical weather forecast dataset F (including four forecast variables: global radiation, direct radiation, diffuse radiation, and temperature), the historical active power dataset P, and the historical meteorological resource monitoring dataset W (including four forecast variables: global radiation, direct radiation, diffuse radiation, and temperature). The threshold is 80% of the number of samples on the current day; the temporal consistency means that the three datasets are all valid data at the same moment.
[0054] Further, in step 3 of this embodiment, calculating characteristic indicators includes indicators such as the daily maximum global radiation G_max, the ratio R_rn of the daily direct radiation greater than the diffuse radiation, and the direct-to-diffuse ratio R of the daily radiation. The weather trajectory types include sunny, cloudy, overcast, rainy, etc.
[0055] Among them, the calculation formula of the direct-to-diffuse ratio R of the radiation is as follows:
[0056]
[0057] Among them, DR t represents the direct radiation at time t, and DN t represents the diffuse radiation at time t, and T 0 represents the period from sunrise to sunset within the day.
[0058] For the ratio R_rn of the daily direct radiation greater than or equal to the diffuse radiation, judge whether the direct radiation is greater than or equal to the diffuse radiation at each moment. If it is greater, count 1. If there are a total of N moments, then R_rn = N / 96;
[0059] Further, in step 4 of this embodiment, the judgment process of determining whether the weather trajectory type matches the weather type of the day to be predicted is as follows:
[0060] If G_max > G_ref && (R_rn > 0.5 && R > 1), it is a sunny day;
[0061] If G_max > G_ref &&!(R_rn > 0.5 && R > 1), it is a cloudy day;
[0062] If G_max < G_ref && (R < 1 && R_rn < 0.5), it is an overcast day;
[0063] If G_max < G_ref &&!(R < 1 && R_rn < 0.5), it is a rainy day.
[0064] For the meteorological forecast curve of the day to be predicted and the historical daily meteorological forecast curves, perform weather type judgment. If they are consistent, add them to the valid dataset.
[0065] Furthermore, in step 5 of this embodiment, the data set is subjected to photoelectric conversion modeling, including: taking the historical numerical weather forecast data set F (including four forecast quantities: total radiation, direct radiation, scattered radiation, and temperature) as input and the historical active power data set P as the target value for modeling. The support vector machine algorithm is selected as the modeling method.
[0066] The following example takes a distributed photovoltaic power station at an altitude of 1,500 meters as an example. The local micro-region climate of the power station is obvious, and the output fluctuates greatly. Excluding the evening period when the output of the photovoltaic power station is zero, a comparative analysis is conducted on the measured power, the power predicted by offline modeling, and the power predicted by online modeling based on this patent with a time resolution of 15 minutes. Figure 2 As shown; Figure 2 The middle blue is the measured output data, the orange is the output prediction data based on offline modeling, and the gray is the output prediction data based on the online modeling of this patent. After calculation, the offline modeling prediction accuracy is 84.1%, and the online modeling prediction accuracy is 85.9%. It can also be seen from the figure that the online modeling provided by the present invention has a smaller error.
[0067] The beneficial effects of the present invention are as follows:
[0068] The present invention proposes a distributed photovoltaic power generation power prediction method based on online modeling, the improvements of which are as follows: first, a rolling sampling model is established, and rolling sampling starts from the nearest day, thereby ensuring that the characteristics of the training samples are basically consistent with those of the day to be predicted; second, a weather type judgment algorithm for numerical weather forecasting is established, which realizes the automatic construction of a sample set under weather conditions similar to that of the day to be predicted; the model update timeliness problem of the existing technical solution and the optimal matching problem of the training set are solved; the photoelectric conversion model can be updated online to improve the prediction accuracy of distributed photovoltaic power.
[0069] Embodiment 2:
[0070] The present invention provides a distributed photovoltaic power generation power prediction system based on online modeling, the system is used to implement the steps of the method in the above embodiment 1, and the system specifically includes:
[0071] The present invention proposes a distributed photovoltaic power generation power prediction method based on online modeling, the improvements of which are as follows: first, a rolling sampling model is established, and rolling sampling starts from the nearest day, thereby ensuring that the characteristics of the training samples are basically consistent with those of the day to be predicted; second, a weather type judgment algorithm for numerical weather forecasting is established, which realizes the automatic construction of a sample set under weather conditions similar to that of the day to be predicted; the model update timeliness problem of the existing technical solution and the optimal matching problem of the training set are solved; the photoelectric conversion model can be updated online to improve the prediction accuracy of distributed photovoltaic power.
[0072] The distributed photovoltaic power generation power prediction system based on online modeling provided in the embodiment of the present invention and the distributed photovoltaic power generation power prediction method based on online modeling provided in Example 1 are based on the same technical concept, and can produce the beneficial effects as described in Example 1. For the contents not described in detail in this embodiment, please refer to Example 1.
[0073] Embodiment three:
[0074] A terminal provided by an embodiment of the present invention includes a processor and a storage medium;
[0075] The storage medium is used to store instructions;
[0076] The processor is used to operate according to the instruction to execute the steps of the method according to any one of the first embodiments.
[0077] Embodiment 4:
[0078] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of any method described in Embodiment 1 are implemented.
[0079] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0080] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0081] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0082] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A distributed photovoltaic power generation power prediction method based on online modeling, characterized in that the method including: Step 1: Collect historical data of distributed photovoltaics to construct a historical dataset; Step 2: Establish a rolling sampling model. Starting from the previous day, perform rollback calculations daily to judge the quality of the dataset for each day. If the number of valid samples is lower than the threshold, skip that day and continue to roll back until the number of days with valid samples is greater than the set number of days N1; Step 3: Based on the data after cyclic sampling, calculate the daily curve characteristic indicators to determine the weather trajectory type of the day to be predicted; Step 4: Judge whether the weather trajectory type matches the weather type of the day to be predicted. If it meets the condition, save the data of the current day to the valid dataset; Step 5: Judge whether the number of valid days in the dataset meets the set condition N2. If it meets, perform photovoltaic conversion modeling on this dataset.
2. The distributed photovoltaic power generation power prediction method based on online modeling according to claim 1 is characterized in that: In Step 1, the collection of historical data of distributed photovoltaics to construct a historical dataset includes: Collect the historical numerical weather forecast dataset F, the historical active power dataset P, and the historical meteorological resource monitoring dataset W.
3. The distributed photovoltaic power generation power prediction method based on online modeling according to claim 2 is characterized in that: In Step 2, the judgment of the quality of the dataset for each day includes: Statistical data missing, abnormal, zero values, and calculate the temporal consistency of the historical numerical weather forecast dataset F, the historical active power dataset P, and the historical meteorological resource monitoring dataset W. The threshold is 80% of the sample quantity of the current day; the temporal consistency means that all three datasets are valid data at the same moment; Among them, the weather forecast dataset F includes the forecast quantities of total radiation, direct radiation, diffuse radiation, and temperature; the historical meteorological resource monitoring dataset W includes the forecast quantities of total radiation, direct radiation, diffuse radiation, and temperature.
4. The distributed photovoltaic power generation power prediction method based on online modeling according to claim 1 is characterized in that: In Step 3, the calculation of the daily curve characteristic indicators includes: indicators such as the daily total radiation peak value G_max, the ratio R_rn of the daily direct radiation greater than the diffuse radiation, and the direct-diffuse ratio R of the daily radiation. The weather trajectory types include sunny days, cloudy days, overcast days, and rainy days; Among them, for the ratio R_rn of the daily direct radiation greater than or equal to the diffuse radiation, judge whether the direct radiation is greater than or equal to the diffuse radiation at each moment. If it is greater, count 1. If there are a total of N moments, then R_rn = N / 96.
5. The distributed photovoltaic power generation power prediction method based on online modeling according to claim 4 is characterized in that: The calculation formula of the direct-diffuse ratio R of the radiation is as follows: In the formula, DR t represents the direct radiation at time t, DN t represents the scattered radiation at time t, and T0 represents the period from sunrise to sunset within the day.
6. The distributed photovoltaic power generation power prediction method based on online modeling according to claim 4 is characterized in that: In Step 4, the judgment process of whether the weather trajectory type matches the weather type of the day to be predicted is as follows: If G_max > G_ref && (R_rn > 0.5 && R > 1), it is a sunny day; If G_max > G_ref &&!(R_rn > 0.5 && R > 1), it is a cloudy day; If G_max < G_ref && (R < 1 && R_rn < 0.5), it is an overcast day; If G_max < G_ref &&!(R < 1 && R_rn < 0.5), it is a rainy day.
7. A distributed photovoltaic power generation power prediction system based on online modeling, running the distributed photovoltaic power generation power prediction method based on online modeling as claimed in any one of claims 1 to 6, characterized in that the system including: A data collection module for collecting historical data of distributed photovoltaics to construct a historical dataset; A rollback calculation module for establishing a rolling sampling model, starting from the previous day, performing rollback calculations daily to judge the quality of the dataset for each day. If the number of valid samples is lower than the threshold, skip that day and continue to roll back until the number of days with valid samples is greater than the set number of days N1; A trajectory type determination module is used to calculate the daily curve characteristic index based on the data after cyclic sampling and determine the weather trajectory type of the day to be predicted; The first judgment module is used to judge whether the weather trajectory type matches the weather type of the day to be predicted. If it is satisfied, the current day data is saved in the valid data set; The second judgment module is used to judge whether the number of valid days of the data set meets the set condition N2. If so, the data set is subjected to photoelectric conversion modeling.
8. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Power grid intraday voltage regulation control method, device and equipment and computer readable medium
CN121308005A