Photovoltaic power generation power prediction method based on similar daily clustering and EMD-WT-ISSA-LSTM combined model

By combining similar day clustering and the EMD-WT-ISSA-LSTM model, the accuracy and adaptability issues of photovoltaic power prediction under complex weather conditions are solved, achieving higher accuracy photovoltaic power prediction, especially improving adaptability in rainy weather, and supporting the stable operation of the distribution network.

CN121093069APending Publication Date: 2025-12-09MAINTENANCE BRANCH OF STATE GRID FUJIAN ELECTRIC POWER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511141444.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-12-09

AI Technical Summary

Technical Problem

Existing photovoltaic power prediction methods lack accuracy under complex weather conditions, especially in low-irradiance scenarios such as rainy days, where prediction errors are large and they are difficult to adapt to changes in weather type, affecting the efficiency of power system dispatch.

Method used

A combined model of similar day clustering and EMD-WT-ISSA-LSTM was adopted. Meteorological factors were screened by Pearson correlation coefficient. Unsupervised clustering and wavelet transform were combined to denoise the model. The hidden layer size, time step and learning rate of LSTM were optimized to construct a prediction model that adapts to different weather patterns.

Benefits of technology

It improves the accuracy and adaptability of photovoltaic power generation forecasting, especially showing stronger adaptability in rainy weather scenarios, and enhances the stability of distribution network operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121093069A_ABST
    Figure CN121093069A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic power generation power prediction method based on similar day clustering and an EMD-WT-ISSA-LSTM combination model, and the method comprises the steps: screening meteorological factors with high correlation with photovoltaic power generation power based on a Pearson's correlation coefficient, dividing a weather mode through employing an unsupervised clustering algorithm, and obtaining similar day data sets corresponding to a sunny day, a cloudy day and a rainy day; the method comprises the following steps: decomposing meteorological data into characteristic components through modal decomposition, and denoising and reconstructing through wavelet transform to obtain denoised data; tent chaotic mapping is adopted to initialize the population, a dynamic early warning value which is nonlinearly decreased along with the number of iterations is introduced, and when the fitness value is lower than a preset threshold value, a Levy flight strategy is triggered to adjust a search behavior so as to construct and obtain an improved sparrow search algorithm; performing joint optimization on the hidden layer size, the time step number and the learning rate of the LSTM by using the improved sparrow search algorithm to obtain an optimized LSTM model; and inputting the de-noised data into the optimized LSTM model, and outputting a photovoltaic power generation power prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photovoltaic power prediction technology, and in particular to a photovoltaic power prediction method based on a combined model of similar day clustering and EMD-WT-ISSA-LSTM. Background Technology

[0002] Photovoltaic power generation forecasting is a key supporting technology for the efficient operation of new energy power systems. Its core challenge lies in the strong volatility and randomness of photovoltaic output. Affected by meteorological factors such as solar radiation intensity, cloud movement, temperature, and humidity, photovoltaic power often exhibits complex nonlinear variation characteristics. Especially under cloudy and rainy weather conditions, the power fluctuation is more intense, posing a severe test to the stability and accuracy of the forecasting model.

[0003] In existing technologies, photovoltaic power prediction methods can be broadly classified into three categories: First, methods based on physical models, which calculate power by establishing the photoelectric conversion physical equations of photovoltaic modules and combining them with numerical weather forecast data. However, their accuracy is highly dependent on the accuracy of weather forecasts and they are less adaptable to local micro-meteorological changes. Second, methods based on statistical learning, such as Time Series Analysis (ARIMA) and Support Vector Machines (SVM), predict power by mining statistical patterns in historical data. These methods perform reasonably well when the data distribution is stable, but they struggle to capture the complex nonlinear relationship between meteorological factors and power. Third, methods based on deep learning... Long Short-Term Memory Neural Networks (LSTM) and Convolutional Neural Networks (CNN) have been widely used in photovoltaic forecasting due to their powerful feature extraction capabilities. However, single deep learning models still face many limitations: sensor noise and transmission interference mixed in the raw meteorological data directly affect the quality of the model input; the power curve features of different weather types (such as sunny, cloudy, and rainy days) are significantly different, and training with mixed data can easily lead to a decrease in the model's generalization ability; the setting of key model parameters (such as the number of hidden layer nodes and the learning rate) often depends on empirical tuning, making it difficult to achieve global optimum. These factors all restrict further improvement in prediction accuracy.

[0004] From an engineering application perspective, existing prediction methods often encounter "accuracy bottlenecks" in real-world scenarios. For example, in low-irradiance scenarios such as rainy days, the prediction errors of most models increase significantly due to limited historical data samples, weak power signals, and high noise levels. During transitional periods of changing weather types (such as from sunny to cloudy), the power curve exhibits abrupt changes, making it difficult for models to adapt quickly, resulting in large deviations between predicted and actual values. These problems directly impact the dispatch efficiency of the power system—over-prediction may lead to insufficient conventional power reserves, causing grid frequency fluctuations; under-prediction may result in the curtailment of renewable energy, reducing energy utilization efficiency. Therefore, improving the accuracy and robustness of photovoltaic power prediction under complex weather conditions remains a pressing technical challenge in this field. Summary of the Invention

