Photovoltaic power generation power prediction method based on pathwavelet model

By combining the Pathwavelet model with the multi-scale Transformer and adaptive Pathways modules, and incorporating environmental similarity transfer learning, the complexity and uncertainty of photovoltaic power generation prediction are addressed, achieving higher accuracy and adaptability to meet the real-time scheduling requirements of the power system.

CN120258226BActive Publication Date: 2026-06-23JIANGNAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGNAN UNIV
Filing Date
2025-03-27
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing photovoltaic power generation prediction methods suffer from insufficient model adaptability, strong data dependence, and weak generalization ability when dealing with the complexity and uncertainty of photovoltaic power generation, making it difficult to meet the power system's demand for real-time and accurate prediction.

Method used

A photovoltaic power generation prediction method based on the Pathwavelet model is adopted. Frequency domain features are extracted by energy screening wavelet transform, and modeling is carried out by combining multi-scale Transformer module and adaptive Pathways module. The model parameters are optimized by environmental similarity transfer learning and updated in real time to adapt to different scenarios.

Benefits of technology

It significantly improves the accuracy and adaptability of photovoltaic power generation prediction, meets the real-time monitoring needs of photovoltaic power plants, and provides a reference for the optimized scheduling of power systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120258226B_ABST
    Figure CN120258226B_ABST
Patent Text Reader

Abstract

This invention discloses a photovoltaic power generation prediction method based on the Pathwavelet model, belonging to the field of photovoltaic power generation prediction technology. The method includes the following steps: collecting historical operating data and meteorological data from photovoltaic power plants; after preprocessing, designing an energy-filtering wavelet transform to convert the time-domain data into wavelet-domain data, extracting periodic features and multi-scale information; constructing a Pathwavelet model; addressing the insufficient data volume of the target photovoltaic power plant, designing environmental similarity transfer learning, using similar data from the source photovoltaic power plant to pre-train the Pathwavelet model, and then fine-tuning it on the target station; inputting real-time data into the fine-tuned model to achieve accurate prediction of photovoltaic power generation; this invention effectively improves the accuracy of photovoltaic power generation prediction and the model's generalization ability, better meeting the needs of stable power system operation and energy dispatch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photovoltaic power generation prediction technology, specifically a photovoltaic power generation prediction method based on the Pathwavelet model. Background Technology

[0002] Photovoltaic power generation is a technology that directly converts sunlight into electrical energy using the photoelectric effect at semiconductor interfaces. Its core principle is the photovoltaic effect, which is the phenomenon where sunlight causes a potential difference between different parts of a non-uniform semiconductor or a semiconductor-metal interface. 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 influence of a built-in electric field, the electrons and holes are separated; electrons move towards the n-type semiconductor, and holes move towards the p-type semiconductor, thus forming a current in the external circuit, achieving the conversion of light energy into electrical energy.

[0003] As photovoltaic (PV) power generation gradually increases its share in the energy structure, accurate and real-time prediction of PV power generation is crucial for the stable operation of the power system, optimized dispatch, and energy market transactions. However, PV power generation is affected by a variety of complex factors, such as solar irradiance, ambient temperature, air pressure, and relative humidity. These factors exhibit strong randomness and uncertainty, leading to complex variations in PV power generation, which poses a significant challenge to accurate prediction. Existing PV power generation prediction methods are mainly divided into physical model methods, statistical model methods, and machine learning model methods. The basic principle of the physical model method is based on the physical principles of photovoltaic (PV) power generation. It achieves prediction by establishing a mathematical model relating environmental factors such as solar radiation and temperature to PV power output. By inputting meteorological data or PV system parameters into the model, and processing the data through a photoelectric conversion model or a temperature influence model, the predicted PV power output is output. However, this method requires detailed physical parameters and meteorological data from the PV power plant, making the modeling process complex and demanding high data quality. The statistical model method, while relatively simple to calculate, analyzes historical data from PV power plants to establish a mathematical relationship model between PV power output and influencing factors, using this model to predict future PV power output. However, this method struggles to capture the complex nonlinear characteristics of PV power output. The core idea of ​​the machine learning model method is to utilize the regularity of PV power generation, learning the mapping relationship between input features and output power through the model, thereby predicting the corresponding power output based on new input data. However, traditional machine learning models have limited ability to capture long-term dependencies when processing time-series data, resulting in prediction accuracy that fails to meet practical needs. As an emerging time series prediction model, the Pathwavelet model has certain advantages in processing long series data by performing multi-scale decomposition on long series data to obtain data features at different frequencies and time resolutions. However, this model has shortcomings such as insufficient adaptability to signal complexity, strong data dependence, and weak generalization ability, which leads to its inadequacy in mining the frequency domain features of data and dealing with data-scarce scenarios. Summary of the Invention

