TimeGAN-based photovoltaic power prediction method considering turning weather
By using TimeGAN to generate turning point weather data, CEEMDAN-VMD decomposition, and SSA-LSSVM combined prediction model, the problems of sample scarcity and feature extraction in photovoltaic power prediction under turning point weather conditions are solved, and high-precision and stable photovoltaic power output prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies face challenges in predicting photovoltaic power during transitional weather events, including scarce samples, uneven data distribution, insufficient model generalization ability, redundant variables increasing model complexity, difficulty in capturing key driving factors, and insufficient extraction of time-series features, resulting in insufficient prediction accuracy and stability.
TimeGAN is used to generate turning point weather data, and the missing data is filled by K-nearest neighbor algorithm with meteorological similarity weighting. Highly correlated meteorological features are selected by Pearson correlation coefficient, and photovoltaic power output sequence is decomposed by CEEMD. SSA-LSSVM combined prediction model is constructed, and two-layer feature sequence input is used to improve prediction accuracy.
It improves the accuracy and stability of photovoltaic power output prediction under changing weather conditions, reduces prediction errors, and enhances the model's adaptability and prediction accuracy.
Smart Images

Figure CN122020609A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic power prediction, specifically relating to a photovoltaic power prediction method based on TimeGAN that takes into account transitional weather conditions. Background Technology
[0002] In response to the "dual carbon" goal, global photovoltaic (PV) installed capacity has continued to grow rapidly. However, PV power generation is strongly influenced by meteorological factors such as solar irradiance, temperature, wind speed, and cloud cover, exhibiting highly random, volatile, and nonlinear characteristics. Especially under abrupt weather changes (such as strong winds, low temperatures, and severe convection), PV output is prone to precipitous fluctuations or sudden changes, which not only seriously affect the power balance and dispatch security of the power system but may also cause irreversible damage to PV modules and grid-connected equipment. Accurate PV power forecasting is a core technical support for ensuring the safe and stable operation of the power grid after a high proportion of PV is connected to the grid and reducing the curtailment rate. According to the forecast time domain, it can be divided into ultra-short-term, short-term, and medium-to-long-term forecasts; according to the technical approach, it can be divided into physical models, statistical models, artificial intelligence models, and hybrid models.
[0003] In recent years, deep learning technology has become the mainstream technology for photovoltaic power prediction due to its powerful temporal modeling capabilities, with models such as Long Short-Term Memory Networks (LSTM), Artificial Neural Networks (ANN), and Least Squares Support Vector Machines (LSSVM) being widely used. However, existing technologies still face several challenges: First, the suddenness and randomness of abrupt weather events lead to an extreme scarcity of historical samples for such scenarios, particularly for newly built photovoltaic sites. This directly results in uneven distribution of model training data, insufficient generalization ability, and a significant decrease in prediction accuracy for extreme scenarios. Second, there is a complex nonlinear relationship between photovoltaic data and meteorological variables, and the influencing mechanisms differ significantly across seasons and weather types. Traditional feature selection methods struggle to accurately capture key driving factors, and redundant variables can increase model complexity and reduce prediction stability. Third, photovoltaic power output sequences exhibit strong non-stationarity, making it difficult for single data decomposition or single prediction models to fully extract their deep temporal features. Especially during sudden weather changes, the model struggles to adapt to the rapid fluctuations in power output.
[0004] Furthermore, existing augmentation methods for small sample problems largely rely on traditional Generative Adversarial Networks (GANs), which struggle to accurately capture the temporal dependencies between photovoltaic power and meteorological data, leading to pattern collapse or distortion in the generated data. In the data preprocessing stage, outlier detection and missing value imputation often employ fixed thresholds or simple interpolation methods, failing to fully integrate the meteorological driving characteristics of photovoltaic data, resulting in data quality insufficient to support high-precision predictions. Therefore, an integrated solution combining temporal data augmentation, accurate feature extraction, and a stable prediction model is urgently needed to address the challenges of accuracy and stability in photovoltaic power prediction under transitional weather conditions. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a photovoltaic power prediction method based on TimeGAN that considers transitional weather conditions. To address the insufficient sample size during transitional weather, a TimeGAN sample expansion method is introduced. Simultaneously, the inherent correlation between sequences is fully considered, aiming to improve the accuracy of photovoltaic power prediction. This method is of great significance for photovoltaic output prediction, grid-connected operation, and scheduling planning during transitional weather conditions.
[0006] This invention provides a TimeGAN-based photovoltaic power prediction method considering transitional weather conditions, comprising: S1. Perform data preprocessing on the original photovoltaic power output and meteorological data, detect outliers using reconstruction error, and fill in missing data using a bidirectional K-nearest neighbor algorithm with meteorological similarity weighting. S2. Based on the preprocessed data, the correlation between various meteorological factors and historical photovoltaic power output data is analyzed by the Pearson correlation coefficient method to screen highly correlated meteorological features. S3. Generate transitional weather data that fits the time series characteristics of photovoltaics through the Time-GAN generative adversarial network to expand the transitional weather dataset; S4. Based on the expanded dataset, the historical original photovoltaic power output sequence is decomposed in two ways using complementary set empirical mode decomposition and variational mode decomposition combined with K-means clustering algorithm to extract the photovoltaic power output feature mode sequence. S5. Construct an SSA-LSSVM combined prediction model. Combine highly correlated meteorological features to construct a two-layer feature sequence of meteorological feature sequence and photovoltaic power output feature mode sequence. Input the two-layer feature sequence into the combined prediction model and output the photovoltaic power output prediction result.
[0007] Furthermore, in S1, outliers are detected using reconstruction error based on the differences in distribution characteristics between normal and abnormal data: , In the formula: s(x) is the reconstruction error; x is the original sample. The reconstructed data output by the autoencoder; Anomaly detection principles: , In the formula: θ is the anomaly threshold, which is the 95th percentile of the reconstruction error of the dataset; when the reconstruction error of a sample is greater than the 95th percentile of the reconstruction error of the dataset, it is judged as an anomaly.
[0008] Furthermore, in S1, missing data is filled using a bidirectional K-nearest neighbor algorithm weighted by meteorological similarity, calculated as follows: , , In the formula: K is the neighborhood radius, w i F represents the meteorological similarity weight between time i and the missing time m; i F represents the meteorological feature vector at time i; m This represents the meteorological feature vector at the current time to be filled; σ is the bandwidth parameter; x m x represents the missing value to be filled. i Let be the photovoltaic output value at time i.
[0009] Furthermore, in S2, the Pearson correlation coefficient is used to measure the correlation and degree of correlation between different characteristic variables and photovoltaic output. The calculation formula is as follows: , In the formula: and These represent the values of the two variables respectively; and These represent the sample means of the two variables, respectively. and They represent and The l-th observation; n represents the number of samples.
[0010] Furthermore, S3 specifically refers to: S31. Define S and X as vector spaces representing static and dynamic features, respectively, with the following distribution: The distribution obtained by training on a real dataset is The global and local optimization objectives for constructing Time-GAN are as follows: , , In the formula: This represents the eigenvector space from time t=1 to t=T; This represents the dynamic characteristics at time t-1; S32. To achieve the global optimization objective, a differentiable encoder-decoder structure is constructed to support distribution alignment in the latent space; the embedding function e is implemented through a recurrent neural network to convert high-dimensional features into lower-dimensional latent codes. , The recovery function r is a feedforward neural network that restores the latent code to its original dynamic and static features: , The expressions for dimensionality reduction and dimensionality increase are: , In the formula, These represent static and dynamic feature vectors, respectively. These are low-dimensional feature vectors; S33. Based on the global and local optimization objectives of S31, the distribution characteristics and temporal dynamics of the time series are learned simultaneously through adversarial training and supervised learning. The training objectives are as follows: Adversarial training is conducted in the latent space to achieve a global optimization objective. , , In the formula: θ e θ r θ g θ d Represents embedding, recovery, generation, and discrimination of network parameters; L s Indicates monitoring loss; L U To combat losses; L R The reconstruction loss is represented by λ and η, which are equilibrium hyperparameters. For local optimization objectives, a supervised loss constraint is introduced to ensure temporal coherence: , Where: Where: The true value at time t. The predicted value at time t This indicates the expected value of the number. This loss forces the generator to learn conditional transition probabilities. This ensures that the synthesized sequence satisfies Markov dependencies.
[0011] The real event sequence is mapped to the latent space by embedding network, and then a generator combines noise vectors to generate a new latent sequence. This sequence is simultaneously subjected to adversarial training and supervised learning, and finally a synthetic time series that conforms to the distribution of real data is generated.
[0012] Furthermore, S4, based on the expanded dataset, uses complementary set empirical mode decomposition and variational mode decomposition combined with K-means clustering algorithm to perform dual decomposition on the historical original photovoltaic power output sequence and extract photovoltaic power output feature mode sequence;
[0013] S41, CEEMDAN uses the original power curve P(t)+ε0ω j (t) In the first stage, i.e., when k=1, M experiments are conducted, where ω j (t) represents Gaussian white noise conforming to a normal distribution, j=1,2,…,M, and ε0 is the amplitude constant of the Gaussian white noise; it is decomposed by EMD to obtain the first eigenmode function I. j,1 Then CEEMDAN obtains a component that is all I j,1The mean, that is: , In the first stage, the residual sequence r1(t) for the first iteration is calculated: , By adaptively adding noise, the sequence r1(t)+ε1E1(ω) j (t)) performs M EMD decompositions until its first IMF is obtained, where ε1 is the Gaussian white noise adaptive coefficient added after the first stage, and E1(∙) is the first component obtained by EMD; at this time, the second component I2 of CEEMDAN is calculated; , For each remaining stage k, repeat S23 and calculate the k+1 modal components as follows: , , In the formula: r k (t) represents the residual sequence at the k-th iteration; ε k E represents the adaptive coefficients corresponding to the Gaussian white noise added after the k-th stage. k (⋅) represents the k-th component obtained from EMD; Until the obtained residual signal no longer performs any IMF, and the standard condition is that it is impossible to extract IMF from the residual, and the number of extreme points does not exceed 2; The final residual signal is: , In the formula: K is the total number of modal components; Therefore, the original power P(t) is finally decomposed by CEEMDAN as follows: .
[0014] S42. Calculate the mode function u obtained from VMD decomposition using Hilbert transform. k The analytic signal (t) is correlated with the signal to obtain a one-sided spectrum; First, regarding the mode function u k (t) Applying the Hilbert transform, we obtain its analytic signal: , In the formula, is u k Hilbert transform of (t); For z k Perform a Fourier transform on (t) to obtain its frequency representation: , In the formula, F represents the Fourier transform, and ω is the angular frequency; Due to the analytic signal z k (t) contains only positive frequency components, and its Fourier transform z k (ω) is also one-sided, therefore, it can be directly derived from z. k Extract the one-sided spectrum from (ω); the one-sided spectrum is usually represented as the amplitude spectrum |z|. k (ω)∣; Each u k The spectrum of (t) is modulated to the corresponding baseband; the signal is demodulated by Gaussian smoothing, and each u is calculated. k Given the bandwidth of (t), we obtain the corresponding constrained variational problem; Gaussian function definition: , In the formula, σ is the standard deviation of the Gaussian function, which controls the degree of smoothing; For signal u k (t) Perform Gaussian smoothing: , In the formula, ∗ represents the convolution operation; For the smoothed signal) The bandwidth can be estimated by calculating its Fourier transform: , Bandwidth-constrained issues: , In the formula, B0 is the given upper limit of bandwidth; By using quadratic penalties and Lagrange multipliers, the constrained problem can be transformed into an unconstrained problem: , In the formula: {u k}、{ω k} represents the set of all modal functions and their center frequencies; λ is the Lagrange multiplier; α is the quadratic penalty factor; δ(t) is the Dirac function; j is the imaginary part; Finally, the modal functions and center frequencies are obtained through iterative updates.
[0015] Furthermore, in S5, the SSA-LSSVM combined prediction model includes: 1) Two-layer feature construction layer: Constructing a two-layer feature sequence consisting of meteorological feature sequences and photovoltaic power output feature mode sequences as the training sample set: , In the formula: x d y is a highly correlated meteorological feature vector. d For the photovoltaic power output characteristic sequence, z dIt is a dual-channel joint input sequence; 2) Dual-channel kernel mapping layer: A dual-channel hybrid kernel function is used to map the input samples from the original space to a high-dimensional feature space, and the output is a fused kernel matrix: , , , Where: K m K is the sub-core of the meteorological channel. y For the power inertial channel subcore, K R To capture the nonlinearity of meteorological factors, K P To preserve the linear trend between meteorological and power parameters, the kernel function is defined as h, which represents the lag channel bandwidth. As a reference hysteresis power vector, K fus For fusion core, The mixing coefficient, Dual-channel fusion weights; 3) Optimal Decision Function Output Layer: Utilizing a nonlinear high-dimensional feature space, an optimal decision function is constructed to fit the sample set. Then, using structural minimization theory, the regression problem is transformed into a quadratic optimization problem to solve for the parameters of the optimal decision function. , In the formula: J(w,e) is the optimization objective, w is the weight vector, and w T Let b be the transpose of the weight vector, e be the bias term, and A be the total number of training samples. a Let y be the fitting error of the a-th sample, C be the penalty parameter, and y be the error of the a-th sample. a Let a be the true value of the a-th sample. Refers to the nonlinear mapping function, z a Let a be the input feature of the a-th sample; Input by K fus The kernel matrix output by the established dual-channel kernel mapping layer, the actual photovoltaic power output values of the training samples, the penalty parameters, and the total number of training samples are used to output the Lagrange multipliers and the optimal bias term. Based on this, the final optimal decision function is constructed, and the predicted photovoltaic power output value is output. , In the formula: y new For predicted values, For Lagrange multipliers, z new For the features of the new sample to be predicted, The meteorological features of the a-th training sample are... The meteorological characteristics of the sample to be predicted The photovoltaic output characteristics of the a-th training sample are as follows: The photovoltaic output characteristics of the sample to be predicted; The final photovoltaic power output prediction value is obtained by weighted summation of the Lagrange multipliers obtained after the Lagrange solution and the dual-channel kernel function. 4) During the LSSVM prediction process, optimize the LSSVM using SSA to quickly find the optimal parameters. , C, and reduce photovoltaic power prediction error.
[0016] Furthermore, LSSVM is optimized using SSA to quickly find the optimal parameters. , C, and reduce photovoltaic power prediction errors, including: Initialization: Set the sparrow population size to 40, the maximum number of iterations to 200, the proportion of discoverers to 20%, the proportion of vigilants to 18%, and the safety threshold to 0.8; Initialize sparrow positions: Randomly generate a group of sparrows in the solution space. The position of each sparrow represents a set of candidate hyperparameter combinations, including penalty parameters, meteorological channel mixing coefficients, and dual-channel fusion weights. For each combination of hyperparameters represented by a sparrow, a corresponding LSSVM model is constructed, and the model is trained on the training data to obtain the Lagrange multipliers and bias terms. The model is then applied to the validation set, and the error is calculated and used as the fitness value. The smaller the fitness value, the better the parameter combination. Update the discoverer positions: Sort the sparrows by fitness, and the top 20% with the best fitness become discoverers. They are responsible for exploring new possible solutions in the search space, and their movement strategies fall into two categories: when the environment is safe, they conduct a small-scale, detailed search in their vicinity; when they receive a danger signal, they quickly move to other areas for a large-scale exploration. Update the follower positions: The remaining sparrows become followers, following the discoverers in the search. Followers with lower fitness will move closer to their current optimal position to try to improve their own status; while followers with higher fitness will compete near the optimal position to become the new discoverer. Update the watchdog positions: Randomly select some sparrows as watchdogs, responsible for monitoring abnormal situations in the population. When a sparrow's fitness is significantly better than the population average, the watchdog will sound an alarm, prompting other sparrows to move away from that position to prevent the algorithm from getting trapped in local optima too early; when a sparrow is in the worst position in the population, the watchdog guides it to move in a better direction. Boundary handling and iterative judgment: Check if the positions of all sparrows exceed the preset parameter value range. For positions that exceed the boundary, pull them back to the boundary; then update the global optimal position and optimal fitness value. If the maximum number of iterations has not been reached, return to the fitness evaluation stage to continue the search; otherwise, proceed to the final stage. Constructing the optimal model: Output the optimal hyperparameter combination found during the search process, retrain the LSSVM model using all training data, and obtain the final Lagrange multipliers and bias terms. Apply the optimized model to a practical photovoltaic power prediction task.
[0017] The beneficial effects of this invention are as follows: The method utilizes reconstruction error to detect outliers; considering the strong meteorological driving force of photovoltaic power output data, a bidirectional K-nearest neighbor algorithm with meteorological similarity weighting is used to fill in missing data. First, neighboring time periods are found based on meteorological similarity, and then bidirectional time-series weighted interpolation is used, avoiding the problem of fixed thresholds or simple interpolation methods not considering meteorological driving forces; the correlation analysis of photovoltaic power output influencing factors is performed using the Pearson correlation coefficient method, and highly correlated meteorological features are selected as input into the prediction model; then, to address the insufficient samples of transitional weather, a time-series generative adversarial network is used to expand the transitional weather dataset. This method jointly trains meteorological sequences and power sequences adversarially, which, compared to traditional GANs that only use power as a single variable, fully considers the meteorological coupling between sequences, preventing the generated sequences from becoming disconnected from meteorological driving forces; finally, based on the expanded dataset, the photovoltaic power output feature sequence is output using the CEEMDAN-VMD dual decomposition algorithm, and jointly inputs it with the highly correlated meteorological feature sequence into the LSSVM prediction model through dual channels. The model parameters are then optimized using SSA to output the final photovoltaic power output prediction value. The method described in this invention not only makes full use of historical photovoltaic power output sequences and meteorological sequences, and fully extracts feature sequences through correlation analysis and dual decomposition, but also enhances the influence of meteorological driving forces on system uncertainty under transitional weather by using weighted meteorological and power dual-channel kernel functions, jointly inputting them into the prediction model and optimizing parameter selection, thereby improving the accuracy and stability of photovoltaic power output prediction under transitional weather. Attached Figure Description
[0018] Figure 1 This is a flowchart of the method described in this invention; Figure 2 Pearson heatmap; Figure 3 Comparison of irradiance and photovoltaic output before and after TimeGAN expansion; Figure 4 The results are CEEMDAN mode decomposition results; Figure 5 K-means clustering results for multiple IMF components; Figure 6 The VMD decomposition results for Co-IMF1; Figure 7 Prediction results of various methods under normal sunny conditions Figure 8 Error curves for each method under normal sunny conditions. Figure 9 The prediction results of each method under transformative weather conditions; Figure 10 This is a graph showing the prediction errors of various methods under transformative weather conditions. Detailed Implementation
[0019] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0020] like Figure 1 As shown, this invention provides a photovoltaic power prediction method based on TimeGAN that considers transitional weather conditions, including: S1. Perform data preprocessing on the original photovoltaic power output and meteorological data, detect outliers using reconstruction error, and fill in missing data using a bidirectional K-nearest neighbor algorithm with meteorological similarity weighting. S2. Based on the preprocessed data, the correlation between various meteorological factors and historical photovoltaic power output data is analyzed by the Pearson correlation coefficient method to screen highly correlated meteorological features. S3. Generate transitional weather data that fits the time series characteristics of photovoltaics through the Time-GAN generative adversarial network to expand the transitional weather dataset; S4. Based on the expanded dataset, the historical original photovoltaic power output sequence is decomposed in two ways using complementary set empirical mode decomposition and variational mode decomposition combined with K-means clustering algorithm to extract the photovoltaic power output feature mode sequence. S5. Construct an SSA-LSSVM combined prediction model. Combine highly correlated meteorological features to construct a two-layer feature sequence of meteorological feature sequence and photovoltaic power output feature mode sequence. Input the two-layer feature sequence into the combined prediction model and output the photovoltaic power output prediction result.
[0021] To verify the beneficial effects of this invention, scientific demonstration was conducted through experiments:
[0022] (1) Correlation analysis between various meteorological factors and photovoltaic power output;
[0023] Typically, photovoltaic (PV) power output is affected by various meteorological factors such as irradiance, temperature, air pressure, humidity, wind speed, and precipitation. Therefore, a correlation analysis of these factors is necessary to identify highly correlated elements. This invention employs the Pearson correlation coefficient method to quantify the impact of various meteorological factors on PV power output. Figure 2 As shown in Table 1:
[0024] Table 1. Correlation coefficients between photovoltaic power output and meteorological factors
[0025] Table 1 shows that air pressure and irradiance are positively correlated with actual power, with correlation coefficients of 0.24 and 0.97 respectively, indicating that irradiance has a significant impact on actual power, while air pressure has a smaller impact. The characteristic variables negatively correlated with actual power are temperature, humidity, precipitation, and surface wind speed. The absolute values of the correlation coefficients for humidity and precipitation are both above 0.4, indicating a significant impact on actual photovoltaic power. The correlation coefficients for temperature and surface wind speed are -0.17 and -0.2 respectively, showing a smaller impact on actual power. During transitional weather events such as cold waves, the saturated water vapor pressure of the air decreases, and relative humidity increases significantly. Furthermore, cold waves and other transitional weather events are usually accompanied by the activity of high-pressure systems. The descending airflow brought by these systems can cause precipitation to change from rain to snow or hail, affecting the distribution and intensity of precipitation.
[0026] In summary, the method described in this invention addresses the challenges of frequent transitional weather events and insufficient photovoltaic power output samples during such events. By introducing TimeGAN to expand the small sample size and then using the expanded dataset for photovoltaic power output prediction, the method effectively reduces the prediction error and improves the prediction accuracy under transitional weather conditions.
[0027] (2) TimeGAN sample augmentation;
[0028] To address the insufficient sample size of photovoltaic (PV) output during transitional weather events, this invention expands the dataset using TimeGAN. To verify the effectiveness of the dataset expansion, this invention selects irradiance meteorological factors most relevant to PV output and plots a scatter plot of its correlation with the corresponding PV output data to illustrate the differences in the correlation between irradiance and PV output before and after the expansion. Figure 3 (a) is a schematic diagram of irradiance and photovoltaic output before TimeGAN augmentation dataset. Figure 3 (b) is a schematic diagram of irradiance and photovoltaic output after TimeGAN augmentation of the dataset; by Figure 3 It can be seen that photovoltaic output is positively correlated with irradiance. The higher the irradiance, the greater the photovoltaic output. Moreover, the trend of the dataset before and after expansion is consistent, and the scatter distribution basically meets the rules, which verifies the effectiveness of the sample expansion of the present invention.
[0029] (3) Dual-mode decomposition algorithm;
[0030] To more effectively handle complex multivariate time series, this invention employs a dual mode decomposition method combining CEEMDAN and VMD. This not only avoids the mode aliasing problem caused by single mode decomposition but also decomposes the original sequence into multiple relatively independent subsequences. Simultaneously, K-menas is used to cluster the sample entropy, and variational mode decomposition is performed on the obtained high-frequency components. This not only screens out the key factors affecting photovoltaic laws but also reduces the dimensionality of subsequent model input parameters and eliminates the sequence correlation and redundancy caused by using only variational mode decomposition.
[0031] First, the photovoltaic power output sequence is decomposed into multiple intrinsic mode functions (IMFs) and a residual component using CEEMDAN, as follows: Figure 4 As shown.
[0032] Then, the complexity of each IMF is assessed by calculating its sample entropy, which helps identify the regularity and randomness of the sequence. Based on the sample entropy calculation results, the IMFs are clustered using the K-means algorithm, and then the IMF components in the same cluster are integrated, such as... Figure 5 As shown, it is integrated into Co-IMF1, Co-IMF2, and Co-IMF3, where Co-IMF1 is the high-frequency component; finally, as... Figure 6 The integrated high-frequency component Co-IMF1 is subjected to VMD decomposition to further refine its frequency components.
[0033] (5) Analysis of photovoltaic power output prediction effect
[0034] To visually demonstrate the predictive effectiveness of this method, prediction experiments were conducted for two weather conditions: regular sunny days and transitional weather. Control groups were formed using LSSVM, SSA-LSSVM, and CEEMDAN-LSSVM models. Figures 7 to 10 As shown.
[0035] There are many samples with favorable weather conditions, and each model has been trained sufficiently. Figure 7 Analysis of the prediction results shows that under favorable weather conditions, the peak photovoltaic output is above 7kW. The photovoltaic output predicted by each model is relatively stable, and the prediction results show no significant differences. However, the method proposed in this invention has the highest overall prediction result that matches the actual value. Figure 8 As shown, the proposed method, under normal sunny weather conditions, maintains an overall prediction error within 0.3kW, demonstrating good prediction performance. For transitional weather conditions where photovoltaic output fluctuates or remains low, corresponding experiments are also provided, such as... Figure 9 and Figure 10As shown, under transitional weather conditions, photovoltaic power output is significantly lower than under normal weather conditions, with a peak output of only about 3kW. Both LSSVM and SSA-LSSVM models performed poorly, with significant differences between their predicted and actual values in the latter half of the day, both being significantly lower than the actual power values. The CEEMDAN-LSSVM model performed well overall, while the CEEMDAN-VMD-SSA-LSSVM proposed in this invention is significantly better than the above models. The predicted curves before and after power fluctuations have the highest degree of agreement with the actual value curves, and the prediction error is always controlled within 0.2kW, demonstrating the stability and accuracy of the proposed method.
[0036] Table 2 Comparison of prediction performance of different models
[0037] As shown in Table 2, the prediction performance was evaluated based on MAE and RMSE indices. It can be seen that the proposed method exhibits very stable prediction results and performance across both sample types. Under normal sunny weather conditions, compared to other models, its mean absolute error is reduced, with the root mean square error decreasing by more than 0.06. When predicting under transitional weather conditions, compared to other models, its mean absolute error is reduced by more than 0.01, and the root mean square error is reduced by more than 0.02. In summary, the photovoltaic power prediction method based on TimeGAN considering transitional weather conditions proposed in this invention demonstrates higher prediction accuracy through experimental performance and performance index comparisons. It also shows good performance in predicting different sample types, verifying the prediction performance of this invention.
[0038] The experimental results demonstrate the feasibility and practicality of the present invention. The method described in this invention has guiding significance for improving the accuracy of photovoltaic power prediction, photovoltaic grid-connected operation, and the formulation of scheduling plans.
[0039] The above description is merely a preferred embodiment of the present invention and is not intended to further limit the present invention. All equivalent changes made based on the description and drawings of the present invention are within the protection scope of the present invention.
Claims
1. A photovoltaic power prediction method based on TimeGAN considering transitional weather conditions, characterized in that, Includes the following steps: S1. Perform data preprocessing on the original photovoltaic power output and meteorological data, detect outliers using reconstruction error, and fill in missing data using a bidirectional K-nearest neighbor algorithm with meteorological similarity weighting. S2. Based on the preprocessed data, the correlation between various meteorological factors and historical photovoltaic power output data is analyzed by the Pearson correlation coefficient method to screen highly correlated meteorological features. S3. Generate transitional weather data that fits the time series characteristics of photovoltaics through the Time-GAN generative adversarial network to expand the transitional weather dataset; S4. Based on the expanded dataset, the historical original photovoltaic power output sequence is decomposed in two ways using complementary set empirical mode decomposition and variational mode decomposition combined with K-means clustering algorithm to extract the photovoltaic power output feature mode sequence. S5. Construct an SSA-LSSVM combined prediction model. Combine highly correlated meteorological features to construct a two-layer feature sequence of meteorological feature sequence and photovoltaic power output feature mode sequence. Input the two-layer feature sequence into the combined prediction model and output the photovoltaic power output prediction result.
2. The photovoltaic power prediction method based on TimeGAN considering transitional weather conditions as described in claim 1, characterized in that, In S1, outliers are detected using reconstruction error based on the differences in distribution characteristics between normal and outlier data. , In the formula: s(x) is the reconstruction error; x is the original sample. The reconstructed data output by the autoencoder; Anomaly detection principles: , In the formula: θ is the anomaly threshold, which is the 95th percentile of the reconstruction error of the dataset; when the reconstruction error of a sample is greater than the 95th percentile of the reconstruction error of the dataset, it is judged as an anomaly.
3. The photovoltaic power prediction method based on TimeGAN considering transitional weather conditions as described in claim 1, characterized in that, In S1, missing data is filled using a bidirectional K-nearest neighbor algorithm weighted by meteorological similarity. The calculation formula is as follows: , , In the formula: K is the neighborhood radius, w i F represents the meteorological similarity weight between time i and the missing time m; i F represents the meteorological feature vector at time i; m This represents the meteorological feature vector at the current time to be filled; σ is the bandwidth parameter; x m x represents the missing value to be filled. i Let be the photovoltaic output value at time i.
4. The photovoltaic power prediction method based on TimeGAN considering transitional weather conditions as described in claim 1, characterized in that, S2 specifically refers to: S21. The Pearson correlation coefficient is used to measure the correlation and degree of correlation between different characteristic variables and photovoltaic output. The calculation formula is as follows: , In the formula: and These represent the values of the two variables respectively; and These represent the sample means of the two variables, respectively. and They represent and The l-th observation; n represents the number of samples.
5. The photovoltaic power prediction method based on TimeGAN considering transitional weather conditions according to claim 1, characterized in that, S3 specifically refers to: S31. Define S and X as vector spaces representing static and dynamic features, respectively, with the following distribution: The distribution obtained by training on a real dataset is The global and local optimization objectives for constructing Time-GAN are as follows: , , In the formula: This represents the eigenvector space from time t=1 to t=T; This represents the dynamic characteristics at time t-1; S32. Implement the embedding function e using a recurrent neural network to convert high-dimensional features into lower-dimensional latent codes: , The recovery function r is a feedforward neural network that restores the latent code to its original dynamic and static features: , The expressions for dimensionality reduction and dimensionality increase are: , In the formula, These represent static and dynamic feature vectors, respectively. These are low-dimensional feature vectors; S33. Based on global and local optimization objectives, the distribution characteristics and temporal dynamics of time series are learned simultaneously through adversarial training and supervised learning. The training objective is as follows: Adversarial training is conducted in the latent space to achieve a global optimization objective. , , In the formula: θ e θ r θ g θ d Represents embedding, recovery, generation, and discrimination of network parameters; L s Indicates monitoring loss; L U To combat losses; L R The reconstruction loss is represented by λ and η, which are equilibrium hyperparameters. For local optimization objectives, a supervised loss constraint is introduced to ensure temporal coherence: , Where: Where: The true value at time t. The predicted value at time t This indicates the expected value of the number.
6. The photovoltaic power prediction method based on TimeGAN considering transitional weather conditions according to claim 1, characterized in that, S4. Based on the expanded dataset, the historical original photovoltaic power output sequence is double-decomposed using complementary set empirical mode decomposition and variational mode decomposition combined with K-means clustering algorithm to extract the photovoltaic power output feature mode sequence, including: S41, CEEMDAN uses the original power curve P(t)+ε0ω j (t) In the first stage, i.e., when k=1, M experiments are conducted, where ω j (t) represents Gaussian white noise conforming to a normal distribution, j=1,2,…,M, and ε0 is the amplitude constant of the Gaussian white noise; it is decomposed by EMD to obtain the first eigenmode function I. j,1 Then CEEMDAN obtains a component that is all I j,1 The mean, that is: , In the first stage, the residual sequence r1(t) for the first iteration is calculated: , By adaptively adding noise, the sequence r1(t)+ε1E1(ω) j (t)) performs M EMD decompositions until its first IMF is obtained, where ε1 is the Gaussian white noise adaptive coefficient added after the first stage, and E1(∙) is the first component obtained by EMD; at this time, the second component I2 of CEEMDAN is calculated; , For each remaining stage k, repeat S23 and calculate the k+1 modal components as follows: , , In the formula: r k (t) represents the residual sequence at the k-th iteration; ε k E represents the adaptive coefficients corresponding to the Gaussian white noise added after the k-th stage. k (⋅) represents the k-th component obtained from EMD; Until the obtained residual signal no longer performs any IMF, and the standard condition is that it is impossible to extract IMF from the residual, and the number of extreme points does not exceed 2; The final residual signal is: , In the formula: K is the total number of modal components; Therefore, the original power P(t) is finally decomposed by CEEMDAN as follows: , S42. Calculate the mode function u obtained from VMD decomposition using Hilbert transform. k The analytic signal (t) is correlated with the signal to obtain a one-sided spectrum; First, regarding the mode function u k (t) Applying the Hilbert transform, we obtain its analytic signal: , In the formula, is u k Hilbert transform of (t); For z k Perform a Fourier transform on (t) to obtain its frequency representation: , In the formula, F represents the Fourier transform, and ω is the angular frequency; Due to the analytic signal z k (t) contains only positive frequency components, and its Fourier transform z k (ω) is also one-sided, therefore, it can be directly derived from z. k Extract the one-sided spectrum from (ω); the one-sided spectrum is usually represented as the amplitude spectrum |z|. k (ω)∣; Each u k The spectrum of (t) is modulated to the corresponding baseband; the signal is demodulated by Gaussian smoothing, and each u is calculated. k Given the bandwidth of (t), we obtain the corresponding constrained variational problem; Gaussian function definition: , In the formula, σ is the standard deviation of the Gaussian function, which controls the degree of smoothing; For signal u k (t) Perform Gaussian smoothing: , In the formula, ∗ represents the convolution operation; For the smoothed signal) The bandwidth can be estimated by calculating its Fourier transform: , Bandwidth-constrained issues: , In the formula, B0 is the given upper limit of bandwidth; By using quadratic penalties and Lagrange multipliers, the constrained problem can be transformed into an unconstrained problem: , In the formula: {u k }、{ω k } represents the set of all modal functions and their center frequencies; λ is the Lagrange multiplier; α is the quadratic penalty factor; δ(t) is the Dirac function; j is the imaginary part; Finally, the modal functions and center frequencies are obtained through iterative updates.
7. The photovoltaic power prediction method based on TimeGAN considering transitional weather conditions according to claim 1, characterized in that, In S5, the SSA-LSSVM combined prediction model includes: 1) Two-layer feature construction layer: Constructing a two-layer feature sequence consisting of meteorological feature sequences and photovoltaic power output feature mode sequences as the training sample set: , In the formula: x d y is a highly correlated meteorological feature vector. d For the photovoltaic power output characteristic sequence, z d It is a dual-channel joint input sequence; 2) Dual-channel kernel mapping layer: A dual-channel hybrid kernel function is used to map the input samples from the original space to a high-dimensional feature space, and the output is a fused kernel matrix: , , , In the formula: K m K is the sub-core of the meteorological channel. y For the power inertial channel subcore, K R To capture the nonlinearity of meteorological factors, K P To preserve the linear trend between meteorological and power parameters, the kernel function is defined as h, which represents the lag channel bandwidth. As a reference hysteresis power vector, K fus For fusion core, The mixing coefficient, Dual-channel fusion weights; 3) Optimal Decision Function Output Layer: Utilizing a nonlinear high-dimensional feature space, an optimal decision function is constructed to fit the sample set. Then, using structural minimization theory, the regression problem is transformed into a quadratic optimization problem to solve for the parameters of the optimal decision function. , In the formula: J(w,e) is the optimization objective, w is the weight vector, and w T Let b be the transpose of the weight vector, e be the bias term, and A be the total number of training samples. a Let y be the fitting error of the a-th sample, C be the penalty parameter, and y be the error of the a-th sample. a Let a be the true value of the a-th sample. Refers to the nonlinear mapping function, z a Let a be the input feature of the a-th sample; Input by K fus The kernel matrix output by the established dual-channel kernel mapping layer, the actual photovoltaic power output values of the training samples, the penalty parameters, and the total number of training samples are used to output the Lagrange multipliers and the optimal bias term. Based on this, the final optimal decision function is constructed, and the predicted photovoltaic power output value is output. , In the formula: y new For predicted values, For Lagrange multipliers, z new For the features of the new sample to be predicted, The meteorological features of the a-th training sample are... The meteorological characteristics of the sample to be predicted The photovoltaic output characteristics of the a-th training sample are as follows: The photovoltaic output characteristics of the sample to be predicted; The final photovoltaic power output prediction value is obtained by weighted summation of the Lagrange multipliers obtained after the Lagrange solution and the dual-channel kernel function. 4) During the LSSVM prediction process, optimize the LSSVM using SSA to quickly find the optimal parameters. , C, and reduce photovoltaic power prediction error.