[0005] To address the shortcomings and deficiencies of existing technologies, this invention provides a photovoltaic power generation prediction method based on a combined model of similar day clustering and EMD-WT-ISSA-LSTM, aiming to improve prediction accuracy and adaptability under complex weather conditions. The method first uses Pearson correlation coefficient to screen meteorological factors highly correlated with photovoltaic power generation, and then combines an unsupervised clustering algorithm to divide meteorological data into three categories of similar day datasets: sunny, cloudy, and rainy, achieving accurate differentiation of different weather patterns. Subsequently, empirical mode decomposition is used to decompose the meteorological data into feature components, followed by wavelet transform for denoising and reconstruction, effectively reducing noise interference on the input data. Simultaneously, an improved sparrow search algorithm is constructed, which optimizes population initialization through Tent chaotic mapping, introduces a dynamically decreasing warning value with the number of iterations, and triggers a Levy flight strategy to adjust search behavior when fitness is poor. This improved algorithm is used to jointly optimize the hidden layer size, time steps, and learning rate of the long short-term memory neural network to obtain a suitable prediction model. Finally, the model is trained based on the classified similar day datasets to achieve photovoltaic power generation prediction. This invention effectively improves the forecasting accuracy under different weather conditions through the synergistic effect of multi-stage technological innovation, especially showing stronger adaptability in rainy weather scenarios, which helps to improve the stability of power distribution network operation.

[0006] The present invention specifically adopts the following technical solution:

[0007] A photovoltaic power generation prediction method based on a combined model of similar day clustering and EMD-WT-ISSA-LSTM includes:

[0008] Based on the Pearson correlation coefficient, meteorological factors with high correlation to photovoltaic power generation were screened. An unsupervised clustering algorithm was used to divide the weather patterns and obtain similar daily datasets corresponding to sunny, cloudy and rainy days. The meteorological data was decomposed into feature components by mode decomposition and then denoised and reconstructed by wavelet transform to obtain denoised data.

[0009] The population is initialized using the Tent chaotic mapping, a dynamic warning value that decreases nonlinearly with the number of iterations is introduced, and the Levy flight strategy is triggered to adjust the search behavior when the fitness value is lower than a preset threshold, so as to construct an improved sparrow search algorithm.

[0010] The improved sparrow search algorithm is used to jointly optimize the hidden layer size, time steps, and learning rate of the LSTM to obtain an optimized LSTM model.

[0011] The denoised data is input into the optimized LSTM model, and the photovoltaic power generation prediction result is output.

[0012] Furthermore, in the screening of meteorological factors with high correlation to photovoltaic power generation based on Pearson correlation coefficient, meteorological factors with absolute correlation coefficient values ​​greater than empirical thresholds are selected, including air temperature, total solar irradiance, solar panel temperature, and humidity.

[0013] Furthermore, the unsupervised clustering algorithm is a K-centroid clustering algorithm, and the step of classifying weather patterns includes:

[0014] (1) Randomly select a preset number of initial cluster centers from the filtered meteorological data, wherein the preset number corresponds to the weather type category;

[0015] (2) Calculate the distance from each data point to all cluster centers, and assign the data point to the cluster corresponding to the nearest cluster center;

[0016] (3) For each cluster, try to replace the current cluster center with other points within the cluster, and select the point that minimizes the total distance within the cluster as the new center;

[0017] (4) Repeat steps (2) and (3) until the cluster center no longer changes or the maximum number of iterations is reached, to obtain the similar day datasets corresponding to sunny, cloudy and rainy days.

[0018] Furthermore, the mode decomposition is Empirical Mode Decomposition (EMD), and the step of decomposing meteorological data into feature components includes:

[0019] (1) Initialize the residuals to the original meteorological data, construct the upper and lower envelopes of the original data through cubic spline interpolation, and calculate the mean envelope;

[0020] (2) Take the difference between the residual and the mean envelope as a candidate component. If the candidate component satisfies the condition of the intrinsic mode function, it is determined as the characteristic component; otherwise, repeat step (1).

[0021] (3) Update the residual by subtracting the characteristic component from the original residual until the residual is a monotonic function or the amplitude is less than the termination condition, and obtain multiple characteristic components and a residual term.

[0022] Furthermore, the wavelet transform denoising and reconstruction step includes:

[0023] (1) Select a wavelet function to perform multi-level decomposition on the feature components to obtain wavelet coefficients in different frequency bands;

[0024] (2) The coefficients of each layer obtained by decomposition are quantized using a preset threshold to suppress the coefficients corresponding to noise;

[0025] (3) Perform inverse wavelet transform on the processed coefficients to reconstruct the denoised meteorological data.

[0026] Furthermore, the specific method for initializing the population using the Tent chaotic mapping is as follows: generating uniformly distributed initial population positions using the Tent mapping formula.

[0027] Furthermore, when the sparrow's fitness value is lower than a preset threshold, the Levy flight strategy updates the position by generating a random step size that follows a Levy distribution, and updates the individual sparrow's position with a large step size generated by Levy flight in order to escape the local optimum.

