Local time-of-day weather forecasting method based on historical photovoltaic power output data
By employing a localized time-series weather forecasting method based on historical photovoltaic power output data, and utilizing the K-means algorithm and convolutional-long short-term memory network model, the problem of insufficient spatiotemporal resolution of meteorological information is solved, thereby improving the accuracy and precision of photovoltaic power output forecasting.
Patent Information
- Application Number
- CN202411417286.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-10-11
AI Technical Summary
Existing photovoltaic power generation forecasting methods suffer from insufficient spatiotemporal resolution of meteorological information, resulting in low accuracy in photovoltaic output forecasting. This poses a challenge to the safe and stable operation of the power system, especially when photovoltaic power is connected to the grid.
Based on historical photovoltaic power output data, fluctuation feature vectors are extracted through mode decomposition, local time-series weather type clustering is performed using the K-means algorithm, and weather type prediction is made by combining multivariate phase space reconstruction and convolutional-long short-term memory network model.
It improves the accuracy and spatial resolution of photovoltaic power output forecasting, enhances the accuracy of weather type forecasting, and improves the forecasting effect of photovoltaic power generation.
Smart Images

Figure CN119397317B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic power generation and involves feature extraction and prediction of historical data, specifically a method for local time-of-day weather prediction based on historical photovoltaic power output data. Background Technology
[0002] Solar power output is highly unpredictable due to weather conditions, and large-scale grid connection of solar power poses challenges to the safe and stable operation of the power system. Therefore, accurate forecasting of solar power generation is crucial to avoid harm to the power system caused by solar grid connection.
[0003] Because photovoltaic (PV) power output fluctuates differently under various weather conditions, many current power forecasting methods typically classify historical PV power output data into similar days based on weather conditions before forecasting. Then, they construct forecasting models for different weather types, selecting the appropriate model based on the weather type of the forecast day. This forecasting process faces at least two challenges: first, how to label the weather types corresponding to historical PV data, i.e., classify similar days; and second, how to determine the weather type for the forecast day or period.
[0004] Currently, the classification of historical similar days in photovoltaic power generation forecasting mainly falls into two categories: the first directly utilizes public weather forecasting systems; the second can be called meteorological factor clustering, which uses unsupervised learning to cluster historical meteorological parameters to obtain the types of historical similar days. However, both methods require meteorological information provided by meteorological departments to select similar days. In fact, on the one hand, the meteorological information provided by meteorological departments often only covers large areas such as provinces or cities divided by administrative regions, which is far from sufficient for the spatial resolution of photovoltaic power plants; on the other hand, the weather forecasts provided by meteorological departments often give a weather type on a daily basis, and this temporal resolution cannot meet the accuracy requirements of short-term photovoltaic power output forecasting models for weather types. In addition, public weather forecasts are often inaccurate.
[0005] Besides analyzing similar day weather types from historical samples, effectively classifying the weather type for the forecast day is another key factor in improving the accuracy of photovoltaic power output forecasts. Similar to determining the day type from historical samples, the most direct method for determining the weather type for the forecast day or period is also to use weather forecast results. As mentioned earlier, public weather forecasts suffer from insufficient spatiotemporal resolution for photovoltaic power plants; therefore, directly using weather forecasts to determine the weather type for the forecast day often leads to reduced forecast accuracy. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention proposes a localized time-series weather forecasting method based on historical photovoltaic (PV) output data. It constructs a fluctuation feature vector for each effective PV output period within a day, and uses the K-means algorithm to cluster the fluctuation feature vector sequences within each sub-period, thereby classifying and labeling historical time-series weather types. Finally, it reconstructs the historical fluctuation feature sequences using a multivariate phase space, inputs it into a convolutional-long short-term memory (LSTM) network to predict future PV output fluctuation feature vectors, and determines the daily time-series weather types in local areas, thus solving the problems of insufficient weather forecast accuracy and spatial resolution.
[0007] The localized time-of-weather forecasting method based on historical photovoltaic power output data includes the following steps:
[0008] Step 1: Divide the effective photovoltaic power output time period within the day and extract the fluctuation amplitude sequence of each sub-time period based on mode decomposition.
[0009] Step 2: Calculate the frequency sequence of photovoltaic power output data in each sub-time period, and use the fluctuation amplitude sequence and fluctuation frequency sequence as the fluctuation feature vector of photovoltaic power output data in each sub-time period.
[0010] Step 3: Perform unsupervised clustering on the fluctuation feature vectors within the same sub-time period, and take the weather type corresponding to the cluster center as the weather type of all feature sequences in the cluster to complete the local time-series weather type classification.
[0011] Step 4: Use a multivariate phase space reconstruction algorithm to reconstruct the sequence composed of fluctuation characteristics of the same sub-time period over multiple consecutive days, and reconstruct the fluctuation amplitude sequence and the fluctuation number sequence into the same phase space.
[0012] Step 5: Input the phase space reconstruction result into the convolutional-long short-term memory network model to obtain the sub-time period fluctuation feature sequence of the predicted day.
[0013] Step 6: Calculate the distance between the prediction results and each cluster center in Step 3, select the weather type of the cluster center with the smallest distance as the weather type for the predicted day and time period, and complete the local time-sharing weather type prediction.
[0014] The present invention has the following beneficial effects:
[0015] By leveraging the strong correlation between weather changes and photovoltaic power output fluctuations, weather type clustering is performed based on historical time-of-use photovoltaic power output fluctuation characteristics. This improves the problem of mismatch between prediction models and weather types caused by using a single weather type to describe multiple weather type transitions within a day, and effectively improves clustering accuracy. Attached Figure Description
[0016] Figure 1A flowchart for classifying local time-of-day weather types based on historical photovoltaic power output data;
[0017] Figure 2 The examples show the clustering distribution and corresponding typical photovoltaic output curves for the first half of the day.
[0018] Figure 3 The examples show the clustering distribution and corresponding typical photovoltaic output curves for the second half of the day.
[0019] Figure 4 This is a comparison of the contour coefficients of the weather type classification in the first half of the day in the example.
[0020] Figure 5 This is a comparison of the contour coefficients for the weather type classification in the second half of the day in the example.
[0021] Figure 6 This is a schematic diagram of the prediction of the first half-day fluctuation feature sequence based on a convolutional-long short-term memory network.
[0022] Figure 7 This is a flowchart for forecasting localized, time-specific weather types. Detailed Implementation
[0023] The present invention will be further explained below with reference to the accompanying drawings;
[0024] Step 1: Divide the effective photovoltaic output period of 8:00 to 17:00 within the day into two sub-periods: the first half of the day from 8:00 to 12:30 and the second half of the day from 12:30 to 17:00.
[0025] By combining these sequences, approximate clear-sky sequences for each sub-time period are obtained, replacing the completely clear-sky sequences that reflect fixed trends such as seasonal changes and day-night alternation.
[0026]
[0027] Where m and d represent the month index and date index respectively, m = 1, 2, ..., 12, d = 1, 2, ..., daynum, and daynum is the total number of days in the month. This represents the instantaneous power at the i-th moment on the d-th day of month m. Let be the maximum instantaneous photovoltaic power output at time i in month m. This is considered the ideal photovoltaic power output at time i. The ideal photovoltaic power outputs at all times together constitute the ideal photovoltaic power output sequence Tr. (m) , which is an approximate clear sky sequence for the sub-time period of photovoltaic power generation in the m-th month, and N represents the number of sampling points in the sub-time period.
[0028] For a given photovoltaic power output sequence P = {p1, p2, ..., p...} i ,...,p NEmpirical mode decomposition is performed to obtain the trend sequence Q = {q1, q2, ..., q} of the photovoltaic power output sequence. i ,...,q N}
[0029] Due to the influence of weather factors such as temperature, humidity, and cloud cover, the trend of photovoltaic power output sequence changes under different weather types will exhibit different forms. Therefore, the actual photovoltaic power output sequence trend Q differs from the approximate clear sky sequence Tr of the same month. (m) There will be some differences. Calculate the Euclidean distance between the two and use it as a quantitative indicator of the fluctuation amplitude, f1.
[0030]
[0031] Step 2: Count the number of fluctuations f2 of the photovoltaic power output sequence P within a sub-time period. The condition for a valid fluctuation is:
[0032] (p i+1 -p i (p) i -p i-1 )<0
[0033] Where, p i-1 p i p i+1 This is a continuous sampling data of three photovoltaic power outputs.
[0034] The quantitative index f1 of fluctuation amplitude and the number of fluctuations f2 are used together as fluctuation characteristic indices of the photovoltaic power output sequence P, and then normalized.
[0035]
[0036] Where a = 1, 2, f a f represents the original value of the volatility characteristic indicator. a (min), f a (max) represents the minimum and maximum values of the feature sequence, respectively. a ' represents the normalized value of the volatility characteristic index. A two-dimensional volatility characteristic vector F is used. h =(f′) 1h ,f′ 2h ) represents the characteristics of the time period sequence on day h.
[0037] Step 3: Cluster the time-series fluctuation characteristics using K-means.
[0038] The K-means algorithm is used to cluster the feature sequences of the first and second half of the day into K categories. The weather type corresponding to the cluster center is determined, and the weather type of the cluster center is used as the weather type of all feature sequences in that cluster. This allows the historical weather type to be labeled, thus completing the local time-series weather type classification.
[0039] The overall flowchart for obtaining time-of-use weather types by clustering based on the time-of-use photovoltaic power output fluctuation characteristics is as follows: Figure 1 As shown, in this embodiment, all time-of-use photovoltaic power output fluctuation characteristics are divided into three categories: sunny, cloudy, and overcast / rainy, therefore K=3. The cluster distributions for the first and second halves of the day and the corresponding typical photovoltaic output curves are shown below. Figure 2 , Figure 3 As shown.
[0040] To evaluate the effectiveness of the two fluctuation characteristic indices used in this embodiment for clustering time-of-use photovoltaic power output sequences, the silhouette coefficients of photovoltaic power generation curves with the same weather type within the clustered clusters were calculated. Furthermore, the silhouette coefficients obtained from two other classification methods were compared: one method directly determined the time-of-use weather type based on the all-day weather forecast; the other method used K-means clustering based on the mean and variance of the power curves to identify the time-of-use weather type. The comparison results of the weather type classification silhouette coefficients for the first and second halves of the day are shown below. Figure 4 , Figure 5 As shown. From Figure 4 and Figure 5 As can be seen, compared with the other two benchmark methods, the time-sharing clustering algorithm used in this method performs better in both the first and second halves of the day. It is particularly outstanding on sunny and cloudy / rainy days, with SC values of 0.574 and 0.601 for sunny and cloudy / rainy days in the first half of the day, and 0.461 and 0.533 for the same conditions in the second half of the day.
[0041] Step 4: Multivariable phase space reconstruction of the fluctuation feature sequence
[0042] The normalized fluctuation amplitude sequence x1 = (f') within consecutive identical sub-time periods 11 ,f' 12 ,...,f' 1M ), fluctuation sequence x2=(f' 21 ,f' 22 ,...,f' 2M To construct a multivariate time series X, determine the univariate delay time τ. a and embedding dimension m a Phase space reconstruction is performed to obtain the phase point V of the multivariate sequence. j :
[0043]
[0044] Where j = J, J+1, ..., M, M represents the length of the univariate time series. J is the initial time in the multivariate phase space.
[0045]
[0046] All historical phase points together form the phase space V:
[0047] V = [V(J), V(J+1), ..., V(M)]
[0048] Step 5: Time-sharing feature sequence prediction
[0049] Two temporally consecutive phase points after reconstruction are combined to form a phase point pair, resulting in a phase point pair sequence ((V(J),V(J+1)),(V(J+1),V(J+2)),…(V(N-1),V(M))). This phase point pair sequence is used to train the relevant parameters of the convolutional-long short-term memory network prediction model. The phase point V(j) at the previous time j in the phase point pair is used as the input data of the prediction model; the phase point V(j+1) at time j+1 is used as the output data of the prediction model. The first value of each variable sequence in the output data is extracted as the time-series fluctuation feature sequence p(x,y) for the prediction day, as follows. Figure 6 As shown.
[0050] Step 6: Determine the weather type for each time period
[0051] After obtaining the time-sharing fluctuation characteristic sequence of the predicted day through the above process, the distance between the predicted sequence and each cluster center obtained in step 3 is calculated:
[0052] d k =||p(x,y)-C k ||
[0053] Among them, C k Let d be the feature sequence corresponding to the k-th cluster center. k To predict the intraday fluctuation characteristic sequence and C k The Euclidean distance; k = 1, 2, 3. The weather type corresponding to the cluster center with the smallest distance from the intra-hourly fluctuation feature sequence of the prediction day is taken as the intra-hourly weather type of the prediction day, thus completing the local intra-hourly weather type prediction. The flowchart for obtaining the intra-hourly weather type of the prediction day based on the fluctuation feature sequence is as follows: Figure 7 As shown.
[0054] To verify the effectiveness of this method in time-series weather type prediction, historical power generation data from the Hangzhou Dianzi University grid-connected photovoltaic microgrid demonstration system for 40 consecutive days between November and December 2022 were selected as the test set for simulation experiments. The phase point pair sequences were directly input into a convolutional neural network, and the multivariate time series X was directly input into a convolutional-long short-term memory network for comparative experiments. The prediction results for the first and second half of the day are shown in Tables 1 and 2, respectively.
[0055] Table 1
[0056]
[0057]
[0058] Table 2
[0059]
[0060] As shown in Table 1, after predicting the weather type for the first half of the day, the predicted weather type of this method was the same as the cluster label for 7, 6, and 16 days out of 40 days, totaling 29 days, with a prediction accuracy of 72.5%. The prediction results of the multivariate phase space reconstruction-convolutional neural network were the same as the cluster label for 23 days, with a prediction accuracy of 57.5%. The prediction results of the convolutional-long short-term memory network were the same as the cluster label for 19 days, with a prediction accuracy of 47.5%.
[0061] As shown in Table 2, after predicting the second half of the day, the predicted weather type using this method was the same as the cluster label for 6, 4, and 17 days out of 40 days, totaling 27 days, with a prediction accuracy of 67.5%. The prediction results of the multivariate phase space reconstruction-convolutional neural network were the same as the cluster label for 24 days, with a prediction accuracy of 60%. The prediction results of the convolutional-long short-term memory network were the same as the cluster label for 18 days, with a prediction accuracy of 45%.
[0062] The results show that the method can achieve better prediction results for weather types in each sub-time period.
Claims
1. A localized time-of-day weather forecasting method based on historical photovoltaic power output data, characterized in that: Specifically, the following steps are included: Step 1: Classify the weather types corresponding to historical photovoltaic power output data, specifically including the following steps: s1.
1. Divide the effective photovoltaic power output time period within the day, and extract the fluctuation amplitude sequence of each sub-time period based on mode decomposition; the calculation method for fluctuation amplitude f1 is as follows: Where, q i This represents the trend of photovoltaic power output data at time i obtained from empirical mode decomposition, where N represents the number of sampling points within the sub-time period, and tr i (m) Let be the maximum instantaneous photovoltaic power output at time i for all natural days of month m; s1.2 Statistically analyze the frequency sequence of photovoltaic power output data within each sub-time period, and use the fluctuation amplitude sequence and fluctuation frequency sequence as the fluctuation feature vector of the photovoltaic power output data for each sub-time period; the fluctuation frequency is the number of effective fluctuations in the photovoltaic power output data within the sub-time period, and the condition for one effective fluctuation is defined as: (p i+1 -p i )(p i -p i-1 )<0 Where, p i-1 p i p i+1 This represents three consecutive photovoltaic power output data points. s1.
3. Use the K-means algorithm to cluster the fluctuation feature vectors within the same sub-time period, and take the weather type corresponding to the cluster center as the weather type of all feature sequences in the cluster, to obtain three categories: cloudy / rainy, sunny or cloudy, thus completing the local time-sharing weather type classification. Step 2: Use a multivariate phase space reconstruction algorithm to reconstruct the sequence composed of fluctuation characteristics of the same sub-time period over multiple consecutive days, and reconstruct the fluctuation amplitude sequence and the fluctuation number sequence into the same phase space; Step 3: Input the phase space reconstruction result into the convolutional-long short-term memory network model to obtain the sub-time period fluctuation feature sequence of the predicted day; Step 4: Calculate the distance between each cluster center in the classification process of the prediction results and historical photovoltaic power output data, select the weather type of the cluster center with the smallest distance as the weather type for the predicted day and time period, and complete the local time-sharing weather type prediction.
2. The local time-series weather forecasting method based on historical photovoltaic power output data as described in claim 1, characterized in that: The normalized fluctuation amplitude sequence x1 = (f') within consecutive identical sub-time periods 11 ,f' 12 ,...,f' 1M ), fluctuation sequence x2=(f' 21 ,f' 22 ,...,f' 2M To construct a multivariate time series X, determine the univariate delay time τ. a and embedding dimension m a Phase space reconstruction is performed to obtain the phase point V of the multivariate sequence. j : Where j = J, J+1, ..., M, M represents the length of the univariate time series; J is the initial time of the multivariate phase space. All historical phase points together form the phase space V: V = [V(J),V(J+1),…,V(M)].
3. The local time-series weather forecasting method based on historical photovoltaic power output data as described in claim 1, characterized in that: Two temporally consecutive phase points after reconstruction are used to form a phase point pair, resulting in a phase point pair sequence. The phase point V(j) at the previous time j in the phase point pair is used as the input data of the prediction model, and the phase point V(j+1) at time j+1 is used as the label of the output data of the prediction model to train the relevant parameters of the convolutional-long short-term memory network prediction model.
Citation Information
Patent Citations
Weather type division method based on photovoltaic power generation symbol sequence histogram clustering
CN115982601A
Photovoltaic intraday output prediction method and device
CN118279084A