[0004] To meet the power system's need for real-time and accurate prediction of photovoltaic power generation, this invention proposes a photovoltaic power generation prediction method based on the Pathwavelet model, comprising:

[0005] Step 1: Collect historical data of photovoltaic system parameters and corresponding power generation within a time period T before the prediction time, preprocess the data to obtain a standard dataset, and divide it into training set, validation set and test set;

[0006] Step 2: Perform energy-filtered wavelet transform on the standard dataset obtained in Step 1 to extract periodic features and multi-scale information;

[0007] Step 3: Construct a photovoltaic power generation prediction model based on Pathwavelet, and train the prediction model using the dataset that has undergone energy-filtered wavelet transform in Step 2;

[0008] Step 4: Optimize model parameters through environmental similarity transfer learning;

[0009] Step 5: Input the photovoltaic system parameters into the prediction model with optimized parameters from Step 4 to predict the power generation.

[0010] Step 1 uses the statistically based 3-standard-deviation method to identify outliers in the data; spline interpolation is used to impute missing values; min-max normalization is used for normalization; and the data is mapped to the [0, 1] interval, expressed as:

[0011]

[0012] Where x is the original data, x norm Represents normalization, x min and x max These are the minimum and maximum values ​​of the data column, respectively.

[0013] In step 2, the energy screening wavelet transform feature extraction uses the discrete wavelet transform algorithm to convert the time domain to the wavelet domain. Effective wavelet coefficients are screened based on the energy distribution of the wavelet coefficients, thereby retaining wavelet coefficients with an energy ratio of more than 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 input photovoltaic system parameter time series data Y∈R. M×e , where R M×e Let S represent the set of real number matrices with M rows and e columns. Define a set S = {S1, ..., S2} containing N patches. N}, using a size S i The patch divides the input photovoltaic system parameter time-series data, where S i ∈S; the timing result of patch partitioning is (Y 1 ,Y 2 ,…,Y P P represents the number of patches; then, a dual attention mechanism (intra-patch attention and inter-patch attention) is used to model the temporal relationships across different ranges. Intra-patch attention models the correlation between different time points within each patch, expressed as:

[0016]

[0017] in, This represents the attention result matrix within the j-th patch, where T represents the transpose. and They are respectively The key matrix and value matrix are obtained through linear mapping. Y represents the input data after being divided into patches within the j-th patch. j The matrix f obtained by embedding its feature dimension e m for Feature dimensions, A learnable query matrix;

[0018] The attention results from each patch are combined to obtain the final result. Representative has P rows f m The set of real matrix columns, the final result The expression is:

[0019]

[0020] in, This represents the attention result obtained from the Pth patch;

[0021] Inter-patch attention modeling is used to capture global correlations between different patches and to analyze the time-series parameter data of the partitioned photovoltaic system. Perform embedding operations on the feature dimension e; where S i ∈S, The representative has P rows and S i The columns and the e-dimensional three-dimensional array are obtained through linear mapping according to the standard self-attention mechanism. Representative has P rows f n The set of real matrix columns; calculate the attention result Attn. inter-patch , representing the global correlation of time series, is expressed as:

[0022]

[0023] Where T represents transpose, Q inter-patch K represents the query matrix for inter-patch attention computation. inter-patch V represents the key matrix for inter-patch attention computation. inter-patch f represents the value matrix for inter-patch attention computation. nThe feature dimension representing the attention calculation matrix between patches;

[0024] The Adaptive Pathways module mainly includes a multi-scale router and a multi-scale aggregator, which are used to implement adaptive multi-scale modeling in time series forecasting.

[0025] The multi-scale router's role is to determine the optimal patch size. It first performs periodic decomposition on the input time series using discrete wavelet transform and inverse discrete wavelet transform to obtain the periodic pattern, expressed as:

[0026] Y cycle =IDWT(D top )

[0027] Where D is the wavelet coefficient, D top The top K waveslet coefficients by absolute value g The set is composed of kernels, and then trend decomposition is performed using average pooling and weighting operations for different kernels to obtain the trend pattern Y. trend The periodic term and trend term are added to the original input and linearly mapped to obtain Y. trans Then, 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] in, W represents the path weight vector. s W represents the learnable weight matrix. noiose Represents noise weight;