[0028] Furthermore, in the improved sparrow search algorithm, the population includes discoverers, joiners, and scouts, where the roles of discoverers and joiners can be interchanged. Discoverers are responsible for globally exploring optimal locations, joiners follow discoverers to forage, and scouts are responsible for monitoring danger and triggering warnings. When an alarm is triggered, sparrows on the periphery move closer to the center of the population, while sparrows in the center randomly move closer to other sparrows.

[0029] Furthermore, the similar day dataset is classified into sunny, cloudy, and rainy weather patterns, and corresponding LSTM prediction models are trained for each.

[0030] Furthermore, a photovoltaic power generation prediction system based on a combined model of similar day clustering and EMD-WT-ISSA-LSTM includes:

[0031] The data preprocessing module is used to screen meteorological factors that are highly correlated with photovoltaic power generation based on Pearson correlation coefficient, and to divide weather patterns using an unsupervised clustering algorithm to obtain similar daily datasets for sunny, cloudy, and rainy days. The meteorological data is then decomposed into feature components through mode decomposition, and then denoised and reconstructed through wavelet transform to obtain denoised data.

[0032] The algorithm construction module is used to initialize the population with Tent chaotic mapping, introduce a dynamic warning value that decreases nonlinearly with the number of iterations, and trigger the Levy flight strategy to adjust the search behavior when the fitness value is lower than a preset threshold, so as to build an improved sparrow search algorithm.

[0033] The model optimization module is used to jointly optimize the hidden layer size, time steps, and learning rate of the LSTM using the improved sparrow search algorithm to obtain the optimized LSTM model.

[0034] The prediction module is used to input the denoised data into the optimized LSTM model and output the photovoltaic power generation prediction result.

[0035] And an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the steps of the method described above.

[0036] A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the method described above.

[0037] Compared to existing technologies, this invention and its preferred scheme significantly improve the accuracy and adaptability of photovoltaic power generation prediction through a multi-technology collaborative model design. By combining similar-day clustering and classification training, it can accurately distinguish between different weather patterns such as sunny, cloudy, and rainy days, avoiding insufficient model generalization ability caused by mixed data training, and especially enhancing the predictive adaptability for complex weather such as rainy days. The combined denoising processing of empirical mode decomposition and wavelet transform effectively filters out noise interference in meteorological data, improving the quality of input data and providing a more reliable foundation for subsequent predictions. The improved sparrow search algorithm optimizes the parameters of the long short-term memory neural network. Its introduction of chaotic mapping initialization, dynamic early warning mechanism, and Levy flight strategy enhances the algorithm's global search and local optimization capabilities, making the network parameter configuration more reasonable and further improving the model's predictive performance. These innovative designs work synergistically, not only improving prediction accuracy under different weather conditions but also providing strong support for the stable operation of the power distribution network. Attached Figure Description

[0038] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0039] Figure 1 This is a schematic diagram of the clustering results of similar days in an embodiment of the present invention;

[0040] Figure 2 This is a schematic diagram of the denoising results of empirical mode decomposition combined with wavelet analysis in an embodiment of the present invention;

[0041] Figure 3 This is a schematic diagram illustrating the photovoltaic power generation prediction results of three different models in an embodiment of the present invention;

[0042] Figure 4 This is a flowchart illustrating the implementation of an embodiment of the present invention. Detailed Implementation

[0043] In the following, specific embodiments of this application will be described in detail with reference to the accompanying drawings. Based on these detailed descriptions, those skilled in the art will be able to clearly understand and implement this application. Without departing from the principles of this application, features from various embodiments can be combined to obtain new implementations, or certain features from some embodiments can be substituted to obtain other preferred implementations.

[0044] To make the features and advantages of the present invention more apparent and understandable, specific embodiments are described below in conjunction with the accompanying drawings:

[0045] like Figure 4 As shown, this invention proposes a photovoltaic power generation prediction method based on a combined model of similar-day clustering and EMD-WT-ISSA-LSTM. The method includes: clustering meteorological data into similar-day clusters using Pearson correlation coefficient and K-centroid clustering algorithm; denoising the meteorological dataset using empirical mode decomposition and wavelet transform; optimizing the three parameters of the long short-term memory neural network (LSTM) – hidden layer size, time step number, and learning rate – using an improved sparrow algorithm until the optimal solution is found or the maximum number of iterations is reached; and verifying the photovoltaic power generation data through LSTM model prediction and evaluating the model error results. Compared to a single LSTM model, this invention can effectively improve the prediction accuracy of photovoltaic power generation under different weather types, especially showing stronger adaptability in rainy weather prediction, thus improving the stability of the power distribution network.

[0046] Its implementation process includes the following key points:

[0047] A similarity-day clustering method combining Pearson correlation coefficient and K-centroid clustering algorithm;

[0048] A meteorological signal denoising method combining empirical mode decomposition and wavelet transform;

[0049] An improved sparrow algorithm is used to optimize the photovoltaic power generation prediction model of the long short-term memory neural network;

[0050] The effectiveness of the combined model was verified by simulation.

