Photovoltaic power generation power prediction method based on Pathwavelet model
Through the Pathwavelet model, the photovoltaic power generation prediction method is based on the Pathwavelet model, and the energy screening wavelet transformation and multi-scale Transformer module are used, combined with environmental similarity transfer learning, the complexity and data scarcity of photovoltaic power generation prediction are solved, and high-precision prediction and model adaptability are achieved to meet the real-time monitoring and scheduling needs of the power system.
Patent Information
- Application Number
- CN202510375202.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-03-27
AI Technical Summary
The existing photovoltaic power prediction methods are insufficient in dealing with complex nonlinear features and data scarce scenarios, traditional machine learning models have limited ability to capture long sequence dependency, and Pathwavelet models have weak adaptability and generalization capabilities in signal complexity.
The photovoltaic power generation prediction method based on the Pathwavelet model is adopted to extract frequency domain features through energy screening wavelet transformation, combine multi-scale Transformer module and adaptive Pathways module for modeling, and optimize model parameters through environmental similarity transfer learning, and update in real time to adapt to different scenarios.
It significantly improves the accuracy of photovoltaic power generation power prediction and the generalization ability of the model, and can meet the real-time monitoring and optimization scheduling requirements of photovoltaic power stations.
Smart Images

Figure CN120258226A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power prediction, and specifically to a photovoltaic power prediction method based on the Pathwavelet model. Background Technique
[0002] Photovoltaic power generation is a technology that uses the photovoltaic effect at the semiconductor interface to directly convert sunlight into electrical energy. Its core principle is the photovoltaic effect, that is, the phenomenon that a potential difference is generated between different parts of an uneven semiconductor or the combination of a semiconductor and a metal under illumination. When sunlight shines on a semiconductor material (such as silicon), the photon energy is absorbed by the semiconductor, causing electrons to jump from the valence band to the conduction band, forming electron-hole pairs. Under the action of the built-in electric field, the electrons and holes are separated. The electrons move towards the n-type semiconductor, and the holes move towards the p-type semiconductor, thereby forming a current in the external circuit and realizing the conversion of light energy into electrical energy.
[0003] As the proportion of photovoltaic power generation in the energy structure gradually increases, accurately and real-time predicting the photovoltaic power generation is of crucial significance for the stable operation of the power system, optimal dispatching, and energy market transactions. However, the photovoltaic power generation is affected by various complex factors, such as light intensity, ambient temperature, air pressure, and relative humidity. These factors have strong randomness and uncertainty, resulting in complex variation characteristics of the photovoltaic power generation and posing great challenges to accurate prediction. The existing photovoltaic power generation prediction methods are mainly divided into physical model methods, statistical model methods, and machine learning model methods. Among them, the basic principle of the physical model method is based on the physical power generation principle of photovoltaic power generation. By establishing a mathematical model between environmental factors such as solar radiation and temperature and the photovoltaic power generation, prediction is achieved. By inputting meteorological data or photovoltaic system parameters into the model and performing operations through the photovoltaic conversion model or temperature influence model, the predicted value of the photovoltaic power generation is output. However, this method requires detailed physical parameters and meteorological data of the photovoltaic power station, and the modeling process is complex and has high requirements for data quality. Although the statistical model method is relatively simple to calculate, by analyzing the historical data of the photovoltaic power generation station, a mathematical relationship model between the photovoltaic power generation and influencing factors is established, and this model is used to predict the future photovoltaic power generation. However, it is difficult for this method to capture the complex non-linear characteristics of the photovoltaic power generation. The core idea of the machine learning model method is to utilize the regularity of photovoltaic power generation and learn the mapping relationship between the input features and the output power through the model, so as to be able to predict the corresponding power generation according to the new input data. However, when traditional machine learning models process time series data, their ability to capture long sequence dependence relationships is limited, resulting in the prediction accuracy being difficult to meet the actual needs. As an emerging time series prediction model, the Pathwavelet model has certain advantages in processing long sequence data by performing multi-scale decomposition on long sequence data to obtain data features at different frequencies and time resolutions. However, this model has the disadvantages of insufficient adaptability to signal complexity, strong data dependence, and weak generalization ability, resulting in deficiencies in mining the frequency domain features of data and dealing with data scarcity scenarios. Summary of the Invention
[0004] To meet the requirements of the power system for real-time and accurate prediction of photovoltaic power generation, the present invention proposes a photovoltaic power generation prediction method based on the Pathwavelet model, including:
[0005] Step 1: Collect the historical data of the photovoltaic system parameters and the corresponding power generation within the T time period before the prediction moment, preprocess it to obtain a standard data set, and divide it into a training set, a validation set, and a test set;
[0006] Step 2: Perform energy screening wavelet transform on the standard data set obtained in Step 1 to extract periodic features and multi-scale information;
[0007] Step 3: Construct a photovoltaic power prediction model based on Pathwavelet, and use the dataset that has undergone energy screening wavelet transform in Step 2 to train the prediction model;
[0008] Step 4: Optimize the model parameters through environmental similarity transfer learning;
[0009] Step 5: Input the photovoltaic system parameters into the prediction model with optimized parameters in Step 4 to predict the power generation.
[0010] In Step 1, the 3-sigma method based on statistics is used to judge the outliers in the data; the spline interpolation method is used to fill in the missing values; the min-max normalization method is used for normalization processing; the data is mapped to the interval [0, 1], and the expression is:
[0011]
[0012] where x is the original data, and x norm represents the normalization process, x min and x max are the minimum and maximum values of this data column respectively;
[0013] In the energy screening wavelet transform feature extraction in Step 2, the discrete wavelet transform algorithm is used to perform the conversion from the time domain to the wavelet domain, and the effective wavelet coefficients are screened according to the wavelet coefficient energy distribution, so as to retain the wavelet coefficients with an energy ratio exceeding 80%;
[0014] The prediction model based on Pathwavelet in Step 3 includes a multi-scale Transformer module and an adaptive Pathways module;
[0015] Among them, the multi-scale Transformer module processes the time series data Y ∈ R of the input photovoltaic system parameters M×e , where R M×e represents the set of real number matrices with M rows and e columns, and a set S = {S1, …, S N} containing N patch sizes is defined. A patch of size S i is used to divide the time series data of the input photovoltaic system parameters. Among them, S i ∈ S; the time series result of patch division is (Y 1 , Y 2 , …, Y P ), and P represents the number of patches; then a dual attention mechanism (intra-patch attention and inter-patch attention) is used to model the time relationships in different ranges. The intra-patch attention models the associations between different time points within each patch, and the expression is:
[0016]
[0017] Among them, represents the attention result matrix inside the j-th patch, T represents transpose, and are respectively the key matrix and value matrix obtained through linear mapping, represents the input data Y after patch division inside the j-th patch j the matrix obtained by performing embedding on its feature dimension e, f m is the feature dimension of is the learnable query matrix;
[0018] Merge the attention results obtained for each patch to get the final result represents the set of real number matrices with P rows and f m columns, and the expression for the final result is:
[0019]
[0020] Among them, represents the attention result obtained for the P-th patch;
[0021] Inter-patch attention models the relationships between different patches to capture global associations, and performs an embedding operation on the divided time-series data of photovoltaic system parameters on the feature dimension e; among them, S i ∈S, represents a three-dimensional array with P rows, S i columns, and e dimensions. According to the standard self-attention mechanism, it is obtained through linear mapping represents the set of real number matrices with P rows and f n columns; calculate the attention result Attn inter-patch , representing the global association of the time series, and its expression is:
[0022]
[0023] Among them, T represents transpose, Q inter-patch represents the query matrix for inter-patch attention calculation, K inter-patch represents the key matrix for inter-patch attention calculation, V inter-patch represents the value matrix for inter-patch attention calculation, f nRepresents the characteristic dimension of the attention calculation matrix between patches;
[0024] The adaptive Pathways module mainly consists of a multi-scale router and a multi-scale aggregator, which are used to achieve adaptive multi-scale modeling in time series prediction;
[0025] Among them, the role of the multi-scale router is to determine the optimal patch division size. First, the input time series is decomposed into periods through discrete wavelet transform and inverse discrete wavelet transform to obtain the periodic pattern, and its expression is:
[0026] Y cycle = IDWT(D top )
[0027] where D is the wavelet coefficient, and D top is the set composed of the top K g in terms of the absolute value of the wavelet coefficient. Then, trend decomposition is performed using average pooling and weighted operations with different kernels to obtain the trend pattern Y trend . The periodic term, trend term and the original input are added and linearly mapped to obtain Y trans . Then, the path weights are generated through a routing function, and a noise term δ is introduced to increase randomness. Its expression is:
[0028] S(Y trans ) = Softmax(Y trans ·W s + δ·Softplus(Y trans ·W noiose ))), δ ∼ N(0,1)
[0029] where, represents the path weight vector, W s represents the learnable weight matrix, and W noiose represents the noise weight;
[0030] Finally, the Top K strategy is used to select the top K weights to determine the patch division size;
[0031] The multi-scale aggregator is responsible for weighted aggregation of the output features of the multi-scale Transformer module. Each dimension of the path weight corresponds to a different patch size. When , the corresponding patch division and dual attention mechanism are executed. The aggregator performs weighted summation on the outputs of different scales according to the path weights to obtain the final output, realizing the fusion of multi-scale features. The expression is:
[0032]
[0033] where, Represents the path weight vector The weight corresponding to the k-th patch division size in U k Represents the linear transformation matrix Represents the output feature matrix of the multi-scale Transformer module under the k-th patch division size. When the indicator function I(·) outputs 1, otherwise it outputs 0
[0034] A further improvement of the present invention lies in: when using transfer learning to solve the problem of insufficient data volume, through comprehensive evaluation, during pre-training, the parameters of some layers of the model are fixed, and only the parameters of specific layers related to the data of the target station are fine-tuned. The fine-tuning is performed with a small learning rate of 0.001 for multiple rounds of iterative training
[0035] A further improvement of the present invention lies in: the real-time prediction and model update have the same acquisition frequency for real-time meteorological data and historical data, ensuring data consistency and coherence; the model update period is set according to the actual operation conditions of the photovoltaic power station and the data change frequency
[0036] The present invention also provides a photovoltaic power generation system, which includes photovoltaic modules, a busbar trunking unit, a controller, a DC power distribution cabinet, an inverter, an AC power distribution cabinet, a monitoring and communication device, and a control center
[0037] The photovoltaic modules are a solar cell array or a storage battery
[0038] The control center realizes the prediction of the power generation power by collecting the photovoltaic system parameters based on the above method
[0039] Further, the photovoltaic system parameters include: light intensity, ambient temperature, air pressure, relative humidity, and startup capacity data
[0040] The photovoltaic system parameters are collected by sensors and transmitted to the control center
[0041] The beneficial effects of the present invention are
[0042] The present invention proposes a photovoltaic power generation power prediction method based on the Pathwavelet model. By extracting frequency domain features through energy screening wavelet transform and combining the multi-scale feature extraction ability of the Pathwavelet model, it can more comprehensively capture the change law of the photovoltaic power generation power, thus significantly improving the prediction accuracy, and enhancing the adaptability and generalization ability of the model in different scenarios through environmental similarity transfer learning. It can not only meet the real-time monitoring of the photovoltaic power generation power of the photovoltaic power station, but also provide a reference for the optimal dispatching of the power system Brief Description of the Drawings
[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0044] Figure 1 It is a schematic flowchart of a photovoltaic power generation prediction method based on the Pathwavelet model proposed in Embodiment 1 of the present invention;
[0045] Figure 2 It is a schematic diagram of the framework structure of the prediction model constructed by the photovoltaic power generation prediction method based on the Pathwavelet model proposed in Embodiment 1 of the present invention;
[0046] Figure 3 It is a schematic diagram of the Pathwavelet model structure in the prediction model proposed in Embodiment 1 of the present invention;
[0047] Figure 4 It is a schematic diagram for comparing the prediction result of the photovoltaic power generation prediction model based on Pathwavelet with the output result of the actual power generation in Embodiment 2 of the present invention;
[0048] Figure 5 It is a schematic diagram for comparing the prediction result of the prior art with the output result of the actual power generation. Detailed implementation manners
[0049] In order to make the purpose, technical solutions and advantages of the present invention more clear, the following further elaborates on the method for constructing a Pathwavelet model for real-time prediction of photovoltaic power generation in combination with relevant descriptions. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0050] Embodiment 1
[0051] This embodiment proposes a photovoltaic power generation prediction method based on the Pathwavelet model. The flowchart of this method is as Figure 1As shown in the figure, first, collect the historical operation data and meteorological data of the photovoltaic power station, preprocess the data through the designed energy screening wavelet transform, construct a photovoltaic power prediction model based on Pathwavelet, and optimize the prediction model through environmental similarity transfer learning. Finally, obtain the optimized prediction model, and input the photovoltaic system parameters within 72 hours of the photovoltaic power station into the prediction model to perform the final prediction of the power generation; The framework structure of the photovoltaic power prediction model based on Pathwavelet is as Figure 2 shown. Collect the historical operation data and meteorological data of the photovoltaic power station. Considering the small amount of data, use environmental similarity transfer learning to optimize the model, and finally perform power prediction through the optimized Pathwavelet model;
[0052] The specific operations are as follows:
[0053] Step S1: Collect the historical data of the photovoltaic system parameters and the corresponding power generation within the T time period before the prediction moment, preprocess it to obtain a standard data set, and divide it into a training set, a validation set, and a test set;
[0054] Data collection: Collect the historical data related to the photovoltaic power station within the T time period before the prediction moment, where T > 8760h. These data cover meteorological data such as light intensity, ambient temperature, air pressure, and relative humidity, as well as the corresponding photovoltaic power generation and installed capacity data, providing rich samples for subsequent model training to facilitate mining the laws and characteristics in the data;
[0055] Data preprocessing:
[0056] (1) Data cleaning: Perform cleaning operations on the collected data. Use the 3 - standard - deviation method to identify outliers. For each item of data such as light intensity, temperature, humidity, wind speed, and photovoltaic power generation, calculate its mean and standard deviation respectively. If the difference between a data point and the mean is greater than 3 times the standard deviation, then determine that the data point is an outlier and eliminate it. For the missing values in the data, use the cubic spline interpolation method to fill them. This method can reasonably estimate the missing values according to the data change trend, ensuring the continuity and integrity of the data;
[0057] (2) Normalization processing: Use the min - max normalization method to map the cleaned data to the [0, 1] interval.
[0058] In this way, unify the data of different magnitudes to the same scale range, which helps to improve the efficiency and stability of model training and makes the model easier to converge;
[0059] Among them, the ratio of the training set, the validation set, and the test set is 7∶1.5∶1.5.
[0060] Step S2: Perform energy screening wavelet transform on the standard data set obtained in Step S1, extract periodic features and multi-scale information, and screen out effective wavelet coefficients;
[0061] Energy screening wavelet transform feature extraction: Perform wavelet transform on the preprocessed standard data set to convert time-domain data into wavelet-domain data. By analyzing the energy distribution of the wavelet-domain data, set the energy ratio threshold to 80%, and screen out the wavelet coefficients with an energy ratio above this threshold as effective features, removing the wavelet coefficients representing noise. Then, splice the extracted wavelet-domain features with the time-domain data features after preprocessing as the input of the Pathwavelet model to provide more comprehensive information for the model.
[0062] Step S3: Construct a photovoltaic power prediction model based on Pathwavelet, and use the data set obtained in Step S2 to train the prediction model;
[0063] Build a photovoltaic power prediction model based on Pathwavelet in the deep learning framework. This model includes components such as a patch embedding layer, a multi-head self-attention layer, and a feed-forward neural network layer. The patch embedding layer is responsible for dividing the input data into different patches and mapping them to a low-dimensional space; the multi-head self-attention layer captures the dependencies in the data from different perspectives through multiple attention heads; the feed-forward neural network layer further performs non-linear transformation and integration on the extracted features;
[0064] As Figure 3 shown, the photovoltaic power prediction model based on Pathwavelet includes a multi-scale Transformer module and an adaptive Pathways module (including a multi-scale router and a multi-scale aggregator). Through wavelet transformation for period decomposition, the time series data is adaptively segmented into the optimal patches of different scales, and then an attention mechanism within and between patches is designed to perform downstream tasks.
[0065] Among them, the multi-scale Transformer module processes the time series data Y ∈ R M×e , where R M×e represents the set of real number matrices with M rows and e columns. Define a set S = {S1,..., S M} containing N patch sizes, where each patch size corresponds to a patch division operation. For the input time series data Y ∈ R M×e , use a size of S iThe patches selected from the set S are used to divide it, and different patch sizes will result in time series data with different time resolutions after division; based on the patch division at each scale, a dual attention mechanism (intra-patch attention and inter-patch attention) is used to model time dependencies in different ranges. After patch division of size S i we obtain (Y 1 , Y 2 , …, Y P ), where P represents the number of patches after division;
[0066] The intra-patch attention mechanism is used to model the correlations between different time points within each patch; for the j-th patch, represents the set of real number matrices with S i rows and e columns. First, an embedding operation is performed on the feature dimension e to obtain represents the set of real number matrices with S i rows and f m columns. Then, a linear mapping is performed to obtain the key matrix and value matrix Initialize a learnable query matrix Then perform cross-attention calculation on to model the local details within the j-th patch. The expression is:
[0067]
[0068] where, represents the attention result within the j-th patch, T represents transpose, represents the key matrix corresponding to the j-th patch, represents the value matrix corresponding to the j-th patch, is the learnable query matrix, and f m is the feature dimension;
[0069] After being processed by the intra-patch attention mechanism, the length of each patch will change from S i to 1. By merging the attention results obtained for each patch, the final result represents the set of real number matrices with P rows and f m columns. The expression for the final result is:
[0070]
[0071] Among them, represents the attention result obtained from the P-th patch;
[0072] The inter-patch attention models the relationships between different patches to capture global correlations, and performs an embedding operation on the segmented time series data in the feature dimension e, where S i ∈ S; represents a three-dimensional array with P rows, S i columns, and e dimensions. According to the standard self-attention mechanism, it is obtained through a linear mapping represents a set of real number matrices with P rows and f n columns, and calculates the attention result Attn inter-patch , representing the global correlation of the time series, and its expression is:
[0073]
[0074] Among them, T represents the transpose, Q inter-pstch represents the query matrix for inter-patch attention calculation, K inter-patch represents the key matrix for inter-patch attention calculation, V inter-patch represents the value matrix for inter-patch attention calculation, f n represents the feature dimension of the inter-patch attention calculation matrix;
[0075] The adaptive Pathways module mainly includes a multi-scale router and a multi-scale aggregator, which are used to achieve adaptive multi-scale modeling in time series prediction;
[0076] Among them, the multi-scale router selects the optimal patch division size through wavelet transform, thereby controlling the process of multi-scale modeling; a periodic decomposition module and a trend decomposition module are introduced into the router to extract periodic and trend patterns.
[0077] The periodic decomposition converts the time series data from the time domain to the wavelet domain to extract periodic patterns; the input time series data is decomposed into wavelet coefficients using the discrete wavelet transform, and the wavelet coefficients with the top K g in terms of absolute value ranking of the coefficients are selected, and these coefficients are formed into a set, D top , and then the periodic pattern Y cycle is obtained through the inverse discrete wavelet transform. The formula is:
[0078] Y cycle = IDWT(D top )
[0079] Among them, D is the wavelet coefficient, and D top is the wavelet coefficient with the top K in terms of absolute value ranking of the coefficientsg Set consisting of;
[0080] In terms of trend, different kernels are used to perform average pooling on the remaining part after periodic decomposition to extract the trend pattern Y rem . For different kernels, a weighted operation is adopted to obtain the final representation of the trend term, and its calculation formula is:
[0081]
[0082] where, H(Y rem ) represents the weighted coefficient of Y rem , represents the result of average pooling of Y rem by the P-th kernel;
[0083] The periodic term, trend term and the original input are added and linearly mapped to obtain Y trans ∈R e . Based on the result Y trans of the time series decomposition, the router uses the routing function S(·) to generate path weights, so as to select an appropriate patch size for partitioning. To avoid always selecting a certain few patch sizes during the weight generation process, resulting in repeated updates of the corresponding scale modules and ignoring other more useful scales, a noise term δ is introduced to add randomness to the weight generation process. The formula for the entire weight generation process is as follows:
[0084]
[0085] where, represents the path weight vector, W s represents the learnable weight matrix, W noiose represents the noise weight;
[0086] To maintain the sparsity of routing and at the same time encourage the selection of key scales, the Top K strategy is used on the path weights, that is, the top K path weights are retained and the remaining weights are set to 0. The final result is expressed as
[0087] The role of the multi-scale aggregator is to perform weighted aggregation on the features obtained from the multi-scale Transformer module. Each dimension of the generated path weights corresponds to a patch size in the multi-scale Transformer, where represents performing the patch partitioning and double attention corresponding to this patch size, and let represent the size of T kThe output of the multi-scale Transformer block corresponding to the patch is weighted aggregated by the aggregator based on the path weights to obtain the final output:
[0088]
[0089] Among them, represents the path weight vector is the weight corresponding to the k-th patch division size in k U represents the linear transformation matrix, represents the output feature matrix of the multi-scale Transformer module under the k-th patch division size. When the indicator function I(·) outputs 1, otherwise it outputs 0.
[0090] Step S4: Optimize the model parameters through environmental similarity transfer learning and update the model in real time;
[0091] For environmental similarity transfer learning, when the data volume of the target photovoltaic power station is limited, data from a source photovoltaic power station with similar environment and power generation characteristics is searched for. By comparing the similarity of meteorological parameters and geographical distance factors, source station data with a similarity exceeding 80% is selected. The source station data is used to pre-train the photovoltaic power prediction model based on Pathwavelet. During the pre-training process, the parameters of the first two layers of the model are fixed, and only the parameters related to the target station data in the last two layers are fine-tuned. After the pre-training is completed, the model is further fine-tuned on the target station data to optimize the model parameters to make it more adaptable to the actual situation of the target station. And the power prediction model is updated every 5 days to adapt to the changing weather and power generation conditions and maintain the prediction performance of the model.
[0092] Step S5: Input the photovoltaic system parameters into the prediction model with optimized parameters in Step S4 to predict the power generation;
[0093] Through the meteorological monitoring equipment installed in the photovoltaic power station, meteorological data such as light intensity, ambient temperature, air pressure, and relative humidity are obtained in real time. The photovoltaic power generation and the starting capacity are obtained through the operation data of the photovoltaic power station. The data collection frequency is set to once every 15 minutes to ensure the timeliness of the data and provide the latest input information for real-time prediction. The meteorological data obtained in real time and pre-processed is input into the optimized power prediction model for calculation to obtain a high-precision prediction result of the photovoltaic power generation in the future period.
[0094] Embodiment 2
[0095] This embodiment provides a method for predicting photovoltaic power generation based on the Pathwavelet model, which is introduced by taking a certain photovoltaic power station as an example;
[0096] First, a brief introduction to the working process of a photovoltaic power station is given:
[0097] In a photovoltaic power station, under the irradiation of sunlight, the solar cell array converts light energy into direct current, which is collected through a busbar trunking box and transmitted to the DC power distribution cabinet, and then transmitted to an inverter. The inverter converts the direct current into alternating current matching the grid frequency, and then transmits it to the AC power distribution cabinet, and is incorporated into the user side as needed or connected to the grid through a step-up transformer; in addition, the monitoring and communication device monitors the operating status of the photovoltaic power station in real time and transmits the data to the control center to achieve remote monitoring and management.
[0098] The method adopted specifically includes:
[0099] Step 1: Taking the data of a certain photovoltaic power station in one year as an example, with 15 minutes as a time step, collect the photovoltaic system parameters in the photovoltaic power station through sensors;
[0100] Among them, the photovoltaic system parameters include: light intensity, ambient temperature, air pressure, relative humidity, and starting capacity data; these photovoltaic system parameters are collected through sensors set in the photovoltaic power station;
[0101] Specifically: the light intensity is collected through a light sensor, the ambient temperature is collected through a temperature sensor, the air pressure is collected through a pressure sensor, the relative humidity is collected through a humidity sensor, and the starting capacity data is collected through a voltage sensor or a current sensor.
[0102] Step 2: Input the photovoltaic system parameters corresponding to the power generation to be predicted collected in Step 1 into the photovoltaic power generation power prediction model based on Pathwavelet to predict the power generation power.
[0103] The prediction results are as Figure 4 shown. It can be seen from Figure 4 that the predicted power curve conforms to the fluctuation trend of the actual power curve, the predicted power can reflect the actual power, and the prediction effect is good;
[0104] In order to verify the effect of the method proposed in the present invention, the present invention uses the PatchTST model to predict the same data set. The prediction results of this model are as Figure 5 shown. The change trend of the predicted power curve is relatively similar to that of the actual power curve, but there are also obvious deviations. The specific prediction model based on PatchTST can refer to the introduction in "《A Time Series is Worth 64 Words: Long-term Forecasting with Transformers》";
[0105] To measure the accuracy of model prediction, the present invention uses the mean absolute error (MAE) and the root mean square error (RMSE) to detect the model's prediction ability. The calculation formulas are as follows:
[0106]
[0107] where n is the number of samples, y i is the true value, is the predicted value;
[0108]
[0109] where n is the number of samples, y i is the true value, is the predicted value;
[0110] The mean absolute error (MAE) of the prediction result of the method proposed by the present invention is 0.48, and the root mean square error (RMSE) is 0.47; in contrast, the mean absolute error (MAE) of the test result of using the PatchTST model for prediction is 0.50, and the root mean square error (RMSE) is 0.48. This proves that the energy screening wavelet transform constructed by this model can effectively filter the noise in the input data and obtain the periodicity and trend of the data; in the case of less data volume, the optimization of the model by environmental similarity transfer learning makes its prediction more in line with the actual situation. Through comparative analysis, the prediction ability of this model meets the expected results.
[0111] The above specific implementation manners elaborate more in detail on the purpose, technical solutions, and beneficial effects of the present invention. It should be clear that the above content is only the specific implementation manners of the present invention and is not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention should be included within the protection scope of the present invention.
Claims
1. A photovoltaic power prediction method based on the Pathwavelet model, characterized in that, The method comprises: Step 1: Collect historical data of photovoltaic system parameters and corresponding power generation in the T period before the prediction time, preprocess them to obtain a standard data set and divide them into training set, validation set and test set; Step 2: Perform energy screening wavelet transform on the standard data set obtained in step 1 to extract periodic features and multi-scale information; Step 3: Construct a photovoltaic power generation prediction model based on Pathwavelet, and use the data set that has undergone energy screening wavelet transform in step 2 to train the prediction model; Step 4: Optimize model parameters through environment similarity transfer learning; Step 5: Input the photovoltaic system parameters into the prediction model whose parameters are optimized in step 4 to predict the power generation.
2. The method according to claim 1, wherein The photovoltaic power generation prediction model based on Pathwavelet in step 3 includes a multi-scale Transformer module and an adaptive Pathways module; The multi-scale Transformer module includes an intra-patch attention mechanism and an inter-patch attention mechanism, and the time points within and between patches are modeled in a mutually correlated relationship through the two attention mechanisms; The adaptive Pathways module includes a multi-scale router and a multi-scale aggregator. The multi-scale router selects the optimal patch partition size through wavelet transform to control the multi-scale modeling process; the multi-scale router extracts periodicity and trend patterns by introducing a periodicity and trend decomposition module.
3. The method according to claim 2, wherein The input time-series data of the photovoltaic system parameters in the multi-scale Transformer module is \(Y\in\mathbb{R}\) M×e , where \(\mathbb{R}\) M×e represents the set of real matrices with \(M\) rows and \(e\) columns. By defining a set \(S = \{S_1,\ldots,S N \}\) containing \(N\) patch sizes, a patch of size \(S i is used to partition the input time-series data of the photovoltaic system parameters, where \(S i \in S\); the time-series result of the patch partition is \((Y 1 ,Y 2 ,\ldots,Y P ), where \(S N represents patches of different sizes, and \(P\) represents the number of patches; Intra-patch attention models the association between different time points within each patch, expressed as: Among them, represents the attention result matrix inside the j-th patch, T represents transpose, are respectively the key matrix and value matrix obtained through linear mapping, represents the input data Y after patch division within the j-th patch j the matrix obtained by performing embedding on the feature dimension e, f m is the feature dimension of is a learnable query matrix; The attention results obtained for each patch are merged to obtain the final result represents the set of real number matrices with P rows and f m columns, and the expression for the final result is: Among them, represents the attention result obtained from the P-th patch; The patch - based attention models the relationships between different patches to capture global correlations for the time - series data of the photovoltaic system parameters after division Perform an embedding operation on the feature dimension. According to the standard self - attention mechanism, obtain through linear mapping Calculate the attention result Attn inter-patch , representing the global correlation of the time series, and its expression is: Among them, T represents transpose, Q inter-patch represents the query matrix for inter-patch attention calculation, K inter-patch represents the key matrix for inter-patch attention calculation, V inter-patch represents the value matrix for inter-patch attention calculation, f n represents the matrix Q inter-patch , K inter-patch , V inter-patch is the feature dimension of 4. The method according to claim 2, wherein The multi-scale router performs periodic decomposition of the input time series through discrete wavelet transform and inverse discrete wavelet transform, and the expression is: Y cycle = IDWT(D top ) where D is the wavelet coefficient, and D top is the set composed of the top K g in terms of the absolute value of the coefficients; Then, trend decomposition is performed using average pooling and weighted operations with different kernels to obtain the trend pattern Y trend , add the periodic term, trend term to the original input and perform a linear mapping to obtain Y trans , then generate path weights through a routing function, and introduce a noise term δ to increase randomness. Its expression is: Among them, represents the path weight vector, W s represents the learnable weight matrix, W noiose represents the noise weight; Finally, use Top K The strategy selects the top K weights to determine the patch division size.
5. The method according to claim 2, wherein The multi-scale aggregator is responsible for weighted aggregation of the output features of the multi-scale Transformer module. Each dimension of the path weight corresponds to a different patch size. When occurs, the corresponding patch division and dual attention mechanism are executed. The aggregator performs weighted summation on the outputs of different scales according to the path weight to obtain the final output, realizing the fusion of multi-scale features. The expression is as follows: Among them, represents the radial weight vector which is the weight corresponding to the k-th patch division size in k U represents the linear transformation matrix, represents the output feature matrix of the multi-scale Transformer module under the k-th patch division size. When is satisfied, the indicator function I(·) outputs 1, otherwise it outputs 0.
6. The method according to claim 1, wherein The environmental similarity transfer learning in step 4 comprehensively evaluates through meteorological conditions and geographical coordinate factors, selects a source photovoltaic power station with an environmental similarity of more than 80% to the target photovoltaic power station, fixes the parameters of the first two layers of the model during pre-training, and only adjusts the parameters related to the target station data in the last two layers, such as the query matrix Q for attention calculation within the patch inner , the query matrix Q for attention calculation between patches inter , the noise weight W when generating path weights noiose etc. Fine-tuning is performed with a small learning rate of 0.001 for multiple rounds of iterative training.
7. The method according to claim 1, wherein The photovoltaic system parameters in step 1 include light intensity, ambient temperature, air pressure, relative humidity and startup capacity data; The preprocessing includes data cleaning and normalization processing; The ratio of the training set, validation set and test set is 7:1.5:1.
5.
8. The method according to claim 1, wherein In the step 2, the energy screening retains the wavelet coefficients whose energy accounts for more than 80%.
9. A photovoltaic power generation system, characterized in that, The system includes photovoltaic modules, combiner boxes, controllers, DC distribution cabinets, inverters, AC distribution cabinets, monitoring and communication devices and a control center; The photovoltaic component is a solar cell array or a storage battery; The control center predicts the power generation by collecting photovoltaic system parameters based on the method described in any one of claims 1 to 8.
10. The system according to claim 9, characterized in that, The photovoltaic system parameters include: light intensity, ambient temperature, air pressure, relative humidity and startup capacity data; The photovoltaic system parameters are collected through sensors and transmitted to a control center.
Citation Information
Patent Citations
Photovoltaic power prediction method based on wavelet transform and radial basis function neural network
CN117290769A
Photovoltaic power generation power prediction method based on VSA-WTransform
CN118193944A
Multivariable source load data prediction method and system based on pre-trained big language model
CN119377397A