[0030] Finally, use Top. K The strategy selects the first K weights to determine the patch partition 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. At that time, the corresponding patch partitioning and dual attention mechanism are executed. The aggregator performs weighted summation of the outputs at different scales according to the path weights to obtain the final output, realizing the fusion of multi-scale features. The expression is:

[0032]

[0033] in, Represents the path weight vector The weight corresponding to the k-th patch partition size, U k Represents a linear transformation matrix. This represents the output feature matrix of the multi-scale Transformer module at the k-th patch partition size. When the condition is met, the indicator function I(·) outputs 1; otherwise, it outputs 0.

[0034] A further improvement of the present invention is that, when using transfer learning to solve the problem of insufficient data, through comprehensive evaluation, the parameters of some layers of the model are fixed during pre-training, and only the parameters of specific layers related to the target station data are fine-tuned. The fine-tuning is carried out in multiple rounds of iterative training with a small learning rate of 0.001.

[0035] A further improvement of this invention is that the frequency of real-time meteorological data acquisition in real-time forecasting and model updating is consistent with the frequency of historical data acquisition, ensuring data consistency and continuity; the model update cycle is set according to the actual operation of the photovoltaic power station and the frequency of data changes.

[0036] The present invention also provides a photovoltaic power generation system, the system comprising photovoltaic modules, combiner box, controller, DC distribution cabinet, inverter, AC distribution cabinet, monitoring and communication device and control center;

[0037] The photovoltaic module is a solar cell array or a battery;

[0038] The control center uses the above method to predict power generation by collecting photovoltaic system parameters.

[0039] Furthermore, the photovoltaic system parameters include: irradiance, ambient temperature, air pressure, relative humidity, and operating capacity data;

[0040] The parameters of the photovoltaic system are collected by sensors and transmitted to the control center.

[0041] The beneficial effects of this invention are:

[0042] This invention proposes a photovoltaic (PV) power generation prediction method based on the Pathwavelet model. By extracting frequency domain features through energy-filtered wavelet transform and combining this with the multi-scale feature extraction capability of the Pathwavelet model, it can more comprehensively capture the variation patterns of PV power generation, thus significantly improving prediction accuracy. Furthermore, environmental similarity transfer learning enhances the model's adaptability and generalization ability in different scenarios. This method not only meets the real-time monitoring needs of PV power generation at PV power plants but also provides a reference for optimized power system scheduling. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is a flowchart illustrating a photovoltaic power generation prediction method based on the Pathwavelet model proposed in Embodiment 1 of the present invention.

[0045] Figure 2 This 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 This is a schematic diagram of the Pathwavelet model structure in the prediction model proposed in Embodiment 1 of the present invention;

[0047] Figure 4 This is a schematic diagram comparing the prediction results of the photovoltaic power generation prediction model based on Pathwavelet provided in Embodiment 2 of the present invention with the actual power generation output results;

[0048] Figure 5 This is a diagram comparing the predicted results of existing technologies with the actual power output. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this invention clearer, the method for real-time prediction of photovoltaic power generation by constructing a Pathwavelet model is further explained in detail below with reference to relevant descriptions. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of the invention described below can be combined with each other as long as they do not conflict with each other.

[0050] Example 1

[0051] This embodiment proposes a photovoltaic power generation prediction method based on the Pathwavelet model. The flowchart of this method is as follows: Figure 1As shown, historical operating data and meteorological data of the photovoltaic power station are first collected. Energy filtering wavelet transform is used for data preprocessing. A Pathwavelet-based photovoltaic power generation prediction model is constructed, and the model is optimized using environmental similarity transfer learning. The optimized prediction model is then obtained. The photovoltaic system parameters within 72 hours are input into the prediction model to make a final power generation prediction. The framework structure of the Pathwavelet-based photovoltaic power generation prediction model is as follows: Figure 2 As shown, historical operation data and meteorological data of photovoltaic power plants were collected. Considering the limited amount of data, environmental similarity transfer learning was used to optimize the model. Finally, the optimized Pathwavelet model was used for power prediction.