[0051] The implementation of the similarity-day clustering method combining Pearson correlation coefficient and K-centroid clustering algorithm includes the following steps:

[0052] Step S11: Collect historical photovoltaic power generation data and corresponding meteorological data, and use Pearson correlation coefficient to screen meteorological factors:

[0053] Among the numerous meteorological factors affecting photovoltaic power generation, this invention uses the Pearson correlation coefficient to measure the correlation between meteorological factors and photovoltaic power generation, thereby selecting meteorological factors with high correlation. The Pearson correlation coefficient ranges from -1 to 1; the closer it is to 1, the stronger the positive correlation, and similarly, the closer it is to -1, the stronger the negative correlation. The formula for calculating the Pearson correlation coefficient is as follows:

[0054]

[0055] In the formula: r is the correlation coefficient; Xi and Yi are the data values ​​of the i-th group; Xmean and Ymean are the mean values.

[0056] Step S12: Perform similar day clustering using the K-centroid clustering algorithm:

[0057] The goal of the K-medoids clustering algorithm is to divide data points into K clusters such that each data point belongs to the nearest cluster center, and the sum of the distances from data points within a cluster to the cluster center is minimized. Unlike K-means, which uses the mean as the cluster center, K-medoids uses the data point at the center of the cluster itself as the cluster center, thus improving robustness. The algorithm steps are as follows: 1) Randomly select 3 medoids (centers) from all data points as initial cluster centers. 2) For each data point, calculate its distance to all center points and assign it to the cluster corresponding to the nearest center point. 3) For each cluster, try replacing the current center point with other points within the cluster, calculating the total distance after the replacement. Select the point that minimizes the total distance as the new center point. 4) Repeat steps 2) and 3) until the center point no longer changes or the maximum number of iterations is reached.

[0058] The implementation of a method for denoising meteorological datasets by combining empirical mode decomposition and wavelet transform includes the following steps:

[0059] Step S21: Perform empirical mode decomposition on the dataset of meteorological influencing factors:

[0060] Empirical Mode Decomposition (EMD) can decompose a signal into a finite number of physically meaningful intrinsic mode functions (IMFs), plus a residual term (Res) to represent the overall trend of the signal, i.e.:

[0061]

[0062] in: The original signal, It is the first One intrinsic mode function (IMF). It is a residual term. This refers to the number of IMFs obtained from the decomposition. The specific steps for EMD decomposition are as follows:

[0063] 1) Initialize the residuals, let the residuals... .

[0064] 2) Determine the original signal All local maxima and minima are constructed into an upper envelope by cubic spline interpolation. and lower envelope Calculate the mean envelope

[0065]

[0066] The difference between the original signal and the mean envelope can be calculated as follows:

[0067]

[0068] like If the IMF's conditions are not met, then... Repeat this step as the original signal. If If the two conditions of the IMF are satisfied, then let equal Get the first One IMF.

[0069] 3) After obtaining the first IMF updates residuals

[0070]

[0071] 4) Determine whether to terminate the decomposition. If the conditions are met... Non-monotonic and If the amplitude is significant, then Increase (Return to step 2). If the condition is not met, the decomposition ends, and the output is:

[0072]

[0073] Step S22: Denoise the decomposed meteorological dataset using wavelet transform:

[0074] The wavelet transform denoising process consists of three steps:

[0075] 1. Signal decomposition: Select a wavelet function and perform N-level decomposition on the signal;

[0076] 2. Select an appropriate threshold to perform threshold quantization on the coefficients of each layer obtained from the decomposition to remove noise;

[0077] 3. Perform inverse wavelet transform on the processed coefficients to reconstruct the denoised meteorological data.

[0078] The implementation process of the photovoltaic power generation prediction model using the improved sparrow algorithm to optimize the long short-term memory neural network includes the following steps:

[0079] Step S31: Optimize the parameters of the Long Short-Term Memory Neural Network using the improved Sparrow Algorithm:

[0080] A sparrow population consists of discoverers, joiners, and scouts. These three types of sparrows have different tasks and work together, giving the ISSA algorithm better local and global search capabilities, higher convergence accuracy, and faster speed. The sparrow search algorithm rules are as follows: 1) Discoverers find the optimal foraging location for the entire population and have high energy reserves. In the population, the level of energy reserves represents the quality of an individual sparrow's position, i.e., its fitness value. 2) After discovering a predator, the population will sound an alarm, and the discoverer will lead the population to a safe zone. 3) Joiners follow the discoverers to forage. The ratio of discoverers to joiners is fixed, and their roles can be interchanged. 4) Joiners may fly to other places to forage if their position is unfavorable. 5) Joiners will compete for food in order to forage. 6) When an alarm is sounded, sparrows on the periphery will move closer to the population center, while sparrows in the center will move randomly closer to other sparrows. 1. The initial randomness of the original ISSA population is high, which can easily lead to low search efficiency. The initial population position is generated using Tent chaotic mapping instead of random numbers, improving the algorithm's diversity and exploration capabilities. To address the algorithm's tendency to get trapped in local optima and its insufficient search efficiency, improvements are made, including the introduction of an adaptive weight mechanism and a Levy flight strategy. A dynamic warning value (ST) is introduced, which decreases non-linearly with the number of iterations. Early ST values ​​are larger, indicating a greater tendency for discoverers to explore; later ST values ​​are smaller, indicating a greater tendency for discoverers to exploit. The Levy flight enhancement mechanism uses Levy flight in dangerous situations to generate larger strides, effectively escaping local optima.

