A weather type classification strategy and its use in photovoltaic power generation power prediction method
By analyzing historical photovoltaic output data, extracting weather type classification strategies, and using the TCN model, the problem of photovoltaic power generation prediction relying on external weather forecasts was solved, achieving higher prediction accuracy and robustness.
Patent Information
- Application Number
- CN202411719131.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Existing photovoltaic power generation forecasting methods rely on external weather forecast data, which limits forecast accuracy and cannot respond to instantaneous weather changes in a timely manner, resulting in high forecast uncertainty.
By analyzing historical photovoltaic output data, we extract weather type classification strategies, use the TCN model to predict photovoltaic output, directly infer weather types from photovoltaic output data, construct feature descriptions of different weather types, and use symbolic sequences and clustering algorithms for effective classification.
It improves the accuracy and robustness of photovoltaic output forecasting, better captures the relationship between photovoltaic output and weather conditions, filters historical data noise, and achieves more accurate weather type classification and forecasting.
Smart Images

Figure CN119742755B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power system power prediction, in particular to a weather type classification strategy and a photovoltaic power generation power prediction method using the same. BACKGROUND
[0002] Globally, with the rapid development of renewable energy, photovoltaic power generation has become an important form of clean energy. The popularity of photovoltaic power generation systems not only promotes the transformation of energy structure, but also provides an effective solution to climate change and greenhouse gas emission reduction. However, the output power of photovoltaic power generation has high uncertainty, mainly affected by meteorological factors such as solar radiation, temperature, humidity, wind speed, etc., especially the influence of cloud changes. The power supply mode of photovoltaic power generation presents intermittent and uncertain characteristics, which also brings great challenges to the prediction method. At present, most data-driven photovoltaic output prediction methods mainly consider the following three elements: historical photovoltaic output data and its corresponding weather type, weather type of the prediction day and prediction model. These methods mainly rely on weather forecast data and historical power generation data, and have strong data dependence, and usually use low spatial resolution data. In addition, the instantaneous change of weather conditions may cause the traditional model to fail to adjust in time, thereby affecting the accuracy of the prediction, so these methods have certain limitations. SUMMARY
[0003] Therefore, in view of the defects and deficiencies of the prior art, the purpose of the present application is to provide a weather type classification strategy based on historical photovoltaic output characteristics extraction, and a photovoltaic output prediction method using the same. This method overcomes the shortcomings of traditional methods that rely on external weather forecast data and have limited prediction accuracy, and improves the accuracy and robustness of photovoltaic output prediction by directly inferring the weather type from historical photovoltaic output data.
[0004] The essence of the scheme is to determine the weather type by historical photovoltaic output data, and the overall implementation process comprises the following steps: S1, obtaining historical photovoltaic output data of the region; S2, obtaining a detrended sequence according to an approximate clear sky output sequence and an original photovoltaic output sequence; S3, obtaining process information contained in the detrended sequence from a difference sequence, discretizing the process information into a string, and then generating a symbol sequence of the photovoltaic output curve and performing threshold determination; S4, giving a weather type classification strategy based on a score sequence and a threshold; and S5, giving an independent model of each weather type based on a weather classification result. The scheme can better capture the relationship between photovoltaic output and weather conditions, can effectively filter noise and interference in historical data, can more accurately reflect the characteristics of photovoltaic output, can cluster fluctuation scores, and can construct feature descriptions of different weather types, so that effective classification and prediction of weather types are realized.
[0005] The application specifically adopts the following technical scheme:
[0006] A weather type classification strategy: for photovoltaic power generation power prediction, based on historical photovoltaic output data of a region to be predicted, a detrended sequence is obtained according to an approximate clear sky output sequence and an original photovoltaic output sequence; process information contained in the detrended sequence is obtained from a difference sequence, and is discretized into a string, and then a symbol sequence of the photovoltaic output curve and corresponding fluctuation scores are generated, and threshold determination is performed to obtain a weather classification result.
[0007] Further, the original photovoltaic output sequence is used to reflect the fluctuation of photovoltaic output; the detrended sequence is used to reflect the fluctuation caused by instantaneous weather conditions, and is obtained by removing the photovoltaic output trend sequence under sunny days.
[0008] Further, when the fluctuation score generated by the detrended sequence is lower than a threshold, it is determined that the current weather is sunny.
[0009] Further, when the fluctuation score generated by the detrended sequence is higher than a threshold, the fluctuation score generated by the same processing process as the detrended sequence is further subjected to threshold determination on the original photovoltaic output sequence, and if the fluctuation score is lower than the threshold, it is determined to be a rainy day, and if the fluctuation score is higher than the threshold, it is determined to be cloudy weather.
[0010] Further, the difference sequence is obtained by first-order difference of the detrended sequence.
[0011]
[0012] In the formula, a represents a month, b represents a date, and the subscript M represents the length of the time sequence.
[0013] Further, the process of discretizing the difference sequence into a string is: first, assuming that the difference sequence is divided into M levels according to the fluctuation degree, so as to discretize the difference sequence into a string, then using the set of natural numbers as the classification of fluctuation intensity, so that different difference values correspond to different fluctuation intervals, and each non-overlapping fluctuation interval corresponds to natural numbers 0, 1, 2 from small to large, then the difference value in the corresponding fluctuation interval is defined as the corresponding natural number, and the corresponding symbol sequence of the day is obtained after conversion:
[0014]
[0015] In the formula: m represents month.
[0016] Further, the calculation process of the volatility score is:
[0017]
[0018] Wherein, W is the optimal word length obtained by 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 layers divided by the fluctuation degree, since the fluctuation classification is defined as 3 levels, N is 3, and sr corresponds to the characters of the discretized string SR.
[0019] After obtaining the volatility scores VX and VR of the X sequence and the R sequence, the volatility scores of multiple days are supervised clustering, and the number of classification categories is defined as 3, corresponding to the three weather types of sunny, cloudy and rainy, and the entropy value of the data classification is supervised, so that the classification threshold values qx and qr of the two sequences can be obtained, and the weather type of the day to be predicted is determined based on the threshold values.
[0020] In addition, a photovoltaic power prediction method, based on the weather classification result of the weather type classification strategy as described above, uses a TCN model to model each weather type separately, predicts the photovoltaic output within the next 1 hour with the past 3 sampling days as input, and completes the prediction of the whole day in a rolling mode.
[0021] An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method as described above.
[0022] A non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method as described above.
[0023] Compared with the prior art, the application and the preferred schemes thereof are based on the concept of weather type classification, analyze the relationship between historical photovoltaic output data and weather types, and use symbol sequences to describe fluctuations in photovoltaic output, which can effectively filter noise and interference in historical data. Accordingly, the characteristics of photovoltaic output are reasonably calculated, and the characteristic descriptions of different weather types are constructed, so that effective classification and prediction of weather types are realized.
[0024] In the scheme of the application, the photovoltaic output sequence with the smallest fluctuation in the month is found as the trend sequence of the corresponding month, and the trend sequence is removed from the original photovoltaic output sequence of each day to obtain a detrended sequence. The trend sequence obtained by this method retains the characteristics of photovoltaic output, such as seasonality and day-night change, and has better processing effect.
[0025] For multi-day QX and QR sequences, considering that the sequence difference under each weather condition is large, and under the premise that the characteristics of the output sequence under each weather condition have been obtained, a supervised clustering algorithm is selected, the number of classification categories is predefined as three, and the entropy value after data classification is supervised, so that better classification effect can be obtained.
[0026] In the prediction scheme of the application, the TCN model is used, the causal convolution is used to ensure that the output time step only depends on the current and previous time steps, the weather type of the day to be predicted is first predicted, different prediction models are trained for different weather types using the TCN model, and the photovoltaic output of the day to be predicted is predicted in a rolling manner to obtain the photovoltaic output result of the whole day, and the prediction accuracy is higher than that of the traditional method. BRIEF DESCRIPTION OF DRAWINGS
[0027] The application will be further described in detail below in combination with the drawings and specific embodiments:
[0028] Figure 1 is a method flowchart of an embodiment of the application;
[0029] Figure 2 is a TCN model setting diagram for photovoltaic prediction in an embodiment of the application;
[0030] Figure 3 is a cluster distribution and corresponding typical photovoltaic output curve in an embodiment of the application;
[0031] Figure 4 is a comparison of a representative photovoltaic output prediction curve and an actual curve in an embodiment of the application;
[0032] Figure 5 The figure shows the curve of the feature sequence of different weather types according to the embodiments of the present application. DETAILED DESCRIPTION
[0033] In the following, specific embodiments of the present application will be described in detail with reference to the accompanying drawings, and those skilled in the art can clearly understand the present application and implement the present application according to these detailed descriptions. The features in each different embodiment can be combined to obtain new implementations, or some features in some embodiments can be replaced by other preferred implementations, without departing from the principles of the present application.
[0034] In order to make the features and advantages of the present application more obvious and easy to understand, the following specific embodiments are described in detail below, and the accompanying drawings are described as follows:
[0035] As shown in the figure, the embodiments of the present application provide a weather type classification strategy based on historical photovoltaic output characteristics extraction and the corresponding prediction method, including the following steps: Figure 1 Step S1: Obtain the historical photovoltaic output data of the area to be predicted;
[0036] Step S2: Obtain the detrended sequence according to the approximate clear sky output sequence and the original photovoltaic output sequence;
[0037] Step S3: Obtain the process information contained in the detrended sequence from the difference sequence, and discretize it into a string, and then generate the symbol sequence of the photovoltaic output curve and perform threshold judgment;
[0038] Step S4: Give the weather type classification strategy based on the score sequence and the threshold value;
[0039] Step S5: Based on the weather classification result, give the independent model of each weather type to realize prediction.
[0040] Among them, steps S1-S4 realize weather type classification. Step S5 corresponds to the prediction scheme
[0041] For step S1, for example, consider the photovoltaic power output prediction of an area, in order to predict the local photovoltaic output, first obtain the historical weather data and photovoltaic power output data of the area, and the time resolution is 5 minutes. The more data, the more accurate the prediction.
[0042]
[0043] As a preferred scheme of the embodiment, in step S2, two types of feature sequences are extracted from the historical photovoltaic output data containing the approximate clear sky output sequence, including: the original photovoltaic output sequence (X-sequence) and the detrended sequence (R-sequence). The X-sequence reflects the volatility of photovoltaic output, and the R-sequence reflects the volatility caused by instantaneous weather conditions by removing the photovoltaic output trend sequence (such as seasonality and day-night changes) under sunny days. As a preferred scheme, the photovoltaic output sequence with the minimum volatility in the middle of the month is obtained as the trend sequence of the corresponding month, and then the original photovoltaic output sequence of each day is removed to obtain the trend sequence. As shown in FIG. 8, it can be observed that the two sequences of each weather type have obvious differences. Figure 5
[0044] As a preferred scheme of the embodiment, step S3 is specifically: the R-sequence is subjected to first-order difference to obtain a difference sequence ΔR. The difference sequence ΔR corresponding to the R-sequence is as follows:
[0045]
[0046] In the formula, a represents the month, b represents the date, and the subscript M represents the length of the time sequence. The difference sequence of the X-sequence adopts the same form.
[0047] Then, the symbol sequence is calculated according to the following formula, and the process of discretizing the difference sequence into a string is as follows: first, it is assumed that the difference sequence is divided into M levels according to the volatility degree, so as to discretize the difference sequence into a string, then the set of natural numbers is used as the classification of the volatility intensity, different difference values correspond to different volatility intervals, and each non-overlapping volatility interval is corresponded to natural numbers 0, 1, 2 from small to large, and the difference value in the corresponding volatility interval is defined as the corresponding natural number, and the corresponding symbol sequence is obtained after conversion:
[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 by using the improved Shannon entropy, and N is the number of layers into which the volatility degree 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 curves show high peak power and flat fluctuations for sunny days, high peak and intense fluctuations for overcast days, and low peak and flat fluctuations for rainy days. In contrast, the curves modeled and predicted from the weather forecasts provided by CMA do not have a clear pattern, for example, the same rainy day predicted by CMA shows a different curved profile. They indicate that weather forecasts are not ideal for weather type clustering in terms of obtaining similar number of days from the perspective of photovoltaic output prediction. The method proposed in the present application shows acceptable performance for photovoltaic output under various weather conditions, which can help us to obtain more accurate prediction results.
[0057] Those skilled in the art will appreciate that embodiments of the present application can be supplied as a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage media, etc.) embodying computer-readable program code.
[0058] The present application is described in reference to the flowchart illustrations and / or block diagrams according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart illustrations and / or block diagrams, and combinations of flows and / or 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, an 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, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 The flowchart illustrations and / or block diagrams Figure 1 Means for carrying out the functions specified in the flowchart illustrations and / or block diagrams.
[0059] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 The flowchart illustrations and / or block diagrams Figure 1 Means for carrying out the functions specified in the flowchart illustrations and / or block diagrams.
[0060] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 The flowchart illustrations and / or block diagramsFigure 1 the steps of the functions specified in the one or more blocks.
[0061] It should be noted that, unless otherwise defined, technical terms or scientific terms used in the present application shall have the common meaning as understood by one of ordinary skill in the art to which this application pertains. The terms "first", "second" and similar terms are used herein to distinguish one element from another, and are not necessarily used in a sequential or chronological sense, or to indicate any priority. The terms "include", "includes", "including", "contain", "contains", "containing", or any other similar terms are intended to be inclusive or open-ended and do not exclude additional, unrecited elements or method steps. The terms "coupled", "connected", or any other similar terms are not intended to be limited to a direct or indirect connection, and can include an electrical connection, whether direct or indirect. The terms "upper", "lower", "left", "right", or any other similar terms are used to indicate relative positions, and can change when the absolute positions of the described objects change.
[0062] Based on the same inventive concept, the present application further provides a computer device, which comprises one or more processors and a memory for storing one or more computer programs; the program comprises program instructions, and the processor is configured to execute the program instructions stored in the memory. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc., which are the computing core and control core of the terminal, and are configured to implement one or more instructions, and are specifically configured to load and execute one or more instructions in the computer storage medium to implement the above method.
[0063] It should be further explained that based on the same inventive concept, the present application also provides a computer storage medium, which stores a computer program, and the computer program is executed by a processor to perform the above method. The storage medium can adopt 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 may, for example, but is not limited to, an electrical, magnetic, optical, electrical, magnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage medium include: electrical connections with one or more conductive wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present application, 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, device or component.
[0064] In the description of the present application, the description of the terms "one embodiment", "an example", "a specific example" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present disclosure. In the present specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0065] The above shows and describes the basic principles, main features and advantages of the present disclosure. Those skilled in the art should understand that the present disclosure is not limited to the above embodiments, and the above embodiments and descriptions in the specification are only to illustrate the principles of the present disclosure. Without departing from the spirit and scope of the present disclosure, various changes and improvements can be made to the present disclosure, and these changes and improvements all fall within the scope of the claimed present disclosure.
[0066] The present application is not limited to the above best mode, and anyone can derive other various forms of a weather type classification strategy and its method for photovoltaic power prediction from the inspiration of the present application. Any equivalent changes and modifications made within the scope of the present application application patent range shall fall within the scope of the present application.
Claims
1. A weather type classification method characterized by: For photovoltaic power prediction, based on the historical photovoltaic output data of the region to be predicted, the 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 is discretized into a string, and then the symbol sequence of the photovoltaic output curve and the volatility score corresponding to the symbol sequence are generated, and threshold judgment is performed to obtain the weather classification result; The difference sequence is obtained by first-order difference of the detrended sequence: In the formula, a represents the month, b represents the date, and the subscript M represents the length of the photovoltaic output time sequence; 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 volatility degree, so as to discretize the difference sequence into a string, then use the set of natural numbers as the classification of volatility intensity, so that different difference values correspond to different volatility intervals, and each non-overlapping volatility interval corresponds to natural numbers 0, 1, 2 from small to large, then the difference value in the corresponding volatility interval is defined as the corresponding natural number, and the corresponding symbol sequence is obtained after conversion: In the formula, m represents the month; The calculation process of the volatility score is as follows: Wherein, W is the optimal word length obtained by using the improved Shannon entropy, N is the number of layers divided according to the volatility degree, which is 3, and sr corresponds to the characters of the discretized string SR; After obtaining the volatility scores VX and VR of the original photovoltaic output sequence and the detrended sequence, the volatility scores of multiple days are supervised clustering, and the classification category number is defined as 3, corresponding to three weather types of sunny, cloudy and rainy, and the entropy value of the data after classification is supervised, so as to obtain the classification threshold values qx and qr of the two sequences, so as to judge the weather type of the day to be predicted based on this.
2. The weather type classification method of claim 1, wherein: 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 the photovoltaic output sequence with the minimum volatility in the month is obtained as the trend sequence of the corresponding month, and then the original photovoltaic output sequence of each day is obtained by removing the trend sequence.
3. The weather type classification method of claim 1, wherein: When the volatility score generated by the detrended sequence is lower than the first threshold value, it is determined that the current weather is sunny.
4. The weather type classification method of claim 3, wherein: When the volatility score generated by the detrended sequence is higher than the first threshold value, the volatility score generated by the same processing process as the detrended sequence is further judged by the second threshold value, which is lower than the second threshold value, and it is determined that it is cloudy and rainy, and it is higher than the second threshold value, and it is determined that it is cloudy.
5. A method for photovoltaic power generation prediction, characterized by: Based on the weather classification result of the weather type classification method according to any one of claims 1-4, the TCN model is used to model each weather type separately, the past 3 sampling days are used as input, and the target is to predict the photovoltaic output within 1 hour in the future, and the prediction of the whole day is completed in a rolling mode.
6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps of the weather type classification method according to any one of claims 1-4.
7. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the weather type classification method according to any one of claims 1-4.
Citation Information
Patent Citations
Distributed photovoltaic short-term output prediction method
CN111598337A
Weather type division method based on photovoltaic power generation symbol sequence histogram clustering
CN115982601A