[0052] Specifically, it includes the following operations:

[0053] Step S1: Collect historical data of photovoltaic system parameters and corresponding power generation within a time period T before the prediction time, preprocess the data to obtain a standard dataset and divide it into training set, validation set and test set;

[0054] Data collection: Collect historical data related to photovoltaic power plants within the time period T before the prediction time, where T>8760h. These data cover meteorological data such as light intensity, ambient temperature, air pressure, and relative humidity, as well as corresponding photovoltaic power generation and operating capacity data, to provide rich samples for subsequent model training in order to explore the patterns and features in the data.

[0055] Data preprocessing:

[0056] (1) Data Cleaning: The collected data was cleaned. Outliers were identified using the 3-standard-deviation method. For each data point, including light intensity, temperature, humidity, wind speed, and photovoltaic power generation, the mean and standard deviation were calculated. If the difference between a data point and the mean was greater than 3 standard deviations, the data point was identified as an outlier and removed. Missing values ​​were filled using cubic spline interpolation. This method can reasonably estimate missing values ​​based on the data's trend, ensuring the continuity and integrity of the data.

[0057] (2) Normalization: The minimum-maximum normalization method is used to map the cleaned data to the interval [0,1].

[0058] In this way, data of different magnitudes are unified to the same scale range, which helps to improve the efficiency and stability of model training and makes the model more likely to converge.

[0059] The ratio of the training set, validation set, and test set is 7:1.5:1.5.

[0060] Step S2: Perform energy-filtered wavelet transform on the standard dataset obtained in step S1 to extract periodic features and multi-scale information, and filter out effective wavelet coefficients;

[0061] Energy-filtered wavelet transform feature extraction: A wavelet transform is performed on the preprocessed standard dataset to convert the time-domain data into wavelet-domain data. By analyzing the energy distribution of the wavelet-domain data, an energy percentage threshold of 80% is set. Wavelet coefficients with an energy percentage above this threshold are selected as effective features, while wavelet coefficients representing noise are removed. Then, the extracted wavelet-domain features are concatenated with the preprocessed time-domain data features and used as input to the Pathwavelet model, providing the model with more comprehensive information.

[0062] Step S3: Construct a photovoltaic power generation prediction model based on Pathwavelet, and train the prediction model using the dataset obtained in step S2;

[0063] A photovoltaic power generation prediction model based on Pathwavelet was built within a deep learning framework. This model includes components such as a patch embedding layer, a multi-head self-attention layer, and a feedforward 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; and the feedforward neural network layer performs further nonlinear transformations and integration on the extracted features.

[0064] like Figure 3 As shown, the photovoltaic power generation 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). It performs periodic decomposition through wavelet transformation, adaptively divides the time series data into optimal patches of different scales, and then designs attention mechanisms within and between patches for downstream tasks.

[0065] Among them, the multi-scale Transformer module processes the input photovoltaic system parameter time series data Y∈R. M×e , where R M×e Let S represent the set of real number matrices with M rows and e columns. Define a set S = {S1, ..., S2} containing N patches. M}, where each patch size corresponds to a patch partitioning operation, for the input time series data Y∈R M×e Using a size of S iPatches (selected from set S) are used to divide the time series data. Different patch sizes result in different temporal resolutions in the divided time series data. Based on the patch division at each scale, a dual attention mechanism (intra-patch attention and inter-patch attention) is used to model the temporal dependencies at different ranges. i After the patch is divided, (Y) is obtained. 1 ,Y 2 ,…,Y P ), where P represents the number of patches after partitioning;

[0066] We use an intra-patch attention mechanism to model the correlation between different time points within each patch; for the j-th patch, Representative has S i The set of real matrixes in row e and column e is obtained by first performing an embedding operation on the feature dimension e. Representative has S i line f m The set of real matrix columns is then used to perform a linear mapping to obtain the key matrix and value matrix. Initialize a learnable query matrix. Then to Perform cross-attention computation to model the local details within the j-th patch, expressed as:

[0067]

[0068] in, This represents the attention result within the j-th patch, where T represents the transpose. This represents the key matrix corresponding to the j-th patch. This represents the value matrix corresponding to the j-th patch. For a learnable query matrix, f m for Feature dimensions;