[0081] Step S32: Establish a long short-term memory neural network model:

[0082] The LSTM model is composed of Input information at any time Cell state Temporary cell state Hidden state Forgotten Gate Memory Gate Input gate Composition. The computation process of LSTM can be summarized as follows: by forgetting information in the cell state and remembering new information, useful information for subsequent time steps is passed on, while useless information is discarded, and the hidden state is output at each time step. Forgetting, remembering, and output are determined by the hidden state of the previous time step. and current input Calculated forget gate Memory Gate Output gate To control.

[0083] The first step for LSTM is to determine which information to forget from the cell state. This is done by reviewing the information from the previous hidden state. and current input information The weighted sum and bias are processed and passed to the Sigmoid layer, causing it to output a function with a value between 0 and 1. The closer the function value is to 0, the more information is forgotten; the closer it is to 1, the more information is retained.

[0084]

[0085] The next step is to determine which new information needs to be stored in the cell state. This involves storing the information from the previous hidden state. and current input information Input is fed into the Sigmoid layer, and at the same time, it utilizes The layer creates a vector of new candidate values. The outputs of both are combined as the current output to update the cell state.

[0086]

[0087]

[0088]

[0089] Finally, regarding the previous hidden state information and current input information Run a sigmoid layer to determine which parts of the cell state need to be output.

[0090]

[0091] Cell state through The layer (which sets the output value between -1 and 1) is then multiplied by the output of the Sigmoid layer, thus combining the cell state with the new hidden state. Proceed to the next time step.

[0092] .

[0093] The effectiveness of the combined model is verified through simulation, including the following steps:

[0094] Step S41: The following three different models are used to predict photovoltaic power to demonstrate the effectiveness of the present invention.

[0095] Model 1: Prediction using the EMD-LSTM model;

[0096] Model 2: Prediction using the EMD-WT-LSTM model;

[0097] Model 3: Prediction using the EMD-WT-ISSA-LSTM model.

[0098] The present invention selects mean absolute error (MAE), mean square error, root mean square error (RMSE), and mean absolute percentage error (MAPE) as performance indicators, and their calculation formulas are shown in equations (13) to (15).

[0099]

[0100]

[0101] .

[0102] Compared with the prior art, the above solution of the present invention has the following obvious advantages:

[0103] 1. The similar day clustering method proposed in this invention can reflect the similarity of photovoltaic power output curves of system weather in the same region, and improve the prediction accuracy of the model by making separate predictions for different weather types.

[0104] 2. The photovoltaic prediction combination model proposed in this invention effectively reduces the interference of weather-related signal noise. Simultaneously, it improves the prediction accuracy of the neural network through a population algorithm, establishing a high-precision prediction model.

[0105] The following specific embodiment demonstrates the solution of the present invention in more detail through the following steps based on the above design:

[0106] Step S1: Similarity day clustering combining Pearson correlation coefficient and K-centroid clustering algorithm;

[0107] Step S2: Denoising meteorological signals by combining empirical mode decomposition and wavelet transform;

[0108] Step S3: Design an improved sparrow algorithm to optimize the photovoltaic power generation prediction model of the long short-term memory neural network and execute the prediction.

[0109] Step S4: Perform simulation to verify the effectiveness of the combined model.

[0110] In this embodiment, the similar day clustering combining Pearson correlation coefficient and K-centroid clustering algorithm includes the following steps:

[0111] Step S11: Collect historical photovoltaic power generation data and corresponding meteorological data, and use Pearson correlation coefficient to screen meteorological factors:

[0112] Among the numerous meteorological factors affecting photovoltaic (PV) power generation, the Pearson correlation coefficient is used to measure the correlation between these factors and PV power output, thus identifying meteorological factors with high correlation. The Pearson correlation coefficient ranges from -1 to 1; the closer it is to 1, the stronger the positive correlation, and similarly, the closer it is to -1, the stronger the negative correlation. The formula for calculating the Pearson correlation coefficient is as follows:

[0113]

[0114] In the formula: r is the correlation coefficient; Xi and Yi are the data values ​​of the i-th group; Xmean and Ymean are the mean values.

[0115] The correlation coefficients between each meteorological factor and the corresponding photovoltaic power generation were calculated based on the above formula, and the results are shown in Table 1:

[0116] Table 1. Correlation coefficients between photovoltaic power generation and various environmental factors

[0117] Environmental factors Correlation coefficient Environmental factors Correlation coefficient Temperature 0.697 Atmospheric precipitation -0.068 Azimuth -0.031 humidity -0.653 Cloud Opacity -0.372 Ground air pressure 0.016 Dew point temperature -0.015 Wind speed at 10m in the atmosphere 0.029 Total solar irradiance 0.958 plate temperature 0.729

