A spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method and device, related equipment and medium
By combining PTSFENet and ADARO algorithms, the limitations of traditional single-dimensional feature extraction are overcome, realizing the spatiotemporal feature fusion of photovoltaic power generation data, improving the accuracy and efficiency of photovoltaic power prediction, and making it suitable for real-time scheduling of photovoltaic power plants and power grids.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LANZHOU UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2026-03-16
- Publication Date
- 2026-06-19
AI Technical Summary
Existing photovoltaic power prediction methods struggle to simultaneously capture the spatiotemporal dependencies in photovoltaic data, and model hyperparameters rely on empirical settings, affecting prediction accuracy and generalization ability.
A parallel spatiotemporal feature extraction network (PTSFENet) combined with an improved adaptive dynamic artificial rabbit optimization (ADARO) algorithm is adopted. By connecting the spatial feature extraction module and the temporal feature extraction module in parallel, the hyperparameters of the model are adaptively optimized to construct a spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method.
It achieves a comprehensive characterization of factors affecting photovoltaic power, improves the convergence speed and fitting ability of the model, and outputs ultra-short-term power prediction results with small errors and high accuracy, which can meet the high-precision requirements of real-time scheduling of photovoltaic power plants and grid connection and consumption scenarios.
Smart Images

Figure CN121863371B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power generation prediction technology, and more specifically to a method, apparatus, related equipment and medium for ultra-short-term photovoltaic power generation prediction by integrating spatiotemporal characteristics. Background Technology
[0002] Population growth, industrialization, and technological progress have led to a surge in global electricity demand. While fossil fuels remain the primary source of electricity, they also present challenges such as resource constraints and environmental problems. The combustion of fossil fuels releases large amounts of carbon dioxide, contributing to global warming and extreme weather events. Furthermore, the extraction and use of fossil fuels cause severe environmental pollution, threatening human health. Therefore, developing renewable energy and reducing dependence on fossil fuels is an inevitable choice for achieving sustainable development.
[0003] Renewable energy, as a clean and sustainable alternative energy source, has received increasing attention. Among various renewable energy sources, solar photovoltaic (PV) power generation has become one of the fastest-growing sectors due to its abundant reserves and wide distribution. However, the intermittency and volatility of PV power generation pose challenges to the stable operation of the power grid. Therefore, accurate PV power forecasting is crucial for the optimal scheduling, energy management, and stable operation of the power system. From a time scale perspective, PV power forecasting can be divided into ultra-short-term forecasting (15 minutes to 4 hours), short-term forecasting (4 hours to 3 days), medium-term forecasting (3 days to 1 month), and long-term forecasting (more than 1 month). Among these, accurate ultra-short-term forecasting can help power system operators better plan power generation, reduce reserve capacity, and improve the economic efficiency and reliability of the power grid. Currently, there are roughly two methods for PV power forecasting: traditional forecasting methods and machine learning-based forecasting methods.
[0004] Traditional forecasting methods include physical models and statistical models. Physical methods rely on numerical weather prediction data and physical models of photovoltaic (PV) power generation systems. These methods can simulate PV power generation processes, but they require high accuracy of meteorological data and have high computational complexity. Statistical models predict PV power output through short-term forecasts of meteorological factors, such as regression models, Kalman filtering, and autoregressive integral moving averages. Compared to physical methods, statistical methods are simpler to use and faster to compute, but they require high data stationarity and struggle to capture complex nonlinear relationships. Their accuracy is often limited by the quality of historical data and the modeling methods used.
[0005] In recent years, with the rapid development of computer technology, more and more researchers have applied machine learning techniques to photovoltaic power prediction. Machine learning models are divided into traditional machine learning methods and deep learning methods. Traditional machine learning methods include Support Vector Machines (SVM), Extreme Learning Machines (ELM), and Radial Basis Function (RBF) neural networks, which have been widely used in the field of photovoltaic power prediction.
[0006] In related literature, Pan et al. constructed an I-ACO-SVM model suitable for ultra-short-term photovoltaic power prediction. They automatically optimized the SVM parameters through an improved ant colony optimization (I-ACO) algorithm, improving the prediction accuracy throughout the day and providing a basis for real-time grid dispatch.
[0007] Wang et al. constructed an integrated framework of "data preprocessing + parameter self-optimization + signal decomposition + prediction" to address the strong stochastic and nonlinear fluctuations in photovoltaic power over ultra-short-term timescales. First, they used an improved sparrow search algorithm (ISSA) refined with Levy flight and logistic chaotic mapping to optimize variational mode decomposition (VMD), completely avoiding mode aliasing. Then, they used ISSA to optimize ELM, achieving end-to-end automatic parameter tuning of the model and enabling higher accuracy and stronger weather adaptability in photovoltaic power prediction.
[0008] Although traditional machine learning methods have achieved good prediction results in the field of photovoltaic power prediction, these methods usually suffer from high computational complexity and long training time when dealing with large-scale data. They also often require fine-tuning when dealing with nonlinear problems and have limited modeling capabilities, which greatly affects the prediction accuracy.
[0009] Compared to traditional machine learning models, deep learning models demonstrate superior performance in capturing key information from photovoltaic power generation data, adapting to various prediction tasks, and handling large-scale datasets. Photovoltaic power data is a time series, and convolutional neural networks (CNNs) and recurrent neural networks (RNNs) possess powerful sequence modeling capabilities, thus finding widespread application in photovoltaic power prediction.
[0010] In related literature, Li et al. first used Synchrosqueezed Wavelet Transform (SWT) to denoise the original photovoltaic power data, improving data quality. Then, they used CNN to extract spatial features and Gated Recurrent Units (GRUs) to extract time-series features. Finally, they used SSA to optimize the hyperparameters of the CNN-GRU, improving the model's convergence speed and prediction accuracy, achieving high-precision prediction of photovoltaic power. Although CNNs are widely used in photovoltaic power prediction, their ability to extract spatial features is limited by network complexity, preventing them from fully extracting spatial features.
[0011] Therefore, existing prediction methods often struggle to capture the spatiotemporal dependencies in photovoltaic data simultaneously, and the model hyperparameters rely on empirical settings, affecting prediction accuracy and generalization ability. Summary of the Invention
[0012] In view of the above problems, the present invention is proposed to provide a spatiotemporal feature fusion method, apparatus, related equipment and medium for ultra-short-term photovoltaic power generation prediction that overcomes or at least partially solves the above problems.
[0013] To achieve the above objectives, the present invention adopts the following technical solution:
[0014] In a first aspect, the present invention provides a method for predicting ultra-short-term photovoltaic power generation by fusing spatiotemporal features, comprising the following steps:
[0015] S1: Obtain historical power data and related meteorological data of photovoltaic power plants, and perform normalization processing;
[0016] S2: Divide the normalized data into training and test sets according to a preset ratio;
[0017] S3: The pre-built spatiotemporal feature extraction model is trained using the training set and test set, wherein an improved optimization algorithm is used to adaptively optimize the hyperparameters of the model during the training process; the spatiotemporal feature extraction model includes a parallel-connected spatial feature extraction module and a temporal feature extraction module, wherein the spatial feature extraction module is used to extract the spatial correlation features of the data, and the temporal feature extraction module is used to extract the time series features of the data;
[0018] S4: Input relevant real-time meteorological data into the trained spatiotemporal feature extraction model and output the future ultra-short-term photovoltaic power prediction results.
[0019] Secondly, the present invention provides a spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction device, which applies the spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method as described above. The device includes:
[0020] Dataset preparation module: used to acquire historical power data and related meteorological data of photovoltaic power plants, and perform normalization processing; the normalized data is divided into training set and test set according to a preset ratio;
[0021] Model building and training module: The pre-built spatiotemporal feature extraction model is trained using the training set and test set, wherein an improved optimization algorithm is used to adaptively optimize the hyperparameters of the model during the training process; the spatiotemporal feature extraction model includes a parallel spatial feature extraction module and a temporal feature extraction module, the spatial feature extraction module is used to extract the spatial correlation features of the data, and the temporal feature extraction module is used to extract the time series features of the data;
[0022] Inference and prediction module: This module is used to input relevant real-time meteorological data into a trained spatiotemporal feature fusion prediction model and output future ultra-short-term photovoltaic power prediction results.
[0023] Thirdly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing, implements the above-mentioned spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method.
[0024] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the above-mentioned spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method.
[0025] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method, device, related equipment and medium for ultra-short-term photovoltaic power generation prediction by spatiotemporal feature fusion, achieving the following beneficial effects:
[0026] (1) The spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method of the present invention breaks through the limitations of the traditional single-dimensional feature extraction method by setting up a spatial feature extraction module and a temporal feature extraction module in parallel. It simultaneously captures the spatial correlation features and time series features of photovoltaic power generation data, and realizes a comprehensive characterization of the factors affecting photovoltaic power. At the same time, it adopts an improved optimization algorithm to adaptively optimize the model hyperparameters, replacing the traditional manual parameter tuning mode, effectively shortening the model training cycle, accurately matching photovoltaic data features, improving the convergence speed and fitting ability of the model, and reducing the time and manpower costs of model training. Combined with the pre-optimization of data normalization preprocessing, it realizes the synergistic effect of preprocessing, feature fusion and parameter optimization, so that the model can fully learn the inherent laws of photovoltaic power generation. The output ultra-short-term power prediction results have small errors and high accuracy, which can meet the high-precision requirements of photovoltaic power plant real-time scheduling, grid connection and consumption and other scenarios. Moreover, the whole method process is simple and clear. The entire process from data acquisition, preprocessing, model training to prediction output can be automatically executed without complex hardware support. It is suitable for application scenarios of photovoltaic power plants of different scales and has good promotion value and engineering implementation.
[0027] (2) To address the shortcomings of existing photovoltaic power prediction models in spatiotemporal feature extraction, this invention proposes a novel parallel temporal and spatial feature extraction network (PTSFENet) framework for photovoltaic power prediction. This framework first utilizes the deep perception and global perception modules designed in this invention to construct a spatial feature extraction module, and then combines it with a temporal feature extraction module containing a bidirectional long short-term memory (BiLSTM) network, effectively enhancing the model's ability to jointly model and capture the complex spatiotemporal dependencies of photovoltaic power sequences.
[0028] (3) To address the shortcomings of the Artificial Rabbits Optimization (ARO) algorithm, this invention employs two targeted strategies to improve it, proposing the Adaptive Dynamic Artificial Rabbits Optimization (ADARO) algorithm. First, the Tent chaotic mapping is introduced to enhance the diversity of population initialization; then, the exploration and development capabilities of the adaptive weight factor balancing algorithm proposed in this invention are utilized to improve the algorithm's accuracy and convergence speed. The proposed ADARO provides a reliable tool for the automatic optimization of hyperparameters in subsequent prediction models.
[0029] (4) To fully utilize the potential of the model, this invention optimizes PTSFENet using ADARO and proposes the ADARO-PTSFENet photovoltaic power prediction method. Then, using two different datasets, the performance of the ADARO-PTSFENet prediction model is verified from multiple aspects. The experiments show that the prediction and generalization capabilities of the ADARO-PTSFENet model are superior to existing benchmark models, and it can adapt to the changing operating conditions of photovoltaic power plants. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0031] Figure 1 This is a flowchart of the ultra-short-term photovoltaic power prediction method provided in the embodiments of the present invention.
[0032] Figure 2a This is the Circle chaotic mapping histogram provided in this embodiment of the invention.
[0033] Figure 2b This is the Tent chaotic mapping histogram provided in this embodiment of the invention.
[0034] Figure 3 This is a graph showing the change in weighting coefficients provided in an embodiment of the present invention.
[0035] Figure 4 This is a diagram of the PTSFENet model architecture provided in an embodiment of the present invention.
[0036] Figure 5 This is a structural diagram of the depth perception module provided in an embodiment of the present invention.
[0037] Figure 6 This is a structural diagram of the global perception module provided in an embodiment of the present invention.
[0038] Figure 7a This is a diagram of a long short-term memory network structure provided in an embodiment of the present invention.
[0039] Figure 7b This is a diagram of a bidirectional long short-term memory network structure provided in an embodiment of the present invention.
[0040] Figure 8 This is a heat map showing the relationship between photovoltaic power and meteorological data provided in an embodiment of the present invention.
[0041] Figure 9This is a graph showing the change of the loss function provided in an embodiment of the present invention.
[0042] Figure 10a This is a comparison chart of sunny day prediction performance provided in an embodiment of the present invention.
[0043] Figure 10b As described in the embodiments of the present invention Figure 10a A magnified view of part A.
[0044] Figure 11 This is a comparison chart of cloudy day prediction performance provided in an embodiment of the present invention.
[0045] Figure 12 This is a comparison chart of rain forecasting performance provided in an embodiment of the present invention.
[0046] Figure 13 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] Example 1:
[0049] like Figure 1 As shown, in order to overcome the limitations of existing models and achieve more accurate photovoltaic power prediction, this invention discloses a spatiotemporal feature fusion method for ultra-short-term photovoltaic power generation prediction, including the following steps:
[0050] S1: Obtain historical power data and associated meteorological data of photovoltaic power plants, and perform normalization processing. The selection of associated meteorological data includes: feature selection of meteorological data based on Pearson correlation coefficient, and screening meteorological variables with high correlation to photovoltaic power as input; the meteorological data includes: temperature, horizontal total solar radiation, horizontal diffuse radiation and total diffuse radiation; finally, the min-max normalization method is used to map the result values between [0,1]. Through normalization processing, the difference in units between different data can be eliminated, avoiding gradient explosion or slow convergence during model training due to large differences in numerical range, and improving the model's learning efficiency of features;
[0051] S2: The normalized data is divided into training set and test set according to a preset ratio. The training set is used for parameter fitting and feature learning of the spatiotemporal feature extraction model, and the test set is used to simulate real prediction scenarios and objectively verify the generalization ability of the model. The preset ratio can be flexibly adjusted according to the amount of data to ensure that the amount of training set data is sufficient to support the model's learning pattern, while the amount of test set data meets the statistical verification requirements.
[0052] S3: The pre-built spatiotemporal feature extraction model is trained using the training and test sets. During training, an improved optimization algorithm is employed to adaptively optimize the model's hyperparameters. The spatiotemporal feature extraction model includes parallel-connected spatial feature extraction and temporal feature extraction modules. The spatial feature extraction module extracts spatial correlation features from the data, while the temporal feature extraction module extracts time-series features. Through parallelized spatial and temporal feature extraction modules, multi-dimensional features of photovoltaic data can be simultaneously mined. The spatial feature extraction module captures the power correlation patterns between different photovoltaic arrays and monitoring points, while the temporal feature extraction module learns the changing trend of photovoltaic power generation over time. The improved optimization algorithm adaptively adjusts the model's hyperparameters, finding the optimal parameter combination more efficiently than traditional manual parameter tuning, thus improving the model's fitting accuracy and convergence speed.
[0053] S4: Input relevant real-time meteorological data into the trained spatiotemporal feature extraction model and output the future ultra-short-term photovoltaic power prediction results.
[0054] Real-time meteorological data is input into the trained model, which can quickly output ultra-short-term photovoltaic power predictions based on the learned spatiotemporal characteristics. This process does not require complex manual intervention and can automate the prediction task, meeting the real-time and accuracy requirements of scenarios such as photovoltaic power plant scheduling and grid connection planning.
[0055] The spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method in this invention overcomes the limitations of traditional single-dimensional feature extraction methods by setting up spatial feature extraction modules and temporal feature extraction modules in parallel. It simultaneously captures the spatial correlation features and time series features of photovoltaic power generation data, achieving a comprehensive characterization of factors affecting photovoltaic power. Simultaneously, an improved optimization algorithm is used to adaptively optimize the model's hyperparameters, replacing the traditional manual parameter tuning mode. This effectively shortens the model training cycle, accurately matches photovoltaic data features, improves the model's convergence speed and fitting ability, and reduces the time and labor costs of model training. Combined with pre-optimization of data normalization preprocessing, the synergistic effect of preprocessing, feature fusion, and parameter optimization is achieved, enabling the model to fully learn the inherent laws of photovoltaic power generation. The output ultra-short-term power prediction results have small errors and high accuracy, meeting the high-precision requirements of real-time scheduling of photovoltaic power plants and grid connection and consumption scenarios. Furthermore, the entire method process is simple and clear, and the entire process from data acquisition, preprocessing, model training to prediction output can be automated without complex hardware support. It is adaptable to application scenarios of photovoltaic power plants of different scales and has good promotional value and engineering feasibility.
[0056] The spatiotemporal feature extraction model of step S3 of the present invention will be described in detail below:
[0057] 1. The existing ARO algorithm references the foraging and random hiding strategies of rabbits in nature. However, when dealing with function optimization problems, the ARO algorithm often uses randomly generated data as the initial population, which makes it difficult to guarantee population diversity. Furthermore, the reduction of the linear convergence factor contradicts the principle of nonlinear optimization, resulting in unsatisfactory optimization performance.
[0058] This invention optimizes and improves the ARO algorithm. The improved algorithm is ADARO, and the improvements include initializing the population using the Tent chaotic mapping and introducing an adaptive weight factor ω.
[0059] Chaotic mappings can generate random sequences, enhancing the diversity of the algorithm population. Therefore, this invention fully utilizes the randomness and ergodicity of the Tent chaotic mapping to generate an initial population with rich diversity. This helps the algorithm effectively avoid getting trapped in local optima, thereby maintaining population diversity, enhancing global search capabilities, and enabling the algorithm to converge to the optimal solution more quickly, thus improving convergence accuracy.
[0060] The expression for the Tent chaotic map is as follows:
[0061]
[0062] In the formula To initialize the nth individual in the population, This is the (n+1)th individual in the population generated after the Tent chaotic mapping iteration; For chaotic mapping parameters;
[0063] like Figures 2a-2b As shown, the population initialization effects of the algorithm after Circle chaotic mapping and Tent chaotic mapping are compared. Through comparison... Figure 2a and Figure 2b It can be seen that the Tent chaotic map histogram shows a relatively stable trend compared to the Circle chaotic map histogram, indicating that the Tent chaotic map histogram can make the initial population distribution of the algorithm more uniform, reducing the risk of getting trapped in local optima. Initializing the population through the Tent chaotic map effectively enhances the diversity of the population in the search space, improving the performance and optimization ability of the ARO algorithm.
[0064] In the ARO algorithm, each individual has a fitness value, representing its fitness level in the search space. Each individual also possesses a certain degree of exploration and development capabilities. The role of weights is to adjust the ratio of exploration to development, enabling the algorithm to better search for the optimal solution in the solution space. However, fixed weights cannot be adjusted for the characteristics of different problems and data distributions, thus failing to find the optimal solution and being difficult to adapt to different optimization problems. To overcome this deficiency and achieve dynamic balance, this invention proposes a new adaptive weight factor that can automatically adjust weights during iteration. The adaptive inertial weight calculation method proposed in this invention is shown in the following formula:
[0065]
[0066] Where t is the current iteration number, T is the maximum iteration number, and k is the weight coefficient;
[0067] like Figure 3 As shown, it can be seen that when When the value is 1, the adaptive weight factor changes at a stable rate, achieving the goal of transitioning from global stability to local stability. Therefore, in this invention... Set to 1.
[0068] The improved calculation formula incorporating adaptive inertia weights is shown below:
[0069]
[0070] Where t is the current iteration number, For the first i The rabbit's new location and The first iThe algorithm consists of a single rabbit and other rabbits at random locations. R is the running operator, and `round` is used to simulate the running characteristics of the rabbits. r2 is the rounding operator to the nearest integer, and r3 represents a random number in the range [0,1]. It means the rabbit dug to hide. A randomly selected cave from a set of caves, where n1 is a random number from 0 to 1.
[0071] This invention improves ADARO's local and global optimization capabilities by introducing Tent chaotic mapping and adaptive inertial weights, resulting in a significant increase in convergence accuracy and speed.
[0072] 2. PTSFENet is a parallel spatiotemporal feature extraction network designed specifically for ultra-short-term photovoltaic power prediction. It can comprehensively capture the spatial correlation and temporal dependence of photovoltaic power data, providing strong feature support for accurate prediction.
[0073] like Figure 4 As shown, PTSFENet mainly consists of two parallel parts: a spatial feature extraction module and a temporal feature extraction module. The spatial feature extraction module comprises a deep perception module and a global perception module, aiming to capture features across various input lengths to enrich the model's understanding of sequences. The temporal feature extraction module primarily uses BiLSTM, dedicated to capturing long-term dependencies and contextual information in sequence data. This parallel network design fully leverages data diversity, not only improving model performance but also accelerating the training and inference processes.
[0074] like Figure 5 As shown, in the structural design of the deep perception module, a primary extraction layer consisting of convolutional and pooling layers is first constructed. This primary extraction layer is used to initially filter out interference information in the input data, achieving preliminary feature selection and extraction. A batch normalization (BN) layer is added between the convolutional and pooling layers. This BN layer not only accelerates the training convergence speed of the module but also effectively suppresses model overfitting, ensuring the stability and effectiveness of the training process. Finally, deep convolution technology is used to process the initially extracted features. By limiting each convolution kernel to only perform convolution operations with a single channel of the input feature map, the processing only adjusts the size of the feature map without changing the number of feature channels, thereby significantly reducing the computational complexity of the module and improving the computational efficiency of feature processing.
[0075] To further enhance the feature extraction performance of the module, a squeeze-and-excitation network (SE) is introduced after deep convolution processing. The SE module adaptively adjusts the response intensity of different feature channels in the network, enabling the module to focus on the feature information that plays a key role in improving the accuracy of photovoltaic power prediction, while weakening the interference of irrelevant features and reducing the adverse effects of data noise on feature extraction. Ultimately, this achieves accurate extraction of higher-level effective features, improves the feature representation capability of the module, and solves technical problems such as information loss and feature ambiguity in the feature extraction process.
[0076] The specific calculation process of the depth perception module is as follows:
[0077]
[0078]
[0079]
[0080]
[0081] in, It is the sigmoid activation function. For batch normalization layer, convolution kernel convolutional layers, For Hadema, It is a depth-separable convolutional layer. The convolution kernel is convolutional layers, This is a global average pooling layer; x y1 represents the shallow features of the deep perception module, y2 represents the intermediate features of the deep perception module, y3 represents the deep features of the deep perception module, and y4 represents the high-level features extracted at the end.
[0082] like Figure 6 As shown, the global perception module structure applies convolutional kernels of different scales to the data to capture feature information at different scales, thereby improving the model's ability to understand the data. By employing three different sizes of convolutional kernels—1×1, 3×1, and 5×1—it captures features in the sequence more comprehensively, focusing on multi-level information of the sequence, thus enhancing the model's robustness and generalization. Larger convolutional kernels help capture broader contextual information and avoid information loss. Smaller convolutional kernels can more sensitively capture subtle changes, preventing information loss due to ambiguity. Ultimately, this achieves the extraction of features at different levels, increasing feature diversity and improving the model's understanding of photovoltaic power data.
[0083] The specific calculation process of the global perception module is as follows:
[0084]
[0085]
[0086]
[0087]
[0088] in, These are the input features for the global perception module. , as well as These represent the convolution kernel as follows: , , convolutional layers, y5 is the ReLU activation function; The output features of the convolutional layer channels, y6 is The output features of the convolutional layer channels, y7 is The output features of the convolutional layer channels are y1 and y2 are the output features of the global perception module.
[0089] Long Short-Term Memory (LSTM) networks are a variant of Recurrent Neural Networks (RNNs). They introduce a "gating mechanism" on the basis of RNNs, which effectively solves the gradient explosion or gradient vanishing problems that are prone to occur in RNNs. They are widely used in data modeling with temporal characteristics.
[0090] like Figure 7a As shown, the Long Short-Term Memory (LSTM) network includes a forget gate, an input gate, an output gate, and a memory unit. These components work together to extract and utilize effective information from historical data, thereby completing the task of predicting photovoltaic power.
[0091] The forget gate filters information from the previous moment, selectively retaining or discarding some information. The calculation method is as follows:
[0092]
[0093] In the formula: This is the sigmoid activation function, and its output is... 0 means discard all, 1 means keep all; This represents the input at time t; This is the output from the previous time step; and These are the weighting coefficients and bias terms of the forget gate, respectively.
[0094] The input gate determines the degree to which input information is retained. Represented as:
[0095]
[0096] In the formula: and These are the weighting coefficients and bias terms of the input gate, respectively.
[0097] Temporary memory unit and current memory unit Together, they determine the state of the Long Short-Term Memory (LSTM) network, and the calculation method is shown in the following formula:
[0098]
[0099]
[0100] In the formula: and These are the weighting coefficients and bias terms for temporary memory units, respectively; Indicates the state at the previous moment; For Hadamard products.
[0101] The output gate determines the amount of information output. As shown in the following formula:
[0102]
[0103] In the formula, and These are the weighting coefficients and bias terms of the output gate, respectively.
[0104] The final output of a Long Short-Term Memory (LSTM) network As shown in the following formula:
[0105]
[0106] Long Short-Term Memory (LSTM) networks can process and predict data with temporal characteristics, but they can only perform predictive operations based on valid information in historical data and cannot utilize future correlation information contained in the data, resulting in insufficient feature mining of time-series data. For example... Figure 7b As shown, BiLSTM is constructed from two long short-term memory networks with opposite information transmission directions. It can achieve bidirectional feature extraction and comprehensive analysis of time-series data, effectively making up for the deficiency of long short-term memory networks that rely solely on historical data for prediction, thereby improving the accuracy of prediction of target data.
[0107] The following example illustrates the construction and training process of the spatiotemporal feature extraction model of the present invention:
[0108] To address the spatiotemporal characteristics of photovoltaic (PV) power data, this invention proposes a PV power prediction model based on ADARO-optimized PTSFENet. The PV power prediction model process includes the following steps:
[0109] S1: Normalize the data to reduce the interference of dimensional differences between different indicators in photovoltaic power data on the prediction results.
[0110] S2: Divide the dataset into a training set: test set ratio of 7:3.
[0111] S3: Use the ADARO algorithm to optimize the parameters of PTSFENet and calculate the optimal hyperparameters of the model.
[0112] S4: The data is processed collaboratively by the time feature extraction module and the spatial feature extraction module to obtain feature information at different levels.
[0113] S5: The features extracted by the temporal feature extraction module and the spatial feature extraction module are fused through a fully connected layer. The multi-path feature interaction enhances the model's ability to represent the spatiotemporal correlation of photovoltaic power, thereby realizing the fusion of feature information at different levels.
[0114] S6: Input the extracted features into FlattenLayer to convert multidimensional data into one-dimensional data, then input them into a fully connected layer, and add a regression layer after the fully connected layer to achieve prediction.
[0115] S7: Analyze the error between the predicted photovoltaic power and the actual photovoltaic power, calculate the corresponding evaluation indicators, and output the photovoltaic power data for the prediction period.
[0116] Specifically, firstly, historical power data and associated meteorological data were collected from a provincial-level distributed photovoltaic (PV) power station in northern China. The historical power data included the actual output power, cumulative power generation, and power generation duration of the PV array for each time period. The associated meteorological data included temperature, azimuth, zenith angle, cloud opacity, dew point temperature, horizontal diffuse irradiance, normal direct irradiance, total horizontal irradiance, total irradiance on the tilted surface, tracking tilted surface irradiance, atmospheric precipitation, relative humidity, snow depth, surface air pressure, and wind direction and speed at 10m altitude. The selected time span was from July 1, 2020 to September 30, 2020, with a time resolution of 15 minutes. Since the PV array does not generate power at night, data with zero power at night were removed, and the remaining data was used as the original dataset, which was then divided into training and test sets in a 7:3 ratio.
[0117] When collecting photovoltaic power-related data, different features typically have different dimensions and units, which can affect the results of data analysis. Before making predictions, to avoid mutual interference between different dimensions of indicators, the data must first be normalized to eliminate the adverse effects caused by outlier samples, thereby improving the prediction accuracy of the model.
[0118] This invention uses the min-max normalization method to normalize the data, mapping the result values to the range [0,1]. The calculation formula is as follows:
[0119]
[0120] in, These are the normalized values of the data samples. The values of the data samples before normalization. The maximum value of the sample data. This represents the minimum value of the sample data.
[0121] Because photovoltaic power is uncertain and affected by various meteorological factors, the Pearson correlation coefficient is used to reflect the degree of linear correlation between the two variables, as shown in the following expression:
[0122]
[0123] in Between -1 and 1. Indicates a positive correlation. This indicates a negative correlation. The closer the absolute value is to 1, the stronger the correlation between the variables. In the formula... It is the total number of samples. It is the first Meteorological parameters at any given time It is the average value of meteorological parameters. It is the first Output power value at time , It is the average value of the output power.
[0124] like Figure 8 As shown, Figure 8 The Pearson correlation coefficient method was used to perform correlation analysis on the associated meteorological datasets, and a correlation matrix heatmap for each variable was plotted based on the analysis results. The vertical bars on the right side of the graph are color scale bars for the Pearson correlation coefficient, which correspond to the magnitude of the correlation coefficient represented by different colors in the heatmap, and the numerical range corresponding to the colors. The darker the color, the higher the degree of negative correlation, and the lighter the color, the higher the degree of positive correlation.
[0125] In the target photovoltaic power prediction scenario, Pearson correlation coefficient analysis shows that temperature, total horizontal irradiance, diffuse horizontal irradiance, and total tilted irradiance are strongly positively linearly correlated with actual power, with correlation coefficients approaching 1. These parameters have a significant positive impact on photovoltaic power output and are the core input features for constructing the photovoltaic power prediction model. On the other hand, relative humidity and atmospheric precipitation are negatively correlated, and their correlation coefficients with actual power are close to 0, indicating that their linear explanatory power for photovoltaic power is weak. They can be simplified as non-critical parameters in the model feature selection stage.
[0126] To more intuitively evaluate the prediction model proposed in this invention, this invention selects the coefficient of determination (R²). 2 The mean absolute error (MAE), root mean square error (RMSE), and explained variance score (EVS) are used as evaluation metrics to compare the performance of prediction models.
[0127] The formula is as follows:
[0128]
[0129]
[0130]
[0131]
[0132] in, For sample size, For predicted values, This is the actual value. This represents the average of the actual values corresponding to the sample. This represents the variance. The smaller the values of RMSE and MAE, the better the model performance; R0 2 The larger the value of EVS, the closer it is to 1, the higher the accuracy of the model.
[0133] The computer configuration used in the experiments of this invention included an AMD Ryzen 9 7945HX CPU, an NVIDIA Geforce RTX 4060 GPU, and Windows 11, with the MatLab version being R2024a.
[0134] Different optimization algorithms exhibit significant differences in their solution-solving capabilities. To evaluate algorithm performance, this invention selected six standard test functions F1-F6 to comprehensively evaluate different algorithms, as shown in Table 1. F1-F4 are unimodal test functions, primarily used to evaluate the convergence speed and search capability of intelligent algorithms; F5-F6 are multimodal test functions, mainly used to evaluate the global search capability of algorithms. In the experiment, the algorithm population size was 30, the maximum number of iterations was 200, and each function was run independently 20 times. The mean and standard deviation were used as performance indicators to evaluate the solution-solving capability of the optimization algorithms.
[0135] Table 1: Test Functions
[0136]
[0137] To verify the effectiveness and robustness of the proposed ADARO algorithm in solving optimization problems, this embodiment compares ADARO with six other algorithms—ARO, Whale Optimization Algorithm (WOA), Dung Beetle Optimizer (DBO), Sparrow Search Algorithm (SSA), and Coati Optimization Algorithm (COA)—on six typical standard test functions.
[0138] The core characteristics of each comparison algorithm are as follows: ADARO is an improved version of ARO, which enhances the algorithm's optimization performance through an adaptive parameter adjustment mechanism; ARO is a metaheuristic optimization algorithm that simulates the foraging and risk avoidance behavior of hares; Whale Optimization Algorithm (WOA) is a classic swarm intelligence optimization algorithm that simulates the bubble-net hunting behavior of humpback whales; Dung Beetle Optimization Algorithm (DBO) is an optimization algorithm designed to simulate the natural behaviors of dung beetles, such as rolling dung balls, foraging, and reproduction; Sparrow Search Algorithm (SSA) is a swarm intelligence optimization algorithm that simulates the foraging and anti-predation behavior of sparrow populations; and Coon Bear Optimization Algorithm (COA) is a swarm intelligence optimization algorithm that simulates the hunting and predator-avoidance behavior of coon bears.
[0139] The experimental results are shown in Table 2, and the specific experimental conclusions are as follows: For unimodal functions F1 and F3 and multimodal functions F5 and F6, ADARO can accurately find the theoretical optimal value; for unimodal functions F2 and F4, ADARO has a greater convergence accuracy compared to the other five comparison algorithms. In the tests of multimodal functions F5 and F6, although ADARO's optimization speed is slightly slower than the COA algorithm, it is better than ARO, WOA, DBO, and SSA algorithms, indicating that there is still room for optimization in ADARO's global search capability.
[0140] In summary, the experimental data in Table 2 verify the effectiveness of the two improvement strategies designed for ADARO in this invention, and further demonstrate the comprehensive optimization superiority of ADARO in various test function scenarios.
[0141] Table 2: Test Function Results
[0142]
[0143] Ablation experiments explored the effects of different module combinations. To verify the effectiveness of different modules in the model, this invention tested different module combinations. Initially, independent temporal feature extraction models, Long Short-Term Memory (LSTM) and Bidirectional Long Short-Term Memory (BSLM) networks, were used to verify the prediction performance. Next, one or two spatial feature extraction models were combined with the BSLM network to confirm the necessity of the spatial feature extraction model and verify the effectiveness of the network design in this invention. To ensure the fairness of the experiment, consistent hyperparameters were set: a learning rate of 0.001, a minimum batch size of 128, and 128 hidden units for both the LTM and BSLM networks. Based on Table 3, the following conclusions are drawn:
[0144] 1) A comparison between Long Short-Term Memory (LSTM) networks and Bidirectional LSTM networks shows that adding bidirectional information improves the predictive performance of LSTM networks. Compared to LSTM networks, Bidirectional LSTM networks reduce the root mean square error and mean absolute error by 1.64% and 2.32%, respectively.
[0145] 2) Comparison of models 3 and 4 shows that both spatial network modules improve prediction performance to varying degrees. Compared with the bidirectional long short-term memory network, the root mean square error (RMSE) of the spatiotemporal feature extraction network and the parallel spatiotemporal feature extraction network decreased by 22.87% and 23.9%, respectively, and the mean absolute error (MAE) decreased by 25.85% and 25.92%, respectively. The parallel spatiotemporal feature extraction network significantly improves prediction performance, indicating an effective interaction between the temporal and spatial feature extraction modules, enabling more accurate predictions. This invention, by incorporating ADARO for parameter optimization, fully leverages network performance and improves prediction accuracy. Compared with the parallel spatiotemporal feature extraction network, its RMSE and MAE decreased by 17.37% and 23.02%, respectively, with a coefficient of determination of 0.98439 and an explained variance score of 0.98448.
[0146] Table 3: Ablation Experiment Results
[0147]
[0148] Optimizing training parameters is crucial for enhancing the adaptability and generalization ability of a model. Since deep neural networks possess numerous hyperparameters, traditional grid search and random search methods are no longer sufficient to accurately find the optimal hyperparameters. This invention utilizes ADARO to accurately solve for the optimal hyperparameters, thereby improving the performance and convergence speed of the prediction model and demonstrating the effectiveness of ADARO. This invention defines a search space and uses ADARO to optimize the initial learning rate, L2 regularization coefficient, and number of iterations of the model. The optimization results are shown in Table 4. The results in Table 4 show that adjusting the initial learning rate and L2 regularization coefficient can reduce the risk of overfitting and accelerate network convergence.
[0149] Table 4: Model Hyperparameter Settings
[0150]
[0151] like Figure 9 As shown, the training performance of PTSFENet and ADARO-PTSFENet is compared. Figure 9 The graph shows the loss variation of PTSFENet and ADARO-PTSFENet. ADARO-PTSFENet has a lower training loss and converges faster than PTSFENet, highlighting the effectiveness of using ADARO to optimize PTSFENet, achieving better results with fewer iterations.
[0152] For ease of description, the eight models used in the experiment are referred to as M1-M8, and the corresponding model names are shown in Table 5.
[0153] The experimental results are shown in Table 6. From this, we can draw the following conclusions: The M1 and M2 time series prediction models can only extract the temporal characteristics of photovoltaic power data and cannot extract the spatial characteristics, resulting in poor prediction performance. The M3 and M4 models, as hybrid prediction models, can extract the temporal characteristics of the data more fully. Therefore, the prediction performance is significantly improved compared with the M1 and M2 individual time series prediction models. However, because their ability to extract spatial features is relatively insufficient, their prediction performance is not as good as M5-M7.
[0154] Table 5: Introduction to Model Names
[0155]
[0156] Models M5-M7, while extracting the temporal characteristics of photovoltaic power data, can also fully extract its spatial characteristics, resulting in a significant improvement in prediction accuracy compared to models M1-M4. The M8 model proposed in this invention, with its complex spatial feature extraction module, can fully extract spatial features, and BiLSTM can fully extract temporal features, enhancing the model's understanding of photovoltaic power data. Therefore, M8 can achieve accurate prediction of photovoltaic power. Simultaneously, because ADARO has excellent solution capabilities, it can accurately solve for the optimal parameters of the model, fully utilizing its performance, thus significantly improving performance. Compared to the other seven comparative models, the root mean square error decreases by 19.18%-43.05%, the mean absolute error decreases by 23.82%-47.57%, the coefficient of determination reaches 0.98439, and the explained variance score reaches 0.98448. Experimental results show that the M8 model can achieve accurate prediction of photovoltaic power.
[0157] Table 6: Model Comparison Results
[0158]
[0159] Different weather conditions have a significant impact on prediction accuracy. To illustrate the adaptability of the model under different weather conditions, the M1-M8 models were used to compare predictions for three weather conditions (sunny, cloudy, and rainy).
[0160] from Figure 10a As can be seen, all models follow the trend of the black true value curve, but the red curve Proposed (M8) has the highest degree of fit with the black true value curve; other models show similar trends in local intervals, such as... Figure 10b As shown, the deviation from the true value is greater than that of the Proposed value.
[0161] from Figure 11 As can be seen, the red curve Proposed (M8) still has the best fit with the black true value curve. Even in the range of drastic power fluctuations, such as near the 20, 50, and 80 sample points, it can follow the changes of the true value well. The curves of other models deviate from the true value more obviously, especially at the nodes of drastic fluctuations, and the prediction error is larger.
[0162] from Figure 12 As can be seen, the red curve Proposed (M8) has the best fit with the black true value curve: whether it is the rising segment (1-20 sample points) or the fluctuating falling segment (20-50 sample points), it can closely follow the changes in the true value; the curves of other models deviate more significantly from the true value at some fluctuating nodes (such as around 20 and 30 sample points).
[0163] Therefore, it is evident that the M8 model has better forecast accuracy for sunny weather than for cloudy or rainy weather. This difference in forecast accuracy is not only reflected in the proposed model but also exists in the seven comparative models. Furthermore, comparisons of the three weather conditions further demonstrate that, compared to the other seven models, the M8 model achieved the best forecast results under all three conditions. This indicates that the model in this invention has superior forecast performance for nonlinear data compared to the other comparative models, further illustrating the model's strong adaptive capability.
[0164] In this invention, the proposed model was further validated using different datasets. These datasets possess diverse features and backgrounds, ensuring the applicability and generalization ability of ADARO-PTSFENet under different environments, and their performance was comprehensively evaluated and compared. This invention selects a distributed photovoltaic power station in a provincial capital city in Northwest China as the object, and the selected meteorological data includes module temperature (…). C) Temperature C) Atmospheric pressure (Hpa), humidity (%), total radiation (W / m²) 2 ), direct radiation (W / m 2 ) and scattered radiation (W / m 2 The time range is from March 1, 2019 to May 31, 2019, with a time resolution of 15 minutes. Considering the phenomenon that photovoltaic power generation does not occur at night, zero-power data at night was removed, and the remaining data was used as the source dataset. 70% of the data was randomly selected as the training set to train the model to learn the patterns and features of the data. The remaining 30% of the data was used as the test set to evaluate the performance of the trained model on unknown data, thereby verifying its generalization ability and prediction accuracy. As shown in Table 7, the M8 proposed in this invention achieved good results in all four evaluation metrics. Compared with the seven comparative models, M8 showed a significant decrease in root mean square error and mean absolute error, and a significant increase in the coefficient of determination and explained variance score. This indicates that M8 has high prediction accuracy, verifying its superiority and accuracy in the field of photovoltaic power prediction.
[0165] Table 7: Comparison Results of Other Cases
[0166]
[0167] This invention addresses the shortcomings of existing models and the difficulty of hyperparameter tuning by proposing the ADARO-PTSFENet prediction framework, thereby improving the prediction accuracy of photovoltaic power. This model combines a spatial feature extraction module constructed from deep and global sensing modules with a temporal feature extraction module based on BiLSTM, enhancing the model's ability to extract spatiotemporal features. Simultaneously, considering the limitations of ARO, two improvement strategies are employed to enhance performance. Finally, ADARO is used to optimize PTSFENet to improve the accuracy of photovoltaic power prediction. The main conclusions drawn from comprehensive experimental evaluation are as follows:
[0168] (1) ADARO overcomes the shortcomings of the ARO algorithm and improves its performance by introducing the Tent chaotic mapping and adaptive weighting factor. Experiments using six test functions show that ADARO outperforms ARO, WOA, DBO, SSA and COA in terms of convergence speed and accuracy, and can solve the hyperparameters of the prediction model more accurately.
[0169] (2) The ADARO-PTSFENet model was analyzed through multiple experiments. The experimental results show that the overall performance of the ADARO-PTSFENet model is significantly improved compared with the other seven models. Under different weather conditions, the prediction accuracy of the ADARO-PTSFENet model is significantly higher than that of the other comparative models. This indicates that the model has good predictive ability and can achieve high-precision photovoltaic power prediction under various environments.
[0170] (3) The ADARO-PTSFENet model was tested using different datasets. The results show that the method has a significant advantage in prediction accuracy, proving that the method has superior generalization performance and can adapt to photovoltaic power prediction tasks under various operating scenarios.
[0171] Example 2:
[0172] Based on the same inventive concept, embodiments of the present invention also provide a spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction device, the device comprising:
[0173] Dataset preparation module: used to acquire historical power data and related meteorological data of photovoltaic power plants, and perform normalization processing; the normalized data is divided into training set and test set according to a preset ratio;
[0174] Model building and training module: The pre-built spatiotemporal feature extraction model is trained using the training and test sets. During the training process, an improved optimization algorithm is used to adaptively optimize the model's hyperparameters. The spatiotemporal feature extraction model includes a parallel spatial feature extraction module and a temporal feature extraction module. The spatial feature extraction module is used to extract the spatial correlation features of the data, and the temporal feature extraction module is used to extract the time series features of the data.
[0175] Inference and Prediction Module: This module is used to input relevant real-time meteorological data into a trained spatiotemporal feature fusion prediction model and output future ultra-short-term photovoltaic power prediction results.
[0176] Since these devices and the principles underlying the problems they solve are similar to the aforementioned spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method, the implementation of this device can refer to the implementation of the aforementioned method, and the repetitions will not be repeated.
[0177] Example 3:
[0178] Based on the same inventive concept, the present invention also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0179] Memory, used to store computer programs;
[0180] When the processor executes the program stored in the memory, it is able to implement a spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method as described in any one of Embodiments 1.
[0181] like Figure 13 As shown, the electronic device may include: a processor 10, a communication interface 20, a memory 30, and a communication bus 40, wherein the processor 10, the communication interface 20, and the memory 30 communicate with each other via the communication bus 40. The processor 10 can call logical instructions in the memory 30 to execute a spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method, which includes:
[0182] S1: Obtain historical power data and related meteorological data of photovoltaic power plants, and perform normalization processing;
[0183] S2: Divide the normalized data into training and test sets according to a preset ratio;
[0184] S3: The pre-built spatiotemporal feature extraction model is trained using the training and test sets. An improved optimization algorithm is used to adaptively optimize the hyperparameters of the model during the training process. The spatiotemporal feature extraction model includes a parallel spatial feature extraction module and a temporal feature extraction module. The spatial feature extraction module is used to extract the spatial correlation features of the data, and the temporal feature extraction module is used to extract the time series features of the data.
[0185] S4: Input relevant real-time meteorological data into the trained spatiotemporal feature fusion prediction model and output the future ultra-short-term photovoltaic power prediction results.
[0186] Example 4:
[0187] This invention also provides a computer-readable storage medium, in which a program is stored for executing a spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method according to Embodiment 1 above. The program can be executed on a processor.
[0188] Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0189] The program stored on this medium is loaded into the processor's memory and executed to perform various functions. This storage medium, connected to hardware devices, enables the computer to perform the steps of Embodiment 1 described above.
[0190] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0191] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in this invention may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A spatio-temporal feature fusion ultra-short-term photovoltaic power generation prediction method, characterized in that, Includes the following steps: S1: Obtain historical power data and related meteorological data of photovoltaic power plants, and perform normalization processing; S2: Divide the normalized data into training and test sets according to a preset ratio; S3: The pre-built spatiotemporal feature extraction model is trained using the training set and test set, wherein an improved optimization algorithm is used to adaptively optimize the hyperparameters of the model during the training process; The improved optimization algorithm is an adaptive dynamic artificial rabbit optimization algorithm, which uses Tent chaotic mapping to initialize the population to enhance diversity and introduces an adaptive weight factor to dynamically adjust the balance between global exploration and local development during the iteration process. The spatiotemporal feature extraction model includes a parallel-connected spatial feature extraction module and a temporal feature extraction module. The spatial feature extraction module includes a depth perception module and a global perception module. The depth perception module is used to implement deep feature extraction. The global perception module uses multi-scale convolutional kernels to capture contextual information at different scales. The temporal feature extraction module is used to extract the time-series features of the data. The time feature extraction module uses a bidirectional long short-term memory network (BiLSTM) to simultaneously learn the temporal dependencies between historical and future data. S4: Input relevant real-time meteorological data into the trained spatiotemporal feature extraction model and output the future ultra-short-term photovoltaic power prediction results.
2. The method of claim 1, wherein, The depth perception module extracts deep features through convolutional layers, batch normalization layers, depth-separable convolutional layers, and channel attention modules. The global perception module uses multi-scale convolutional kernels to capture contextual information at different scales and performs feature concatenation; the multi-scale convolutional kernels include 1×1, 3×1 and 5×1 convolutional kernels.
3. The method of claim 2, wherein, The specific calculation process of the depth perception module is as follows: wherein, sigmoid is a sigmoid activation function, batchnorm is a batch normalization layer, conv is a convolution layer with a convolution kernel of size 3x3x64, hadamard is a Hadamard product, depthwise is a depthwise separable convolution layer, conv is a convolution layer with a convolution kernel of size 3x3x64, globalavgpool is a global average pooling layer; x x is an input feature, y1 is a shallow feature of the depth perception module, y2 is an intermediate feature of the depth perception module, y3 is a deep feature of the depth perception module, and y4 is a final extracted deep level feature.
4. The method according to claim 2, characterized in that, The specific calculation process of the global perception module is as follows: in, These are the input features for the global perception module. , as well as These represent the convolution kernel as follows: , , convolutional layers, y5 is the ReLU activation function; The output features of the convolutional layer channels, y6 is The output features of the convolutional layer channels, y7 is The output features of the convolutional layer channels are y1 and y2 are the output features of the global perception module.
5. The method according to claim 1, characterized in that, The improved optimization algorithm in step S3 is an adaptive dynamic artificial rabbit optimization algorithm, and its improvements include: S31. Initialize the population using Tent chaotic mapping to enhance diversity; the expression is as follows: In the formula To initialize the nth individual in the population, For chaotic mapping parameters; This is the (n+1)th individual in the population generated after the Tent chaotic mapping iteration; S32. Introduce the adaptive weighting factor ω, which is calculated as follows: Where t is the current iteration number, T is the maximum iteration number, and k is the weight coefficient; The adaptive weighting factor ω dynamically adjusts the balance between global exploration and local development during the iteration process.
6. The method according to claim 1, characterized in that, The selection of associated meteorological data in step S1 includes: Feature selection of meteorological data is performed based on Pearson correlation coefficient, and meteorological variables with high correlation to photovoltaic power are selected as input; the meteorological data include: temperature, horizontal total solar radiation, horizontal diffuse radiation and total diffuse radiation.
7. A spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction device, characterized in that, The apparatus comprising the method of any one of claims 1-6, wherein the method is: Dataset preparation module: used to acquire historical power data and related meteorological data of photovoltaic power plants, and perform normalization processing; the normalized data is divided into training set and test set according to a preset ratio; Model building and training module: The pre-built spatiotemporal feature extraction model is trained using the training set and test set, wherein an improved optimization algorithm is used to adaptively optimize the hyperparameters of the model during the training process; the spatiotemporal feature extraction model includes a parallel spatial feature extraction module and a temporal feature extraction module, the spatial feature extraction module is used to extract the spatial correlation features of the data, and the temporal feature extraction module is used to extract the time series features of the data; Inference and prediction module: This module is used to input relevant real-time meteorological data into a trained spatiotemporal feature fusion prediction model and output future ultra-short-term photovoltaic power prediction results.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the spatiotemporal feature fusion ultra-short-term photovoltaic power generation prediction method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Photovoltaic power ultra-short-term prediction method and device, electronic equipment and storage medium
CN116011608A
Ultra-short-term photovoltaic power prediction method based on multi-modal learning
CN118503918A