[0069] After processing by the in-patch attention mechanism, the length of each patch will increase from S. i The value becomes 1. By merging the attention results from each patch, the final result can be obtained. Representative has P rows f m The set of real matrix columns, the final result The expression is:

[0070]

[0071] in, This represents the attention result obtained from the Pth patch;

[0072] Inter-patch attention modeling captures global correlations between different patches by modeling the relationships between them in the partitioned time-series data. Perform embedding operations on the feature dimension e, where S i ∈S; The representative has P rows and S i The columns and the e-dimensional three-dimensional array are obtained through linear mapping according to the standard self-attention mechanism. Representative has P rows f n The set of real matrix columns is used to calculate the attention result Attn. inter-patch , representing the global correlation of time series, is expressed as:

[0073]

[0074] Where T represents transpose, Q inter-pstch K represents the query matrix for inter-patch attention computation. inter-patch V represents the key matrix for inter-patch attention computation. inter-patch f represents the value matrix for inter-patch attention computation. n The feature dimension representing the attention calculation matrix between patches;

[0075] The Adaptive Pathways module mainly includes a multi-scale router and a multi-scale aggregator, which are used to implement adaptive multi-scale modeling in time series forecasting.

[0076] Among them, the multi-scale router selects the optimal patch partitioning size through wavelet transform, thereby controlling the multi-scale modeling process; and introduces a period decomposition module and a trend decomposition module into the router to extract periodic and trend patterns.

[0077] Periodic decomposition transforms time-series data from the time domain to the wavelet domain to extract periodic patterns; discrete wavelet transform is used to decompose the input time-series data into wavelet coefficients, and the top K coefficients by absolute value are selected. g Wavelet coefficients, these coefficients are grouped into a set, D top Then, the periodic mode Y is obtained through discrete wavelet inverse transform. cycle The formula is:

[0078] Y cycle =IDWT(D top )

[0079] Where D is the wavelet coefficient, D top The top K coefficients by absolute valueg The set that constitutes;

[0080] Regarding trends, different kernels are used to perform average pooling on the remaining parts after period decomposition to extract the trend pattern Y. rem For different kernels, a weighted operation is used to obtain the final trend term representation, and its calculation formula is as follows:

[0081]

[0082] Among them, H(Y) rem ) represents Y rem The weighting coefficients, Represents the P-th kernel pair Y rem The result of average pooling;

[0083] Add the periodic term and trend term to the original input and perform a linear mapping to obtain Y. trans ∈R e Based on the result of time series decomposition Y trans The router uses the routing function S(·) to generate path weights, thereby selecting an appropriate patch size for partitioning. To avoid repeatedly selecting the same few patch sizes during weight generation, which would cause the corresponding scale module to update repeatedly and ignore 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] in, W represents the path weight vector. s W represents the learnable weight matrix. noiose Represents noise weight;

[0086] To maintain route sparsity while encouraging the selection of critical scales, Top is used on path weights. K The strategy is to retain the weights of the first K paths and set the weights of the rest to 0. The final result is represented as...

[0087] The multi-scale aggregator performs weighted aggregation of 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... This indicates the patch partitioning and dual attention required for this patch size. Indicates a size of T kThe output of the multi-scale Transformer block corresponding to the patch is weighted and aggregated by the aggregator based on path weights to obtain the final output:

[0088]

[0089] in, Represents the path weight vector The weight corresponding to the k-th patch partition size, U k Represents a linear transformation matrix. This represents the output feature matrix of the multi-scale Transformer module at the k-th patch partition size. When the condition is met, the indicator function I(·) outputs 1; otherwise, it outputs 0.

[0090] Step S4: Optimize model parameters and update the model in real time through environmental similarity transfer learning;

[0091] Environmental similarity transfer learning is used to find source photovoltaic (PV) power plant data with similar environments and power generation characteristics when the amount of data for the target PV power plant is limited. Source plant data with a similarity exceeding 80% is selected by comparing the similarity of meteorological parameters and geographical distance. The Pathwavelet-based PV power generation prediction model is pre-trained using this source plant data. During pre-training, the parameters of the first two layers of the model are fixed, and only the parameters of the last two layers related to the target plant data are fine-tuned. After pre-training, the model is further fine-tuned on the target plant data to optimize the model parameters and make it more adaptable to the actual conditions of the target plant. The power prediction model is updated every 5 days to adapt to constantly changing weather and power generation conditions and maintain the model's predictive performance.