[0118] The results in the table show that photovoltaic power generation is highly positively correlated with air temperature, total solar irradiance, and solar panel temperature; highly negatively correlated with humidity; and has low correlation with azimuth, cloud opacity, dew point temperature, atmospheric precipitable water, surface air pressure, and wind speed at 10m. Therefore, air temperature, total solar irradiance, solar panel temperature, and humidity were selected as input variables for the prediction model.

[0119] Step S12: Perform similar day clustering using the K-centroid clustering algorithm:

[0120] The goal of the K-medoids clustering algorithm is to divide data points into K clusters such that each data point belongs to the nearest cluster center, and the sum of the distances from each data point within a cluster to the cluster center is minimized. Unlike K-means, which uses the mean as the cluster center, K-medoids uses the data point itself, which is the most central point in the cluster, as the cluster center, thus improving robustness. The algorithm steps are as follows: 1) Randomly select 3 medoids (centers) from all data points as initial cluster centers. 2) For each data point, calculate its distance to all center points and assign it to the cluster corresponding to the nearest center point. 3) For each cluster, try replacing the current center point with other points within the cluster, calculating the total distance after the replacement. Select the point that minimizes the total distance as the new center point. 4) Repeat steps 2) and 3) until the center point no longer changes or the maximum number of iterations is reached. Finally, weather types can be divided into three categories: sunny, cloudy, and rainy. The clustering results are shown below. Figure 1 As shown.

[0121] In this embodiment, the meteorological signal denoising combining empirical mode decomposition and wavelet transform specifically includes the following steps:

[0122] Step S21: Perform empirical mode decomposition on the dataset of meteorological influencing factors:

[0123] Empirical Mode Decomposition (EMD) can decompose a signal into a finite number of physically meaningful intrinsic mode functions (IMFs), plus a residual term (Res) to represent the overall trend of the signal, i.e.:

[0124]

[0125] in: The original signal, It is the first One intrinsic mode function (IMF). It is a residual term. This refers to the number of IMFs obtained from the decomposition. The specific steps for EMD decomposition are as follows:

[0126] 1) Initialize the residuals, let the residuals... .

[0127] 2) Determine the original signal All local maxima and minima are constructed into an upper envelope by cubic spline interpolation. and lower envelope Calculate the mean envelope

[0128]

[0129] The difference between the original signal and the mean envelope can be calculated as follows:

[0130]

[0131] like If the IMF's conditions are not met, then... Repeat this step as the original signal. If If the two conditions of the IMF are satisfied, then let equal Get the first One IMF.

[0132] 3) After obtaining the first IMF updates residuals

[0133]

[0134] 4) Determine whether to terminate the decomposition. If the conditions are met... Non-monotonic and If the amplitude is significant, then Increase (Return to step 2). If the condition is not met, the decomposition ends, and the output is:

[0135]

[0136] Step S22: Denoise the decomposed meteorological dataset using wavelet transform:

[0137] The wavelet transform denoising process consists of three steps:

[0138] 1. Signal decomposition: Select a wavelet function and perform N-level decomposition on the signal;

[0139] 2. Select an appropriate threshold to perform threshold quantization on the coefficients of each layer obtained from the decomposition to remove noise;

[0140] 3. Perform inverse wavelet transform on the processed coefficients to reconstruct the denoised meteorological data.

[0141] Denoising results for each dataset are as follows Figure 2 As shown.

[0142] In this embodiment, the design process of the photovoltaic power generation prediction model optimized by the improved sparrow algorithm using a long short-term memory neural network specifically includes the following steps:

[0143] Step S31: Optimize the parameters of the Long Short-Term Memory Neural Network using the improved Sparrow Algorithm:

[0144] A sparrow population consists of discoverers, joiners, and scouts. These three types of sparrows have different tasks and work together, giving the ISSA algorithm better local and global search capabilities, higher convergence accuracy, and faster speed. The sparrow search algorithm rules are as follows: 1) Discoverers find the optimal foraging location for the entire population and have high energy reserves. In the population, the level of energy reserves represents the quality of an individual sparrow's position, i.e., its fitness value. 2) After discovering a predator, the population will sound an alarm, and the discoverer will lead the population to a safe zone. 3) Joiners follow the discoverers to forage. The ratio of discoverers to joiners is fixed, and their roles can be interchanged. 4) Joiners may fly to other places to forage if their position is unfavorable. 5) Joiners will compete for food in order to forage. 6) When an alarm is sounded, sparrows on the periphery will move closer to the population center, while sparrows in the center will move randomly closer to other sparrows. 1. The initial randomness of the original ISSA population is high, which can easily lead to low search efficiency. The initial population position is generated using Tent chaotic mapping instead of random numbers, improving the algorithm's diversity and exploration capabilities. To address the algorithm's tendency to get trapped in local optima and its insufficient search efficiency, improvements are made, including the introduction of an adaptive weight mechanism and a Levy flight strategy. A dynamic warning value (ST) is introduced, which decreases non-linearly with the number of iterations. Early ST values ​​are larger, indicating a greater tendency for discoverers to explore; later ST values ​​are smaller, indicating a greater tendency for discoverers to exploit. The Levy flight enhancement mechanism uses Levy flight in dangerous situations to generate larger strides, effectively escaping local optima.

