Method for predicting load of photovoltaic power station
By adaptively adjusting the sliding window and improving multi-stage feature selection of correlation analysis, combined with a model that integrates gating loops and attention mechanisms, the problem of ignoring external factors and subjective influence in photovoltaic power plant load forecasting is solved, improving forecast accuracy and reliability.
Patent Information
- Application Number
- CN202410859607.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing photovoltaic power plant load forecasting methods mainly rely on historical data and ignore the influence of external factors such as meteorology, and data processing is affected by subjective factors, resulting in insufficient forecast accuracy.
A sliding window is used to adaptively dynamically adjust the data, combined with improved correlation analysis for multi-stage feature selection, a two-dimensional feature grayscale map is constructed, and a model that combines gating loops and attention mechanisms is used for load forecasting.
It improves the accuracy and reliability of photovoltaic power plant load forecasting, takes into account the deep characteristic relationships between data, and overcomes the shortcomings of relying solely on historical data and subjective factors.
Smart Images

Figure CN118710077A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of photovoltaics, and in particular relates to a method for predicting a load of a photovoltaic power station. Background Art
[0002] In recent years, with the rapid development of the global economy and society, energy consumption has shown a substantial upward trend. Seeking efficient, clean and renewable energy is a necessary means to resolve the contradiction between the continued growth of energy demand and the deteriorating ecological environment.
[0003] With the large-scale construction of photovoltaic power stations, photovoltaic power generation has gradually become an important way to obtain electricity, and the flexibility of distribution network operation has been greatly improved. However, the photovoltaic load is random, intermittent and volatile, which brings challenges to the operation decision-making of the power grid. Accurate prediction of photovoltaic power station load is the basis for distribution network operation decision-making.
[0004] At present, there have been many studies on photovoltaic load forecasting. However, these studies often only use historical load data for short-term load forecasting, ignoring the significant impact of external factors such as meteorology on the load of photovoltaic power plants. In addition, when processing load data, many studies are often affected by subjective factors in data correlation analysis and feature selection. These problems limit the accuracy of load forecasting. Summary of the invention
[0005] The purpose of the present invention is to propose a method for predicting the load of a photovoltaic power station in view of the above-mentioned deficiencies in the prior art. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0006] The present invention provides a method for predicting a load of a photovoltaic power station, the method comprising:
[0007] Acquire a sample data sequence including a plurality of sample data, and perform adaptive dynamic adjustment based on a sliding window on each sample data in the sample data sequence to obtain an adjusted sample data sequence, wherein the adjusted sample data sequence includes a plurality of adjusted historical load data and a plurality of adjusted external influencing factor data;
[0008] Performing multi-stage feature selection based on improved association analysis on all the adjusted historical load data and all the adjusted external influencing factor data, respectively, to obtain a number of historical load selection data based on feature selection and a number of external influencing factor selection data based on feature selection;
[0009] Performing enhanced variable dimension coding on the one-dimensional time series features composed of the historical load selection data and the external influencing factor selection data in the same time period to obtain a two-dimensional feature grayscale map, wherein all the two-dimensional feature maps in all time periods constitute a feature grayscale map set;
[0010] The two-dimensional feature grayscale images in the gray feature image set are sequentially used based on a load prediction model integrating gated loop and attention mechanism to obtain a prediction result of the photovoltaic power station load.
[0011] In one embodiment of the present invention, the sample data sequence includes a historical load data sequence and an external influencing factor data sequence, the historical load data sequence includes multiple historical load data, the external influencing factor data sequence includes a temperature data sequence, a relative humidity data sequence and a radiation intensity data sequence, the temperature data sequence includes multiple temperature data, the relative humidity data sequence includes multiple relative humidity data, and the radiation intensity data sequence includes multiple radiation intensity data.
[0012] In one embodiment of the present invention, all of the sample data include a plurality of historical load data and a plurality of external influencing factor data;
[0013] Performing adaptive dynamic adjustment based on a sliding window on each of the sample data to obtain an adjusted sample data sequence, including:
[0014] Based on a mapping formula, each of the historical load data and each of the external influencing factor data are respectively mapped to the interval [0,1] to obtain a plurality of mapped historical load data and a plurality of mapped external influencing factor data; the mapping formula is expressed as:
[0015]
[0016] Wherein, x' is the mapped historical load data or the mapped external influencing factor data, x is the historical load data or the external influencing factor data, min(x) is the minimum value of all historical load data or all external influencing factor data, and max(x) is the maximum value of all historical load data or all external influencing factor data;
[0017] Based on the standardization formula, each of the mapped historical load data and each of the mapped external influencing factor data is standardized to obtain the multiple adjusted historical load data and the multiple adjusted external influencing factor data; the standardization formula is expressed as:
[0018]
[0019] Where x″ is the adjusted historical load data or the adjusted external influencing factor data, μ is the data mean, σ is the data standard deviation, θ1 and θ2 are both non-zero constants, and the value range of θ1 and θ2 is [0.001, 0.0001].
[0020] In one embodiment of the present invention, before performing multi-stage feature selection based on improved association analysis on all the adjusted historical load data and all the adjusted external influencing factor data, the method further includes:
[0021] For the newly added sample data, based on the mapping formula, the newly added sample data is mapped to the interval [0, 1] to obtain the mapped sample data;
[0022] Based on the standardized formula constructed according to the updated mean and the updated variance, the mapped sample data is standardized to obtain the adjusted sample data; the updated mean and the updated variance are respectively expressed as:
[0023]
[0024]
[0025] Among them, μ(t+1) is the updated data mean at the current time t+1, σ(t+1) is the updated data variance at the current time t+1, μ(t) is the data mean at the previous time t, σ(t) is the data variance at the previous time t, x(t+1) is the newly added sample data at the current time t+1, is the mean of the sample data at the current time t+1, and α is the sliding window coefficient.
[0026] In one embodiment of the present invention, all the adjusted historical load data and all the adjusted external influencing factor data are respectively subjected to multi-stage feature selection based on improved association analysis to obtain a number of historical load selection data based on feature selection and a number of external influencing factor selection data based on feature selection, including:
[0027] Based on the improved clustering method, all the adjusted historical load data and all the adjusted external influencing factor data are clustered respectively to obtain a first optimal number of clustering clusters corresponding to the adjusted historical load data and a second optimal number of clustering clusters corresponding to the adjusted external influencing factor data;
[0028] Replacing each of the adjusted historical load data with the cluster center value of the cluster where the number of clusters is the first optimal number of clusters, to obtain a plurality of replaced historical load data, and replacing each of the adjusted external influencing factor data with the cluster center value of the cluster where the number of clusters is the second optimal number of clusters, to obtain a plurality of replaced external influencing factor data;
[0029] Based on a historical load replacement data sequence composed of all the replaced historical load data in a cluster and an external influencing factor replacement data sequence composed of all the replaced external influencing factor data in a cluster, a symmetric correction information value is obtained;
[0030] Based on the correlation analysis, weakly correlated feature elimination processing is performed on each of the historical load replacement data sequences and each of the external influencing factor replacement data sequences according to the symmetric correction information value, and a number of historical load optimization data sequences and a number of external influencing factor optimization data sequences are correspondingly obtained;
[0031] Based on redundancy analysis, redundant features are deleted from each historical load optimization data in each historical load optimization data sequence and each external influencing factor optimization data in each external influencing factor optimization data sequence to obtain a number of historical load selection data and a number of external influencing factor selection data.
[0032] In one embodiment of the present invention, the improved clustering method comprises:
[0033] S1, set the maximum number of clusters K;
[0034] S2. In the k-round clustering, all the data to be clustered are clustered based on the k-means clustering algorithm to generate k clusters, wherein the data to be clustered is the adjusted historical load data or the adjusted external influencing factor data, and 1≤k≤K;
[0035] S3, calculating the silhouette coefficient of each of the data to be clustered, and obtaining the average silhouette coefficient when the cluster is k based on the silhouette coefficients of all the data to be clustered. The average silhouette coefficient when the cluster is k is expressed as:
[0036]
[0037] Wherein, l0(k) is the average silhouette coefficient when the cluster number is k, C is the total number of data to be clustered, l(c) is the silhouette coefficient of the cth data to be clustered, δ is a non-zero constant, and the value range of δ is [0.001, 0.0001];
[0038] S4, jump to step S2, perform k+1 rounds of clustering to obtain the average silhouette coefficient when the cluster is k+1, until the average silhouette coefficient when the cluster is K is obtained, and select the number of clusters corresponding to the maximum value of the K average silhouette coefficients as the optimal number of clusters.
[0039] In one embodiment of the present invention, the symmetry correction information value is expressed as:
[0040]
[0041]
[0042] Among them, SMI(U;W) is the symmetrically corrected information value between the external influencing factor replacement data sequence U and the historical load replacement data sequence W, C(U) is the information entropy of the external influencing factor replacement data sequence U, C(W) is the information entropy of the historical load replacement data sequence W, I(U;W) is the mutual information value between the external influencing factor replacement data sequence U and the historical load replacement data sequence W, u(i) is the i-th value in the external influencing factor replacement data sequence U, w(j) is the j-th value in the historical load replacement data sequence W, c u is the second best number of clusters, c w is the first optimal number of clusters, P(u(i), w(j)) is the proportion of sampling points that satisfy the external influencing factor replacement data u(i) and the historical load replacement data w(j) to the total sampling points, P(u(i)) is the proportion of sampling points that satisfy the external influencing factor replacement data u(i) to the total sampling points, and P(w(j)) is the proportion of sampling points that satisfy the historical load replacement data w(j) to the total sampling points.
[0043] In one embodiment of the present invention, based on correlation analysis, weakly correlated feature elimination processing is performed on each of the historical load replacement data sequences and each of the external influencing factor replacement data sequences according to the symmetric correction information value, and a number of historical load optimization data sequences and a number of external influencing factor optimization data sequences are correspondingly obtained, including:
[0044] Determine whether the symmetric correction information value corresponding to the historical load replacement data sequence is less than a first threshold value, if so, delete the historical load replacement data sequence, if not, retain the historical load replacement data sequence, and use the retained historical load replacement data sequence as the historical load optimization data sequence;
[0045] Determine whether the symmetry correction information value corresponding to the external influencing factor replacement data sequence is less than a second threshold value. If so, delete the external influencing factor replacement data sequence; if not, retain the external influencing factor replacement data sequence, and use the retained external influencing factor replacement data sequence as the external influencing factor optimization data sequence.
[0046] In one embodiment of the present invention, based on redundancy analysis, redundant features are deleted from each historical load optimization data in each historical load optimization data sequence and each external influencing factor optimization data in each external influencing factor optimization data sequence to obtain a plurality of historical load selection data and a plurality of external influencing factor selection data, including:
[0047] Determine the relationship between any two historical load optimization data in the historical load optimization data sequence. If MI(U example1 ;W)>MI(U example2 ; W), and MI(U example1 ; U eample2 )>MI(U example2 ; W), then U example2 The historical load optimization data that is not deleted is used as the historical load selection data, wherein U example1 and U example2 For two historical load optimization data, MI(U example1 ; W) is the historical load optimization data U example1 The mutual information value of the historical load replacement data sequence W, MI(U example2 ; W) is the historical load optimization data U example2 The mutual information value of the historical load replacement data sequence W, MI(U example1 ; U sample2 ) is the historical load optimization data U example1 With historical load optimization data U example2 The mutual information value of .
[0048] In one embodiment of the present invention, enhanced variable dimension encoding is performed on the one-dimensional time series features consisting of the historical load selection data and the external influencing factor selection data in the same time period to obtain a two-dimensional feature grayscale image, including:
[0049] Constructing the one-dimensional time series feature by using the historical load selection data and the external influencing factor selection data in the same time period;
[0050] Based on the enhanced variable dimension coding formula, the one-dimensional time series feature is enhanced variable dimension coding to obtain an initial two-dimensional feature grayscale image. The enhanced variable dimension coding formula is expressed as:
[0051]
[0052] Where P(m, n) is the value of the mth row and nth column of the initial two-dimensional feature grayscale image, L is the one-dimensional time series feature, min(L) is the minimum value of the one-dimensional time series feature, max(L) is the maximum value of the one-dimensional time series feature, N×N is the size of the initial two-dimensional feature grayscale image, and round{·} is rounding;
[0053] Based on the image enhancement formula, the initial two-dimensional feature grayscale image is enhanced to obtain the two-dimensional feature grayscale image. The image enhancement formula is expressed as:
[0054] EH(m,n)=ρ(P(m,n)+β)γ
[0055] Among them, EH(m,n) is the value of the mth row and nth column of the two-dimensional feature grayscale image, ρ is the scaling factor, β is the offset, and γ is the enhancement coefficient.
[0056] In one embodiment of the present invention, the load forecasting model includes a convolutional attention mechanism module, a gated recurrent unit and a network head;
[0057] The two-dimensional feature grayscale images in the feature grayscale image set are sequentially used based on the load prediction model integrating the gated loop and the attention mechanism to obtain the prediction result of the photovoltaic power station load, including:
[0058] Input the two-dimensional feature grayscale image into the convolutional attention mechanism module to obtain a feature map F;
[0059] Perform a channel attention mechanism operation on the feature map F to obtain a channel feature map F′;
[0060] Performing a spatial attention mechanism operation on the channel feature map F′ to obtain a spatial feature map F″;
[0061] Obtain a final feature map F″′ according to the channel feature map F′ and the spatial feature map F″;
[0062] Inputting the final feature map F″′ into the gated recurrent unit to obtain an output feature map;
[0063] The output characteristic graph is input into the network head to obtain the prediction result of the photovoltaic power station load.
[0064] Beneficial effects of the present invention:
[0065] The self-learning load forecasting method for photovoltaic power stations provided by the present invention combines external influencing factor data and historical load data into an initial sample set, thereby solving the problem of only considering the load and ignoring other important factors; and performing multi-stage feature selection based on improved association analysis, overcoming the disadvantage that association analysis is too subjectively influenced; constructing a feature grayscale map and using a load forecasting model based on a fusion gated loop and an attention mechanism for model prediction, taking into account the deep feature relationship between the data, improving the model performance, and realizing reliable self-learning load forecasting for photovoltaic power stations.
[0066] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 It is a flow chart of a method for predicting a photovoltaic power station load provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0068] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0069] Embodiment 1
[0070] See also Figure 1 , Figure 1 1 is a flow chart of a method for predicting a load of a photovoltaic power station provided by an embodiment of the present invention. The method for predicting a load of a photovoltaic power station provided by an embodiment of the present invention includes:
[0071] Step 1: obtaining a sample data sequence including a plurality of sample data, and performing adaptive dynamic adjustment based on a sliding window on each sample data in the sample data sequence to obtain an adjusted sample data sequence, wherein the adjusted sample data sequence includes a plurality of adjusted historical load data and a plurality of adjusted external influencing factor data;
[0072] Here, all sample data include multiple historical load data and multiple external influencing factor data; the initial sample data sequence is composed of the historical load data sequence and the external influencing factor data sequence recorded by the photovoltaic power station, wherein the historical load data sequence includes multiple historical load data, the external influencing factor data sequence includes a temperature data sequence, a relative humidity data sequence and a radiation intensity data sequence, the temperature data sequence includes multiple temperature data, the relative humidity data sequence includes multiple relative humidity data, and the radiation intensity data sequence includes multiple radiation intensity data.
[0073] For example, historical data of a photovoltaic power station for one year is selected as the initial sample data, and the daily load data of the photovoltaic power station is recorded at intervals of 60 minutes.
[0074] In this embodiment, in order to improve the interpretability of the data and enhance the stability of the subsequently constructed model, each sample data in the sample data sequence is adaptively and dynamically adjusted based on a sliding window.
[0075] Specifically, each of the sample data is adaptively and dynamically adjusted based on a sliding window to obtain an adjusted sample data sequence, including:
[0076] S1.1. Based on the mapping formula, each historical load data and each external influencing factor data are mapped to the interval [0, 1] to obtain multiple mapped historical load data and multiple mapped external influencing factor data; the mapping formula is expressed as:
[0077]
[0078] Wherein, x' is the mapped historical load data or the mapped external influencing factor data, x is the historical load data or the external influencing factor data, min(x) is the minimum value of all historical load data or all external influencing factor data, and max(x) is the maximum value of all historical load data or all external influencing factor data;
[0079] S1.2. Based on the standardization formula, each mapped historical load data and each mapped external influencing factor data are standardized to obtain a plurality of adjusted historical load data and a plurality of adjusted external influencing factor data; the standardization formula is expressed as:
[0080]
[0081] Where x″ is the adjusted historical load data or the adjusted external influencing factor data, μ is the data mean, σ is the data standard deviation, θ1 and θ2 are both non-zero constants, and the value range of θ1 and θ2 is [0.001, 0.0001].
[0082] In addition, if new sample data is added, the following steps are performed on the newly added sample data:
[0083] S2.1. For the newly added sample data, based on the mapping formula, the newly added sample data is mapped to the interval [0, 1] to obtain the mapped sample data.
[0084] S2.2. Based on the standardized formula constructed according to the updated mean and the updated variance, the mapped sample data is standardized to obtain the adjusted sample data; the updated mean and the updated variance are respectively expressed as:
[0085]
[0086]
[0087] Among them, μ(t+1) is the updated data mean at the current time t+1, σ(t+1) is the updated data variance at the current time t+1, μ(t) is the data mean at the previous time t, σ(t) is the data variance at the previous time t, x(t+1) is the newly added sample data at the current time t+1, is the mean of the sample data at the current time t+1, α is the sliding window coefficient, and the value of α is, for example, 0.7.
[0088] Step 2: Perform multi-stage feature selection based on improved association analysis on all adjusted historical load data and all adjusted external influencing factor data, and obtain a number of historical load selection data based on feature selection and a number of external influencing factor selection data based on feature selection.
[0089] Step 2.1: Based on the improved clustering method, all adjusted historical load data and all adjusted external influencing factor data are clustered respectively to obtain the first optimal number of clustering clusters corresponding to the adjusted historical load data and the second optimal number of clustering clusters corresponding to the adjusted external influencing factor data.
[0090] In an optional embodiment, the improved clustering method includes:
[0091] S1. Set the maximum number of clusters K.
[0092] S2. In the k-round clustering, all the data to be clustered are clustered based on the k-means clustering algorithm to generate k clusters, where the data to be clustered are adjusted historical load data or adjusted external influencing factor data, 1≤k≤K.
[0093] Specifically, the round of clustering set in this embodiment is the same as the number of clusters clustered in the round of clustering, and the k-means clustering algorithm is used to cluster the adjusted historical load data and the adjusted external influencing factor data respectively.
[0094] S3. Calculate the silhouette coefficient of each data to be clustered. Based on the silhouette coefficients of all data to be clustered, obtain the average silhouette coefficient when the cluster is k. The average silhouette coefficient when the cluster is k is expressed as:
[0095]
[0096] Wherein, l0(k) is the average silhouette coefficient when the cluster number is k, C is the total number of data to be clustered, l(c) is the silhouette coefficient of the cth data to be clustered, δ is a non-zero constant, and the value range of δ is [0.001, 0.0001];
[0097] S4, jump to step S2, perform k+1 rounds of clustering to obtain the average silhouette coefficient when the cluster is k+1, until the average silhouette coefficient when the cluster is K is obtained, and select the number of clusters corresponding to the maximum value of the K average silhouette coefficients as the optimal number of clusters.
[0098] Here, clustering the adjusted historical load data according to the above steps finally obtains the first optimal number of clustering clusters, and clustering the adjusted external influencing factor data according to the above steps finally obtains the second optimal number of clustering clusters.
[0099] Step 2.2, replace each adjusted historical load data with the cluster center value of the cluster where the number of clusters is the first optimal number of clusters, to obtain multiple replaced historical load data, replace each adjusted external influencing factor data with the cluster center value of the cluster where the number of clusters is the second optimal number of clusters, to obtain multiple replaced external influencing factor data.
[0100] Specifically, in order to avoid the problem of unreasonable correlation analysis caused by slight numerical differences, the data after the improved clustering operation is used to replace the original data. The adjusted historical load data is replaced by the cluster center value w(c) of the cluster when the number of clusters is the first optimal number of clusters, and all w(c) constitute a sequence W. The adjusted external influencing factor data is replaced by the cluster center value u(c) of the cluster when the number of clusters is the second optimal number of clusters, and all u(c) constitute a sequence U.
[0101] Step 2.3: Based on a historical load replacement data sequence consisting of all replaced historical load data in a cluster and an external influencing factor replacement data sequence consisting of all replaced external influencing factor data in a cluster, a symmetric correction information value is obtained.
[0102] Here, the symmetric correction information value is expressed as:
[0103]
[0104]
[0105] Among them, SMI(U;W) is the symmetrically corrected information value between the external influencing factor replacement data sequence U and the historical load replacement data sequence W, C(U) is the information entropy of the external influencing factor replacement data sequence U, C(W) is the information entropy of the historical load replacement data sequence W, I(U;W) is the mutual information value between the external influencing factor replacement data sequence U and the historical load replacement data sequence W, u(i) is the i-th value in the external influencing factor replacement data sequence U, w(j) is the j-th value in the historical load replacement data sequence W, c u is the second best number of clusters, c w is the first optimal number of clusters, P(u(i), w(j)) is the proportion of sampling points that satisfy the external influencing factor replacement data u(i) and the historical load replacement data w(j) to the total sampling points, P(u(i)) is the proportion of sampling points that satisfy the external influencing factor replacement data u(i) to the total sampling points, and P(w(j)) is the proportion of sampling points that satisfy the historical load replacement data w(j) to the total sampling points.
[0106] Step 2.4: Based on the correlation analysis, weakly correlated features are eliminated for each historical load replacement data sequence and each external influencing factor replacement data sequence according to the symmetric correction information value, and a number of historical load optimization data sequences and a number of external influencing factor optimization data sequences are obtained accordingly.
[0107] Step 2.41, determine whether the symmetric correction information value corresponding to the historical load replacement data sequence is less than the first threshold value. If so, delete the historical load replacement data sequence; if not, retain the historical load replacement data sequence and use the retained historical load replacement data sequence as the historical load optimization data sequence.
[0108] For example, the first threshold is 0.6.
[0109] Step 2.42, determine whether the symmetric correction information value corresponding to the external influencing factor replacement data sequence is less than the second threshold value. If so, delete the external influencing factor replacement data sequence; if not, retain the external influencing factor replacement data sequence, and use the retained external influencing factor replacement data sequence as the external influencing factor optimization data sequence.
[0110] For example, the second threshold is 0.4.
[0111] It should be noted that the order of step 2.41 and step 2.42 may also be swapped, and this embodiment does not specifically limit this.
[0112] Step 2.5: Based on redundancy analysis, redundant features are deleted for each historical load optimization data in each historical load optimization data sequence and each external influencing factor optimization data in each external influencing factor optimization data sequence to obtain a number of historical load selection data and a number of external influencing factor selection data.
[0113] Specifically, the relationship between any two historical load optimization data in the historical load optimization data sequence is determined. If MI(U example1 ;W)>MI(U example2 ; W), and MI(U example1 ; U eample2 )>MI(U example2 ; W), then U example2 Delete, the historical load optimization data that is not deleted is used as the historical load selection data, where U example1 and U example2 For two historical load optimization data, MI(U example1 ; W) is the historical load optimization data U example1 The mutual information value of the historical load replacement data sequence W, MI(U example2 ; W) is the historical load optimization data U example2The mutual information value of the historical load replacement data sequence W, MI(U example1 ; U sample2 ) is the historical load optimization data U example1 With historical load optimization data U example2 The mutual information value of .
[0114] Step 3: Perform enhanced variable dimension encoding on the one-dimensional time series features consisting of the historical load selection data and the external influencing factor selection data of the same time period to obtain a two-dimensional feature grayscale map, wherein all two-dimensional feature maps of all time periods constitute a feature grayscale map set.
[0115] For example, historical load selection data and external influencing factor selection data between 8 o'clock and 9 o'clock are set, and these data constitute a one-dimensional time series feature, and then the one-dimensional time series feature is enhanced encoded to obtain a two-dimensional feature grayscale image.
[0116] Step 3.1: Use the historical load selection data and external influencing factor selection data of the same time period to construct a one-dimensional time series feature.
[0117] Step 3.2: Based on the enhanced variable dimension coding formula, the one-dimensional time series feature is enhanced variable dimension encoded to obtain the initial two-dimensional feature grayscale image. The enhanced variable dimension coding formula is expressed as:
[0118]
[0119] Where P(m, n) is the value of the mth row and nth column of the initial two-dimensional feature grayscale image, L is the one-dimensional time series feature, min(L) is the minimum value of the one-dimensional time series feature, max(L) is the maximum value of the one-dimensional time series feature, N×N is the size of the initial two-dimensional feature grayscale image, and round{·} is rounding;
[0120] Step 3.3: Based on the image enhancement formula, the initial two-dimensional feature grayscale image is enhanced to obtain a two-dimensional feature grayscale image. The image enhancement formula is expressed as:
[0121] EH(m,n)=ρ(P(m,n)+β) γ
[0122] Among them, EH(m,n) is the value of the mth row and nth column of the two-dimensional feature grayscale image, ρ is the scaling factor used to adjust the output range, β is the offset used to control the center position, and γ is the enhancement coefficient.
[0123] Step 4: The two-dimensional feature grayscale images in the feature grayscale image set are sequentially applied to the load prediction model integrating the gated loop and the attention mechanism to obtain the prediction result of the photovoltaic power station load.
[0124] Here, the load forecasting model includes a convolutional attention mechanism module, a gated recurrent unit and a network head (boxhead).
[0125] Step 4.1: Input the two-dimensional feature grayscale image into the convolutional attention mechanism module to obtain the feature map F.
[0126] Step 4.2: Perform channel attention mechanism operation on the feature map F to obtain the channel feature map F′.
[0127] Step 4.3: Perform spatial attention mechanism operation on the channel feature map F′ to obtain the spatial feature map F″.
[0128] Step 4.4: Obtain the final feature map F″′ based on the channel feature map F′ and the spatial feature map F″, that is, .
[0129] Step 4.5: Input the final feature map F″′ into the gated recurrent unit to obtain the output feature map.
[0130] Specifically, the final feature map F″′ is input into the gated recurrent unit, and each hidden layer thereof combines the forward and reverse GRU neural network outputs as output.
[0131] Step 4.6: Input the output feature map into the network head to obtain the prediction result of the photovoltaic power station load.
[0132] Specifically, the network head of the model is responsible for processing the regression task, that is, predicting the load of the PV power station as the final output result of the model.
[0133] The evaluation indicators of prediction effect are mean absolute error and root mean square error:
[0134]
[0135]
[0136] Among them, MAE is the mean absolute error, RMSE is the root mean square error, D is the number of moments to be predicted, y0(d) and y(d) are the actual value and predicted value of the PV power station load at moment d, respectively.
[0137] In this example, 24-hour load data from the photovoltaic power station test set is selected to evaluate the load prediction effect of this method, and the results are shown in Table 1.
[0138] Table 1 Load prediction effect of this method
[0139] Evaluation Metrics MAE RMSE / MW Prediction effect 0.0014 120.52
[0140] It can be seen from the above table that the method proposed in the present invention has a good effect on the load forecasting of photovoltaic power plants and can support the accurate load forecasting work of photovoltaic power plants.
[0141] The self-learning load prediction method for photovoltaic power stations provided by the present invention combines external influencing factor data and load data into an initial sample set, thereby solving the problem of only considering the load and ignoring other important factors; based on the improved clustering operation, the corrected information value calculation is performed to overcome the disadvantage that the association analysis is too subjectively influenced; a feature grayscale image is constructed and the self-learning ability is used to train a prediction model based on a convolutional attention mechanism and a gated loop, taking into account the deep feature relationship between the data, the model performance is improved, and reliable self-learning load prediction for photovoltaic power stations is realized.
[0142] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0143] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.
[0144] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for predicting the load of a photovoltaic power station, characterized in that: The prediction method comprises: Acquire a sample data sequence including a plurality of sample data, and perform adaptive dynamic adjustment based on a sliding window on each sample data in the sample data sequence to obtain an adjusted sample data sequence, wherein the adjusted sample data sequence includes a plurality of adjusted historical load data and a plurality of adjusted external influencing factor data; Performing multi-stage feature selection based on improved association analysis on all the adjusted historical load data and all the adjusted external influencing factor data, respectively, to obtain a number of historical load selection data based on feature selection and a number of external influencing factor selection data based on feature selection; Performing enhanced variable dimension coding on the one-dimensional time series features composed of the historical load selection data and the external influencing factor selection data in the same time period to obtain a two-dimensional feature grayscale map, wherein all the two-dimensional feature maps in all time periods constitute a feature grayscale map set; The two-dimensional feature grayscale images in the gray feature image set are sequentially used based on a load prediction model integrating gated loop and attention mechanism to obtain a prediction result of the photovoltaic power station load.
2. The method for predicting the load of a photovoltaic power station according to claim 1, characterized in that: The sample data sequence includes a historical load data sequence and an external influencing factor data sequence, the historical load data sequence includes multiple historical load data, the external influencing factor data sequence includes a temperature data sequence, a relative humidity data sequence and a radiation intensity data sequence, the temperature data sequence includes multiple temperature data, the relative humidity data sequence includes multiple relative humidity data, and the radiation intensity data sequence includes multiple radiation intensity data.
3. The method for predicting the load of a photovoltaic power station according to claim 1, characterized in that: All of the sample data include a plurality of historical load data and a plurality of external influencing factor data; Performing adaptive dynamic adjustment based on a sliding window on each of the sample data to obtain an adjusted sample data sequence, including: Based on a mapping formula, each of the historical load data and each of the external influencing factor data are respectively mapped to the interval [0,1] to obtain a plurality of mapped historical load data and a plurality of mapped external influencing factor data; the mapping formula is expressed as: Among them, x ’ is the mapped historical load data or the mapped external influencing factor data, x is the historical load data or the external influencing factor data, min(x) is the minimum value of all historical load data or all external influencing factor data, and max(x) is the maximum value of all historical load data or all external influencing factor data; Based on the standardization formula, each of the mapped historical load data and each of the mapped external influencing factor data are standardized to obtain the multiple adjusted historical load data and the multiple adjusted external influencing factor data; the standardization formula is expressed as: Wherein, x' is the adjusted historical load data or the adjusted external influencing factor data, μ is the data mean, σ is the data standard deviation, θ1 and θ2 are both non-zero constants, and the value range of θ1 and θ2 is [0.001, 0.0001].
4. The method for predicting the load of a photovoltaic power station according to claim 2, characterized in that: Before performing multi-stage feature selection based on improved association analysis on all the adjusted historical load data and all the adjusted external influencing factor data, the method further includes: For the newly added sample data, based on the mapping formula, the newly added sample data is mapped to the interval [0,1] to obtain the mapped sample data; Based on the standardized formula constructed according to the updated mean and the updated variance, the mapped sample data is standardized to obtain the adjusted sample data; the updated mean and the updated variance are respectively expressed as: Among them, μ(t+1) is the updated data mean at the current time t+1, σ(t+1) is the updated data variance at the current time t+1, μ(t) is the data mean at the previous time t, σ(t) is the data variance at the previous time t, x(t+1) is the newly added sample data at the current time t+1, is the mean of the sample data at the current time t+1, and α is the sliding window coefficient.
5. The method for predicting the load of a photovoltaic power station according to claim 1, characterized in that: Multi-stage feature selection based on improved association analysis is performed on all the adjusted historical load data and all the adjusted external influencing factor data to obtain a number of historical load selection data based on feature selection and a number of external influencing factor selection data based on feature selection, including: Based on the improved clustering method, all the adjusted historical load data and all the adjusted external influencing factor data are clustered respectively to obtain a first optimal number of clustering clusters corresponding to the adjusted historical load data and a second optimal number of clustering clusters corresponding to the adjusted external influencing factor data; Replacing each of the adjusted historical load data with the cluster center value of the cluster where the number of clusters is the first optimal number of clusters, to obtain a plurality of replaced historical load data, and replacing each of the adjusted external influencing factor data with the cluster center value of the cluster where the number of clusters is the second optimal number of clusters, to obtain a plurality of replaced external influencing factor data; Based on a historical load replacement data sequence composed of all the replaced historical load data in a cluster and an external influencing factor replacement data sequence composed of all the replaced external influencing factor data in a cluster, a symmetric correction information value is obtained; Based on the correlation analysis, weakly correlated feature elimination processing is performed on each of the historical load replacement data sequences and each of the external influencing factor replacement data sequences according to the symmetric correction information value, and a number of historical load optimization data sequences and a number of external influencing factor optimization data sequences are correspondingly obtained; Based on redundancy analysis, redundant features are deleted from each historical load optimization data in each historical load optimization data sequence and each external influencing factor optimization data in each external influencing factor optimization data sequence to obtain a number of historical load selection data and a number of external influencing factor selection data.
6. The method for predicting the load of a photovoltaic power station according to claim 5, characterized in that: The improved clustering method comprises: S1, set the maximum number of clusters K; S2. In the k-round clustering, all the data to be clustered are clustered based on the k-means clustering algorithm to generate k clusters, wherein the data to be clustered is the adjusted historical load data or the adjusted external influencing factor data, and 1≤k≤K; S3, calculating the silhouette coefficient of each of the data to be clustered, and obtaining the average silhouette coefficient when the cluster is k based on the silhouette coefficients of all the data to be clustered. The average silhouette coefficient when the cluster is k is expressed as: Wherein, l0(k) is the average silhouette coefficient when the cluster number is k, C is the total number of data to be clustered, l(c) is the silhouette coefficient of the cth data to be clustered, δ is a non-zero constant, and the value range of δ is [0.001, 0.0001]; S4, jump to step S2, perform k+1 rounds of clustering to obtain the average silhouette coefficient when the cluster is k+1, until the average silhouette coefficient when the cluster is K is obtained, and select the number of clusters corresponding to the maximum value of the K average silhouette coefficients as the optimal number of clusters.
7. The method for predicting the load of a photovoltaic power station according to claim 5, characterized in that: The symmetric correction information value is expressed as: Among them, SMI(U;W) is the symmetrically corrected information value between the external influencing factor replacement data sequence U and the historical load replacement data sequence W, C(U) is the information entropy of the external influencing factor replacement data sequence U, C(W) is the information entropy of the historical load replacement data sequence W, I(U;W) is the mutual information value between the external influencing factor replacement data sequence U and the historical load replacement data sequence W, u(i) is the i-th value in the external influencing factor replacement data sequence U, w(j) is the j-th value in the historical load replacement data sequence W, c u is the second best number of clusters, c w is the first optimal number of clusters, P(u(i), w(j)) is the proportion of sampling points that satisfy the external influencing factor replacement data u(i) and the historical load replacement data w(j) to the total sampling points, P(u(i)) is the proportion of sampling points that satisfy the external influencing factor replacement data u(i) to the total sampling points, and P(w(j)) is the proportion of sampling points that satisfy the historical load replacement data w(j) to the total sampling points.
8. The method for predicting the load of a photovoltaic power station according to claim 5, characterized in that: Based on the correlation analysis, weakly correlated feature elimination processing is performed on each of the historical load replacement data sequences and each of the external influencing factor replacement data sequences according to the symmetric correction information value, and a number of historical load optimization data sequences and a number of external influencing factor optimization data sequences are correspondingly obtained, including: Determine whether the symmetric correction information value corresponding to the historical load replacement data sequence is less than a first threshold value, if so, delete the historical load replacement data sequence, if not, retain the historical load replacement data sequence, and use the retained historical load replacement data sequence as the historical load optimization data sequence; Determine whether the symmetry correction information value corresponding to the external influencing factor replacement data sequence is less than a second threshold value. If so, delete the external influencing factor replacement data sequence; if not, retain the external influencing factor replacement data sequence, and use the retained external influencing factor replacement data sequence as the external influencing factor optimization data sequence.
9. The method for predicting the load of a photovoltaic power station according to claim 5, characterized in that: Based on redundancy analysis, redundant features are deleted from each historical load optimization data in each historical load optimization data sequence and each external influencing factor optimization data in each external influencing factor optimization data sequence, to obtain a plurality of historical load selection data and a plurality of external influencing factor selection data, including: Determine the relationship between any two historical load optimization data in the historical load optimization data sequence. If MI(U example1 ;W)>MI(U example2 ; W), and MI(U example1 ; U sample2 )>MI(U example2 ; W), then U example2 The historical load optimization data that is not deleted is used as the historical load selection data, wherein U example1 and U example2 For two historical load optimization data, MI(U example1 ; W) is the historical load optimization data U example1 The mutual information value of the historical load replacement data sequence W, MI(U example2 ; W) is the historical load optimization data U example2 The mutual information value of the historical load replacement data sequence W, MI(U example1 ; U sample2 ) is the historical load optimization data U example1 With historical load optimization data U example2 The mutual information value of .
10. The method for predicting the load of a photovoltaic power station according to claim 1, characterized in that: Performing enhanced variable dimension coding on the one-dimensional time series features consisting of the historical load selection data and the external influencing factor selection data in the same time period to obtain a two-dimensional feature grayscale map, including: Constructing the one-dimensional time series feature by using the historical load selection data and the external influencing factor selection data in the same time period; Based on the enhanced variable dimension coding formula, the one-dimensional time series feature is enhanced variable dimension coding to obtain an initial two-dimensional feature grayscale image. The enhanced variable dimension coding formula is expressed as: Where P(m,n) is the value of the mth row and nth column of the initial two-dimensional feature grayscale image, L is the one-dimensional time series feature, min(L) is the minimum value of the one-dimensional time series feature, max(L) is the maximum value of the one-dimensional time series feature, N×N is the size of the initial two-dimensional feature grayscale image, and round{·} is rounding; Based on the image enhancement formula, the initial two-dimensional feature grayscale image is enhanced to obtain the two-dimensional feature grayscale image. The image enhancement formula is expressed as: EH(m,n)=ρ(P(m,n)+β) γ Among them, EH(m,n) is the value of the mth row and nth column of the two-dimensional feature grayscale image, ρ is the scaling factor, β is the offset, and γ is the enhancement coefficient.