[0092] Step S5: Input the photovoltaic system parameters into the prediction model with optimized parameters from step S4 to predict the power generation.

[0093] Meteorological monitoring equipment installed at photovoltaic power stations acquires real-time meteorological data on solar irradiance, ambient temperature, air pressure, and relative humidity. Photovoltaic power generation and operating capacity are obtained from the power station's operational data. Data acquisition is set to occur every 15 minutes to ensure timeliness and provide the latest input information for real-time forecasting. The pre-processed, real-time meteorological data is then input into an optimized power prediction model for calculations, yielding a high-precision forecast of photovoltaic power generation for future periods.

[0094] Example 2

[0095] This embodiment provides a method for predicting photovoltaic power generation based on the Pathwavelet model, and introduces it as an example of its application in a photovoltaic power station;

[0096] First, let me briefly introduce the workflow of a photovoltaic power station:

[0097] In a photovoltaic power station, solar cell arrays convert sunlight into direct current (DC) under illumination. This DC power is collected by a combiner box and transmitted to a DC distribution cabinet, then to an inverter. The inverter converts the DC power into alternating current (AC) that matches the grid frequency, and then transmits it to an AC distribution cabinet. Depending on the needs, the AC power can be connected to the user side or to the grid via a step-up transformer. In addition, monitoring and communication devices monitor the operating status of the photovoltaic power station in real time and transmit the data to the control center for remote monitoring and management.

[0098] The specific methods employed include:

[0099] Step 1: Taking the data from a photovoltaic power station over a year as an example, with 15 minutes as a time step, collect the parameters of the photovoltaic system in the photovoltaic power station through sensors;

[0100] The photovoltaic system parameters include: irradiance, ambient temperature, air pressure, relative humidity, and operating capacity data; these photovoltaic system parameters are collected by sensors installed in the photovoltaic power station.

[0101] Specifically: light intensity is collected by a light sensor, ambient temperature is collected by a temperature sensor, air pressure is collected by a pressure sensor, relative humidity is collected by a humidity sensor, and power-on capacity data is collected by 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 prediction model based on Pathwavelet to predict the power generation.

[0103] Prediction results are as follows Figure 4 As shown, by Figure 4 It can be seen that the predicted power curve matches the fluctuation trend of the actual power curve, the predicted power can reflect the actual power, and the prediction effect is good.

[0104] To verify the effectiveness of the method proposed in this invention, the PatchTST model was used to make predictions on the same dataset. The prediction results of this model are as follows: Figure 5 As shown, the predicted power curve and the actual power curve have similar trends, but there are also significant deviations. For details on the prediction model based on PatchTST, please refer to the introduction in "A Time Series is Worth64 Words: Long-term Forecasting with Transformers".

[0105] To measure the accuracy of model predictions, this invention uses the mean error (MAE) and root mean square error (RMSE) to detect the model's predictive ability. The calculation formulas are as follows:

[0106]

[0107] Where n is the number of samples, y i For the true value, This is a predicted value;

[0108]

[0109] Where n is the number of samples, y i For the true value, This is a predicted value;

[0110] The proposed method yields a mean average error (MAE) of 0.48 and a root mean square error (RMSE) of 0.47. In contrast, the test results using the PatchTST model show a mean average error (MAE) of 0.50 and a root mean square error (RMSE) of 0.48. This demonstrates that the energy-filtering wavelet transform constructed in this model effectively filters noise from the input data and reveals the periodicity and trend of the data. Furthermore, with limited data, environmental similarity transfer learning optimizes the model, making its predictions more realistic. Comparative analysis shows that the model's predictive ability meets expectations.

[0111] The above-described specific embodiments provide a more detailed explanation of the purpose, technical solution, and beneficial effects of the present invention. It should be noted that the above content is merely a specific embodiment of the present invention and is not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A photovoltaic power generation prediction method based on the Pathwavelet model, characterized in that, The method includes: Step 1: Collect historical data of photovoltaic system parameters and corresponding power generation within a time period T before the prediction time, preprocess the data to obtain a standard dataset, and divide it into training set, validation set and test set; Step 2: Perform energy-filtered wavelet transform on the standard dataset 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 train the prediction model using the dataset that has undergone energy-filtered wavelet transform in Step 2; Step 4: Optimize model parameters through environmental similarity transfer learning; Step 5: Input the photovoltaic system parameters into the prediction model with optimized parameters from Step 4 to predict the power generation. 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, which model the interrelated relationships between time points within and between patches 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, thereby controlling the multi-scale modeling process. The multi-scale router extracts periodic and trend patterns by introducing a periodic and trend decomposition module.