[0145] Step S32: Establish a long short-term memory neural network model:

[0146] The LSTM model is composed of Input information at any time Cell state Temporary cell state Hidden state Forgotten Gate Memory Gate Input gate Composition. The computation process of LSTM can be summarized as follows: by forgetting information in the cell state and remembering new information, useful information for subsequent time steps is passed on, while useless information is discarded, and the hidden state is output at each time step. Forgetting, remembering, and output are determined by the hidden state of the previous time step. and current input Calculated forget gate Memory Gate Output gate To control.

[0147] The first step for LSTM is to determine which information to forget from the cell state. This is done by reviewing the information from the previous hidden state. and current input information The weighted sum and bias are processed and passed to the Sigmoid layer, causing it to output a function with a value between 0 and 1. The closer the function value is to 0, the more information is forgotten; the closer it is to 1, the more information is retained.

[0148]

[0149] The next step is to determine which new information needs to be stored in the cell state. This involves storing the information from the previous hidden state. and current input information Input is fed into the Sigmoid layer, and at the same time, it utilizes The layer creates a vector of new candidate values. The outputs of both are combined as the current output to update the cell state.

[0150]

[0151]

[0152]

[0153] Finally, regarding the previous hidden state information and current input information Run a sigmoid layer to determine which parts of the cell state need to be output.

[0154]

[0155] Cell state through The layer (which sets the output value between -1 and 1) is then multiplied by the output of the Sigmoid layer, thus combining the cell state with the new hidden state. Proceed to the next time step.

[0156] .

[0157] In this embodiment, the simulation verification of the effectiveness of the combined model specifically includes the following steps:

[0158] Step S41: The following three different models are used to predict photovoltaic power to demonstrate the effectiveness of the present invention.

[0159] Model 1: Prediction using the EMD-LSTM model;

[0160] Model 2: Prediction using the EMD-WT-LSTM model;

[0161] Model 3: Prediction using the EMD-WT-ISSA-LSTM model.

[0162] The prediction results of each model are as follows Figure 3 As shown.

[0163] In this embodiment of the invention, mean absolute error (MAE), mean square error, root mean square error (RMSE), and mean absolute percentage error (MAPE) are selected as performance indicators, and their calculation formulas are shown in equations (13) to (15).

[0164]

[0165]

[0166]

[0167] The system operation results under the above scenarios are shown in Table 2.

[0168] Table 2. Model Indicators

[0169] Model Root Mean Squared Error (RMSE) Mean Absolute Error (MAE) Mean relative percentage error (MAPE) EMD-LSTM 12.97 11.93 18.75% EMD-WT-LSTM 10.19 10.72 12.49% EMD-WT-ISSA-LSTM 8.07 6.88 9.33%

[0170] Based on the results in Table 2, compared with Model 1, the EMD-WT-SSA-LSTM model used in this embodiment has better prediction performance, smaller error indices, and the predicted value is closer to the measured power value, thus improving the prediction accuracy of photovoltaic power generation.

[0171] Based on the same inventive concept, this invention also provides a computer device, comprising: one or more processors, and a memory for storing one or more computer programs; the programs include program instructions, and the processor executes the program instructions stored in the memory. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, used to implement one or more instructions, specifically for loading and executing one or more instructions stored in a computer storage medium to implement the above-described method.

[0172] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, performs the above-described method. This storage medium can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0173] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0174] The foregoing has shown and described the basic principles, main features, and advantages of this disclosure. Those skilled in the art should understand that this disclosure is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of this disclosure. Various changes and modifications can be made to this disclosure without departing from its spirit and scope, and all such changes and modifications fall within the scope of this disclosure as claimed.

[0175] This invention is not limited to the preferred embodiment described above. Anyone inspired by this invention can derive other forms of photovoltaic power generation prediction methods based on a combination model of similar day clustering and EMD-WT-ISSA-LSTM. All equivalent variations and modifications made within the scope of the claims of this invention shall fall within the scope of this invention.

Claims

1. A photovoltaic power generation prediction method based on a combined model of similar day clustering and EMD-WT-ISSA-LSTM, characterized in that, include: Based on the Pearson correlation coefficient, meteorological factors with high correlation to photovoltaic power generation were screened. An unsupervised clustering algorithm was used to divide the weather patterns and obtain similar daily datasets corresponding to sunny, cloudy and rainy days. The meteorological data was decomposed into feature components by mode decomposition and then denoised and reconstructed by wavelet transform to obtain denoised data. The population is initialized using the Tent chaotic mapping, a dynamic warning value that decreases nonlinearly with the number of iterations is introduced, and the Levy flight strategy is triggered to adjust the search behavior when the fitness value is lower than a preset threshold, so as to construct an improved sparrow search algorithm. The improved sparrow search algorithm is used to jointly optimize the hidden layer size, time steps, and learning rate of the LSTM to obtain an optimized LSTM model. The denoised data is input into the optimized LSTM model, and the photovoltaic power generation prediction result is output.

