Weather type classification strategy and photovoltaic power generation power prediction method thereof
By inferring the weather type from historical photovoltaic output data, the existing photovoltaic power prediction method relies on external weather forecast data and limited prediction accuracy, achieving higher prediction accuracy and robustness.
Patent Information
- Application Number
- CN202411719131.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-11-27
AI Technical Summary
The existing photovoltaic power prediction methods rely on external weather forecast data, and the prediction accuracy is limited and cannot be adjusted in time to deal with instantaneous changes in weather conditions.
By inferring the weather type inversely from the historical photovoltaic output data, a weather type classification strategy is adopted to generate a symbol sequence of the photovoltaic output curve, and a threshold judgment is made to obtain the weather classification results.
It improves the accuracy and robustness of photovoltaic output prediction, can better capture the relationship between photovoltaic output and weather conditions, and effectively filters noise and interference in historical data.
Smart Images

Figure CN119742755A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system power prediction technology, and in particular to a weather type classification strategy and its application in photovoltaic power prediction. Background Technology
[0002] Globally, with the rapid development of renewable energy, photovoltaic (PV) power generation has become an important form of clean energy. The widespread adoption of PV systems has not only promoted the transformation of the energy structure but also provided an effective solution for addressing climate change and reducing greenhouse gas emissions. However, the output power of PV power generation has high uncertainty, mainly affected by meteorological factors such as solar radiation, temperature, humidity, and wind speed, with cloud cover changes having a particularly significant impact. The intermittent and uncertain nature of PV power generation also poses significant challenges to forecasting methods. Currently, most data-driven PV output forecasting methods mainly consider three elements: historical PV output data and its corresponding weather type, the weather type on the forecast day, and the forecasting model. These methods rely heavily on weather forecast data and historical power generation data, exhibiting strong data dependence, and typically use data with low spatial resolution. Furthermore, instantaneous changes in weather conditions may prevent traditional models from adjusting in a timely manner, thus affecting the accuracy of forecasts; therefore, these methods have certain limitations. Summary of the Invention
[0003] In view of this, and addressing the shortcomings and deficiencies of existing technologies, the purpose of this invention is to provide a weather type classification strategy based on historical photovoltaic output characteristics, and a method for photovoltaic output forecasting using this strategy. This method overcomes the shortcomings of traditional methods that rely on external weather forecast data and have limited forecast accuracy. By directly inferring weather types from historical photovoltaic output data, it improves the accuracy and robustness of photovoltaic output forecasting.
[0004] The essence of this invention is to determine weather type by reverse engineering historical photovoltaic (PV) output data. The overall implementation process includes: Step S1: Obtaining historical PV output data for the region; Step S2: Obtaining a detrended sequence based on an approximate clear-sky output sequence and the original PV output sequence; Step S3: Extracting process information from the detrended sequence using the difference sequence, discretizing it into strings, generating a symbolic sequence for the PV output curve, and determining a threshold; Step S4: Providing a weather type classification strategy based on the scoring sequence and threshold; Step S5: Providing an independent model for each weather type based on the weather classification results. This invention can better capture the relationship between PV output and weather conditions, effectively filter noise and interference in historical data, and thus more accurately reflect the characteristics of PV output. By clustering volatility scores, it constructs feature descriptions of different weather types, thereby achieving effective classification and prediction of weather types.
[0005] The present invention specifically adopts the following technical solution:
[0006] A weather type classification strategy for photovoltaic power generation prediction: Based on historical photovoltaic output data of the area to be predicted, a detrended sequence is obtained according to the approximate clear sky output sequence and the original photovoltaic output sequence; the process information contained in the detrended sequence is obtained from the difference sequence and discretized into a string, thereby generating a symbol sequence of photovoltaic output curve and corresponding volatility score, and a threshold determination is performed to obtain the weather classification result.
[0007] Furthermore, the original photovoltaic output sequence is used to reflect the volatility of photovoltaic output; the detrended sequence is used to reflect the volatility caused by instantaneous weather conditions, and is obtained by removing the photovoltaic output trend sequence under sunny conditions.
[0008] Furthermore, if the volatility score generated by the detrended sequence is lower than a threshold, the current weather is determined to be sunny.
[0009] Furthermore, if the volatility score generated by the detrended sequence is higher than the threshold, the volatility score generated by the original photovoltaic output sequence using the same processing procedure as the detrended sequence is further used to determine the threshold. If it is lower than the threshold, it is determined to be a rainy day; if it is higher than the threshold, it is determined to be a cloudy day.
[0010] Furthermore, the difference sequence is obtained by performing a first-order difference on the detrended sequence to obtain the difference sequence ΔR:
[0011]
[0012] In the formula: a represents the month, b represents the date, and the subscript M means the length of the time series.
[0013] Furthermore, the process of discretizing the difference sequence into a string is as follows: First, assume that the difference sequence is divided into M levels according to the degree of fluctuation, so that the difference sequence can be discretized into a string. Then, use the set of natural numbers as the level of fluctuation intensity, so that different difference values correspond to different fluctuation intervals. The non-overlapping fluctuation intervals are assigned to the natural numbers 0, 1, and 2 from smallest to largest. Then, the difference value in the corresponding fluctuation interval is defined as the corresponding natural number. After conversion, the symbol sequence corresponding to that day is obtained.
[0014]
[0015] In the formula: m means month.
[0016] Furthermore, the calculation process for the volatility score is as follows:
[0017]
[0018] Where W is the optimal word length obtained using the improved Shannon entropy (Finney, Charles E.A. et al. "Symbolic Time-Series Analysis of Engine Combustion Measurements." SAE transactions 107(1998):888-897.), N is the number of levels of fluctuation, and since the fluctuation level is defined as 3 levels, N is 3. sr corresponds to the character of the discretized string SR.
[0019] After obtaining the volatility scores VX and VR of the X and R sequences, supervised clustering is performed on the volatility scores over multiple days. The number of classification categories is predefined to be 3, corresponding to the three weather types: sunny, cloudy, and rainy. The entropy value after data classification is supervised to obtain the classification thresholds qx and qr of the two sequences, which are then used to determine the weather type of the day to be predicted.
[0020] Furthermore, a method for predicting photovoltaic power generation is provided, which uses the TCN model to model each weather type separately based on the weather classification results of the weather type classification strategy described above. The prediction takes the past three sampling days as input, and the goal is to predict the photovoltaic output in the next hour. The prediction is completed in a rolling mode for the whole day.
[0021] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described above.
[0022] A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0023] Compared to existing technologies, this invention and its preferred embodiment are based on the concept of weather type classification. They analyze the relationship between historical photovoltaic output data and weather types and use symbolic sequences to describe fluctuations in photovoltaic output, effectively filtering noise and interference from historical data. Based on this, the characteristics of photovoltaic output are reasonably deduced, constructing characteristic descriptions for different weather types, thereby achieving effective classification and prediction of weather types.
[0024] In this invention, the photovoltaic power output sequence with the least volatility in a given month is selected as the trend sequence for that month. Then, the original photovoltaic power output sequence for each day is removed from the trend sequence to obtain the detrended sequence. The trend sequence obtained by this method retains the inherent characteristics of photovoltaic power output, such as seasonality and diurnal variation, and has a better processing effect.
[0025] For multi-day QX and QR sequences, considering the significant differences in sequences under various weather conditions, and given that the output sequence characteristics under various weather conditions have been obtained, a supervised clustering algorithm is selected. The number of classification categories is predefined to be 3, and the entropy value after data classification is supervised, thereby obtaining better classification results.
[0026] In this invention, the prediction scheme uses a TCN model and causal convolution to ensure that the output time step depends only on the current and previous time steps. First, the weather type of the day to be predicted is predicted; then, different prediction models are trained using the TCN model for different weather types, and the photovoltaic output of the day to be predicted is predicted in a rolling manner to obtain the photovoltaic output result for the entire day of the day to be predicted, and it has higher prediction accuracy than traditional methods. Attached Figure Description
[0027] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0028] Figure 1 This is a flowchart of the method according to an embodiment of the present invention;
[0029] Figure 2 This is a diagram showing the TCN model setup for photovoltaic prediction in an embodiment of the present invention;
[0030] Figure 3 These are the cluster distribution and corresponding typical photovoltaic output curves in the embodiments of the present invention;
[0031] Figure 4 This is a comparison between the representative photovoltaic output prediction curve and the actual curve in the embodiments of the present invention;
[0032] Figure 5 A schematic diagram of the characteristic sequences under different weather types in an embodiment of the present invention. Detailed Implementation
[0033] In the following, specific embodiments of this application will be described in detail with reference to the accompanying drawings. Based on these detailed descriptions, those skilled in the art will be able to clearly understand and implement this application. Without departing from the principles of this application, features from various embodiments can be combined to obtain new implementations, or certain features from some embodiments can be substituted to obtain other preferred implementations.
[0034] To make the features and advantages of the present invention more apparent and understandable, specific embodiments are described below in conjunction with the accompanying drawings:
[0035] like Figure 1 As shown, this embodiment of the invention provides a weather type classification strategy based on historical photovoltaic output characteristics and its corresponding prediction method, including the following steps:
[0036] Step S1: Obtain historical photovoltaic output data for the area to be predicted;
[0037] Step S2: Obtain the detrended sequence based on the approximate clear-sky power output sequence and the original photovoltaic output sequence;
[0038] Step S3: Obtain the process information contained in the detrending sequence from the difference sequence, discretize it into a string, and then generate a symbol sequence of the photovoltaic power output curve and perform threshold determination;
[0039] Step S4: Based on the scoring sequence and threshold, provide a weather type classification strategy;
[0040] Step S5: Based on the weather classification results, provide independent models for each weather type to achieve prediction.
[0041] Steps S1-S4 classify weather types. Step S5 corresponds to the forecasting scheme.
[0042] For step S1, for example, considering the prediction of photovoltaic power generation output in a certain region, to predict the local photovoltaic output, we first need to obtain historical weather data and photovoltaic power generation output data for that region, with a time resolution of 5 minutes. The more data available, the more accurate the prediction will be.
[0043] In a preferred embodiment, step S2 involves extracting two types of feature sequences from historical photovoltaic output data containing an approximate clear-sky output sequence: the original photovoltaic output sequence (X-sequence) and the detrended sequence (R-sequence). The X-sequence reflects the volatility of photovoltaic output, while the R-sequence reflects the volatility caused by instantaneous weather conditions by removing the photovoltaic output trend sequence under clear skies (such as seasonality and diurnal variations). Preferably, the trend sequence for the corresponding month is obtained by removing the photovoltaic output sequence with the lowest volatility during the month, and then removing the trend sequence from the daily original photovoltaic output sequence. Figure 5 As shown, it can be observed that there are obvious differences between the two sequences for each weather type.
[0044] As a preferred embodiment, step S3 specifically involves: performing a first-order difference on the R-sequence to obtain the difference sequence ΔR. The difference sequence ΔR corresponding to the R-sequence is shown in the following formula. Since the X-sequence is processed using the same calculation method, it will not be described in detail here.
[0045]
[0046] In the formula: a represents the month, b represents the date, and the subscript M indicates the length of the time series. The difference sequence of the X-series uses the same form.
[0047] Then, the symbol sequence is generated by calculating the following formula. The process of discretizing the difference sequence into a string is as follows: First, assume that the difference sequence is divided into M levels according to the degree of fluctuation, so that the difference sequence can be discretized into a string. Then, the set of natural numbers is used as the level of fluctuation intensity, so that different difference values correspond to different fluctuation intervals. The non-overlapping fluctuation intervals are assigned to the natural numbers 0, 1, and 2 from small to large. Then, the difference value in the corresponding fluctuation interval is defined as the corresponding natural number. After conversion, the corresponding symbol sequence is obtained:
[0048]
[0049] In the formula: m represents the month.
[0050] Further simplify the calculation:
[0051]
[0052] In the formula: W is the optimal word length obtained using the improved Shannon entropy, and N is the number of levels into which the degree of fluctuation is divided.
[0053] As a preferred embodiment, step S4 introduces two volatility score sequences, QX and QR, and sets a scientific threshold limit based on actual conditions: After obtaining the volatility scores VX and VR of the original photovoltaic output sequence and the detrended sequence, supervised clustering is performed on the volatility scores over multiple days, and the number of classification categories is predefined to be 3, corresponding to the three weather types: sunny, cloudy, and rainy. The entropy value after data classification is supervised to obtain the classification thresholds qx and qr of the two sequences, which are then used to determine the weather type of the day to be predicted. The specific judgment logic is as follows: if the QR score is lower than the preset threshold, the current weather is directly determined to be sunny; if the QR score is higher than the threshold, it needs to be further considered in conjunction with the QX score: if the QX score is low, it is determined to be cloudy or rainy; if the QX score is high, it is considered to be partly cloudy. In a test example, the clustering thresholds for the preferred X-sequence and R-sequence symbol sequences are qx = 61 and qr = 61, respectively.
[0054] Based on the clustering boundaries determined in step S3, the historical photovoltaic power output data are clustered. The clustering results and corresponding typical photovoltaic output curves are shown below. Figure 3 As shown in the figure, the sample days in the training set can be significantly divided into different typical day clusters. Red dots represent sunny days, blue dots represent cloudy days, and green dots represent rainy days. The photovoltaic output curves for typical weather days corresponding to each cluster are shown in the figure. Figure 3 On the right, the curve shows the fluctuation characteristics of photovoltaic output under different weather types. Figure 5 Consistent with what is shown.
[0055] As a preferred embodiment, step S5 specifically involves: based on the weather classification results in step 3, this embodiment uses a TCN (Temporal Convolutional Network) model to independently model each weather type. This model takes data from the past three sampling days as input and aims to predict the photovoltaic output for the next hour. To achieve comprehensive prediction of the entire day's photovoltaic output, this embodiment employs a rolling prediction strategy; that is, after each prediction, the latest actual data is incorporated into the model to continuously update and optimize the prediction results. The TCN model settings are as follows... Figure 2 As shown.
[0056] In one test case, photovoltaic (PV) output under three typical weather conditions was predicted. Using the past three sampling days as input, the PV output for the next hour was predicted, and a rolling forecast was used to complete the forecast for the entire day. The prediction results are as follows: Figure 4As shown, the predicted output curve exhibits high peak power and flat fluctuations on sunny days, high peak power and drastic fluctuations on cloudy days, and low peak power and flat fluctuations on rainy days. In contrast, the curves modeled and predicted based on weather forecasts provided by CMA do not show clear regularity; for example, different curvature profiles are shown for the same rainy day predicted by CMA. These indicate that, from the perspective of photovoltaic output prediction, weather forecasts are not ideal for obtaining similar numbers of days based on weather type clustering. The method proposed in this invention shows acceptable performance for photovoltaic output under various weather conditions and can help us obtain more accurate prediction results.
[0057] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0058] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0059] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0060] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0061] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0062] Based on the same inventive concept, this invention also provides a computer device, comprising: one or more processors, and a memory for storing one or more computer programs; the programs include program instructions, and the processor executes the program instructions stored in the memory. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, used to implement one or more instructions, specifically for loading and executing one or more instructions stored in a computer storage medium to implement the above-described method.
[0063] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, performs the above-described method. This storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0064] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0065] The foregoing has shown and described the basic principles, main features, and advantages of this disclosure. Those skilled in the art should understand that this disclosure is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of this disclosure. Various changes and modifications can be made to this disclosure without departing from its spirit and scope, and all such changes and modifications fall within the scope of this disclosure as claimed.
[0066] This invention is not limited to the preferred embodiment described above. Anyone inspired by this invention can derive various other forms of weather type classification strategies and their applications in photovoltaic power generation prediction. All equivalent variations and modifications made within the scope of this invention's patent applications should be considered within the scope of this invention.
Claims
1. A weather type classification strategy, characterized by: For photovoltaic power generation prediction, the detrended sequence is obtained based on the historical photovoltaic output data of the area to be predicted, the approximate clear sky output sequence and the original photovoltaic output sequence. The process information contained in the detrended sequence is obtained from the difference sequence and discretized into a string, and then the symbol sequence of the photovoltaic output curve and the corresponding volatility score are generated, and the threshold is determined to obtain the weather classification result.
2. A weather type classification strategy according to claim 1, characterized in that: The original photovoltaic output sequence is used to reflect the volatility of photovoltaic output; the detrended sequence is used to reflect the volatility caused by instantaneous weather conditions, which is obtained by obtaining the photovoltaic output sequence with the smallest volatility in the month as the trend sequence of the corresponding month, and then removing the trend sequence from the original photovoltaic output sequence of each day.
3. A weather type classification strategy according to claim 1, characterized in that: When the volatility score generated by the detrended sequence is lower than a threshold, the current weather is determined to be sunny.
4. A weather type classification strategy according to claim 3, characterized in that: When the volatility score generated by the detrended sequence is higher than the threshold, the volatility score generated by the original photovoltaic output sequence using the same processing process as the detrended sequence is further subjected to threshold judgment. If it is lower than the threshold, it is judged as a rainy day, and if it is higher than the threshold, it is judged as cloudy weather.
5. A weather type classification strategy according to claim 1, characterized in that: The difference sequence is obtained by taking the first-order difference of the detrended sequence to obtain the difference sequence ΔR: Where a represents month, b represents date, and the subscript M means the length of the photovoltaic output time series.
6. A weather type classification strategy according to claim 5, characterized in that: The process of discretizing the difference sequence into a string is as follows: first, assume that the difference sequence is divided into M levels according to the degree of fluctuation, so as to discretize the difference sequence into a string, and then use the natural number set as the level of fluctuation intensity, so that different difference values correspond to different fluctuation intervals, and correspond each non-overlapping fluctuation interval from small to large to the natural numbers 0, 1, and 2. Then, the difference value in the corresponding fluctuation interval is defined as the corresponding natural number, and the corresponding symbol sequence is obtained after conversion: In the formula: m means month.
7. A weather type classification strategy according to claim 6, characterized in that: The calculation process of the volatility score is: Where W is the optimal word length obtained using the improved Shannon entropy, N is the number of levels into which the fluctuation degree is divided, and its value is 3, and sr corresponds to the characters of the discretized string SR; After obtaining the volatility scores VX and VR of the original PV output sequence and the detrended sequence, supervised clustering is performed on the volatility scores of multiple days, and the number of classification categories is predefined as 3, corresponding to the three weather types of sunny, cloudy and rainy days. The entropy value after data classification is supervised to obtain the classification thresholds qx and qr of the two sequences, which are used as a basis to judge the weather type of the day to be predicted.
8. A method for predicting photovoltaic power generation, characterized in that: Based on the weather classification results of the weather type classification strategy described in any one of claims 1-7, each weather type is modeled separately using the TCN model, and the prediction takes the past three sampling days as input. The goal is to predict the photovoltaic output within the next 1 hour and complete the full-day prediction in a rolling mode.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of a weather type classification strategy as described in any one of claims 1-7 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a weather type classification strategy as described in any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Distributed photovoltaic short-term output prediction method
CN111598337A
A photovoltaic power prediction method based on weather classification
CN113837426A
Weather type division method based on photovoltaic power generation symbol sequence histogram clustering
CN115982601A
Weather type prediction method based on symbol sequence histogram prediction
CN116011668A
Photovoltaic output fluctuation feature extraction method based on coarse graining description
CN116796704A