2. The method according to claim 1, characterized in that, The photovoltaic system parameter time series data input into the multi-scale Transformer module is: ,in Representative has OK The set of real number matrices in columns is defined by defining a set containing N patches. Using a size of The patch divides the input photovoltaic system parameter time-series data, where... The timing result of patch partitioning is as follows: ,in, S N These represent patches of different sizes. P Indicates the number of patches; In-patch attention modeling represents the correlation between different time points within each patch, expressed as: in, Representing the The attention result matrix within each patch. Represents transpose. , They are respectively The key matrix and value matrix are obtained through linear mapping. Representing the Input data after patch division within a patch For feature dimensions The matrix obtained by embedding. for Feature dimensions, A learnable query matrix; The attention results from each patch are combined to obtain the final result. , Representative has OK The set of real matrix columns, the final result The expression is: in, Representing the Attention results obtained from each patch; Inter-patch attention modeling is used to capture global correlations between different patches and to analyze the time-series parameter data of the partitioned photovoltaic system. Embedding is performed on the feature dimension, and the result is obtained through linear mapping according to the standard self-attention mechanism. Calculate the attention result , representing the global correlation of time series, is expressed as: in, Represents transpose. The query matrix representing the attention calculation between patches. The key matrix represents the attention computation between patches. The value matrix representing the attention calculation between patches. Representative matrix The feature dimensions.

3. The method according to claim 1, characterized in that, The multi-scale router performs periodic decomposition of the input time series using discrete wavelet transform and inverse discrete wavelet transform, expressed as follows: Among them, These are wavelet coefficients. Ranked by absolute value of coefficient The set that constitutes; Then, using different Trend decomposition is performed using average pooling and weighting operations to obtain trend patterns. The periodic term and trend term are added to the original input and linearly mapped to obtain... Then, path weights are generated through a routing function, and noise terms are introduced. To increase randomness, the expression is: in, Represents the path weight vector. Represents the learnable weight matrix. Represents noise weight; Finally use Before choosing a strategy K Each weight determines the patch partition size.

4. The method according to claim 1, characterized in that, 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. At that time, the corresponding patch partitioning and dual attention mechanism are executed. The aggregator performs weighted summation of the outputs at different scales according to the path weights to obtain the final output, realizing the fusion of multi-scale features. The expression is: in, Represents the path weight vector The corresponding number in the middle The weight of each patch partition size, Represents a linear transformation matrix. Representing the The output feature matrix of the multi-scale Transformer module under each patch partition size, when At that time, indicator function I (·) Output 1, otherwise output 0.

5. The method according to claim 1, characterized in that, The environmental similarity transfer learning in step 4 involves a comprehensive evaluation of meteorological conditions and geographical coordinates. Source photovoltaic power stations with an environmental similarity of over 80% to the target power station are selected. During pre-training, the parameters of the first two layers of the model are fixed, and only the parameters of the last two layers related to the target station data are adjusted, including the query matrix for attention calculation within the patch. The query matrix for inter-patch attention calculation Noise weights when generating path weights Fine-tuning is performed using a small learning rate of 0.001 for multiple rounds of iterative training.

6. The method according to claim 1, characterized in that, The photovoltaic system parameters in step 1 include irradiance, ambient temperature, air pressure, relative humidity, and operating capacity data. The preprocessing includes data cleaning and normalization. The ratio of the training set, validation set, and test set is 7:1.5:1.

5.

7. The method according to claim 1, characterized in that, In step 2, energy screening retains wavelet coefficients with an energy ratio exceeding 80%.

8. 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 module is a solar cell array or a battery; The control center predicts power generation by collecting photovoltaic system parameters based on the method described in any one of claims 1-7.

9. The system according to claim 8, characterized in that, The photovoltaic system parameters include: irradiance, ambient temperature, air pressure, relative humidity, and operating capacity data; The parameters of the photovoltaic system are collected by sensors and transmitted to the control center.