2. The photovoltaic power generation prediction method based on the combined model of similar day clustering and EMD-WT-ISSA-LSTM as described in claim 1, characterized in that: Among the meteorological factors that are highly correlated with photovoltaic power generation based on the Pearson correlation coefficient screening, meteorological factors with an absolute value of correlation coefficient greater than the empirical threshold are screened, including air temperature, total solar irradiance, solar panel temperature, and humidity.

3. The photovoltaic power generation prediction method based on the combined model of similar day clustering and EMD-WT-ISSA-LSTM as described in claim 1, characterized in that: The unsupervised clustering algorithm is the K-centroid clustering algorithm, and the steps for classifying weather patterns include: (1) Randomly select a preset number of initial cluster centers from the filtered meteorological data, wherein the preset number corresponds to the weather type category; (2) Calculate the distance from each data point to all cluster centers, and assign the data point to the cluster corresponding to the nearest cluster center; (3) For each cluster, try to replace the current cluster center with other points within the cluster, and select the point that minimizes the total distance within the cluster as the new center; (4) Repeat steps (2) and (3) until the cluster center no longer changes or the maximum number of iterations is reached, to obtain the similar day datasets corresponding to sunny, cloudy and rainy days.

4. The photovoltaic power generation prediction method based on a combined model of similar day clustering and EMD-WT-ISSA-LSTM as described in claim 1, characterized in that: The mode decomposition is Empirical Mode Decomposition (EMD), and the step of decomposing meteorological data into characteristic components includes: (1) Initialize the residuals to the original meteorological data, construct the upper and lower envelopes of the original data through cubic spline interpolation, and calculate the mean envelope; (2) Take the difference between the residual and the mean envelope as a candidate component. If the candidate component satisfies the condition of the intrinsic mode function, it is determined as the characteristic component; otherwise, repeat step (1). (3) Update the residual by subtracting the characteristic component from the original residual until the residual is a monotonic function or the amplitude is less than the termination condition, and obtain multiple characteristic components and a residual term.

5. The photovoltaic power generation prediction method based on a combined model of similar day clustering and EMD-WT-ISSA-LSTM as described in claim 1, characterized in that: The steps of denoising and reconstructing using wavelet transform include: (1) Select a wavelet function to perform multi-level decomposition on the feature components to obtain wavelet coefficients in different frequency bands; (2) The coefficients of each layer obtained by decomposition are quantized using a preset threshold to suppress the coefficients corresponding to noise; (3) Perform inverse wavelet transform on the processed coefficients to reconstruct the denoised meteorological data.

6. The photovoltaic power generation prediction method based on the combined model of similar day clustering and EMD-WT-ISSA-LSTM as described in claim 1, characterized in that: The specific method for initializing the population using the Tent chaotic mapping is as follows: generate uniformly distributed initial population positions using the Tent mapping formula.

7. The photovoltaic power generation prediction method based on a combined model of similar day clustering and EMD-WT-ISSA-LSTM as described in claim 1, characterized in that: When the sparrow's fitness value is lower than a preset threshold, the Levy flight strategy updates the position by generating a random step size that follows a Levy distribution. The large step size generated by Levy flight updates the individual sparrow's position to escape the local optimum.

8. The photovoltaic power generation prediction method based on the combined model of similar day clustering and EMD-WT-ISSA-LSTM as described in claim 1, characterized in that: In the improved sparrow search algorithm, the population includes discoverers, joiners, and scouts, where the roles of discoverers and joiners can be interchanged; discoverers are responsible for exploring the optimal location globally, joiners follow discoverers to forage, and scouts are responsible for monitoring danger and triggering warnings; when an alarm is issued, sparrows on the periphery move closer to the center of the population, while sparrows in the center randomly move closer to other sparrows.

9. The photovoltaic power generation prediction method based on the combined model of similar day clustering and EMD-WT-ISSA-LSTM as described in claim 1, characterized in that: The similar day dataset is classified into sunny, cloudy, and rainy weather patterns, and corresponding LSTM prediction models are trained for each.

10. A photovoltaic power generation prediction system based on a combined model of similar day clustering and EMD-WT-ISSA-LSTM, characterized in that, include: The data preprocessing module is used to screen meteorological factors that are highly correlated with photovoltaic power generation based on Pearson correlation coefficient, and to use an unsupervised clustering algorithm to divide weather patterns to obtain similar day datasets corresponding to sunny, cloudy and rainy days. The meteorological data is decomposed into feature components through mode decomposition, and then denoising and reconstructed through wavelet transform to obtain denoised data. The algorithm construction module is used to initialize the population with Tent chaotic mapping, introduce a dynamic warning value that decreases nonlinearly with the number of iterations, and trigger the Levy flight strategy to adjust the search behavior when the fitness value is lower than a preset threshold, so as to build an improved sparrow search algorithm. The model optimization module is used to jointly optimize the hidden layer size, time steps, and learning rate of the LSTM using the improved sparrow search algorithm to obtain the optimized LSTM model. The prediction module is used to input the denoised data into the optimized LSTM model and output the photovoltaic power generation prediction result.