A short-term photovoltaic power prediction method and system
Patent Information
- Application Number
- CN202611485726.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-23
- Publication Date
- 2026-10-27
AI Technical Summary
[0006]本申请实施例提供一种短期光伏功率预测方法及系统,用于解决现有方法中存在的模态混叠、超参数人工调整及长序列处理效率低的问题
本申请通过引入CEEMDAN(完全集合经验模态分解与自适应噪声)对原始光伏功率序列进行多尺度分解,有效抑制了传统单一EMD方法中存在的模态混叠问题,提升了高频扰动与低频趋势的分离精度;在此基础上,结合样本熵对各本征模态分量进行复杂度评估,并针对性地对高复杂度分量实施VMD(变分模态分解),进一步细化其内部结构,从而在保留低复杂度分量整体趋势的同时,增强对局部剧烈波动的刻画能力,显著提高了输入特征的可建模性。
Smart Images

Figure CN122992697A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of photovoltaic power generation prediction technology, specifically relating to a short-term photovoltaic power prediction method and system. Background Technology
[0002] With the ongoing global energy structure transformation, the scale of photovoltaic (PV) power generation connected to the grid is expanding rapidly. However, PV power output itself exhibits strong nonlinearity, non-stationarity, and intermittency, displaying highly complex fluctuation characteristics due to the influence of solar irradiance, variable weather conditions, and seasonal variations. This uncertainty poses a significant challenge to the stability of power systems. Therefore, high-precision short-term forecasting of PV power generation under complex environments has become a key issue in the field of new energy grid connection.
[0003] Existing photovoltaic (PV) prediction methods mainly include deep learning time-series prediction models represented by Long Short-Term Memory (LSTM) networks and Transformers (with attention mechanisms), as well as combined prediction methods that incorporate signal processing techniques such as Variational Mode Decomposition (VMD) (e.g., VMD-LSTM). These methods have made some progress in conventional time-series feature mining. However, when faced with diverse real-world application scenarios, existing technical solutions still reveal the following shortcomings: 1. Mode aliasing bottleneck of single decomposition method: Traditional prediction methods mostly use a single signal decomposition method. When faced with non-stationary photovoltaic power sequences, mode aliasing is very likely to occur, making it difficult to completely separate high-frequency random noise from low-frequency main trends, which directly limits the accuracy of subsequent time series modeling.
[0004] 2. Poor adaptability and insufficient generalization of models to sudden fluctuations: Existing deep learning models such as LSTM and Transformer are poorly adapted to sudden fluctuations in photovoltaic power. More importantly, the internal hyperparameters of these models usually rely on manual experience for setting, making them prone to getting trapped in local optima. In complex scenarios with high latitudes and significant seasonal weather differences, the prediction accuracy and robustness of the models are poor due to the drastic seasonal changes in data distribution.
[0005] 3. Computational Complexity and Efficiency Bottlenecks in Long Sequences: The computational complexity of the self-attention mechanism in Transformer-based deep learning prediction methods increases quadratically with sequence length. When processing power data containing high-dimensional meteorological features and long-term sequences, there are bottlenecks such as huge computational overhead and low training and inference efficiency, making it difficult to meet the requirements of real-time scheduling. Summary of the Invention
[0006] This application provides a method and system for short-term photovoltaic power prediction, which addresses the problems of mode mixing, manual adjustment of hyperparameters, and low efficiency of long sequence processing in existing methods.
[0007] The first aspect of this application provides a short-term photovoltaic power prediction method, including: Acquire meteorological data and photovoltaic power data of photovoltaic power stations, preprocess the photovoltaic power data to obtain historical photovoltaic power sequences, preprocess the meteorological data to obtain meteorological characteristic data, calculate the meteorological characteristic data related to photovoltaic power data, and obtain key meteorological characteristics; The historical photovoltaic power sequence was decomposed using CEEMDAN to obtain multiple intrinsic mode components and one residual component. Calculate the sample entropy of each intrinsic mode component, and divide the intrinsic mode components into high-complexity components and low-complexity components according to a preset threshold. Variational mode decomposition is performed on the high-complexity components to obtain several decomposition sequences; the low-complexity components and the residual components are directly retained and combined with the several decomposition sequences to form several subsequences; The Grey Wolf optimization algorithm was used to optimize the hyperparameters of the Mamba3 prediction model and obtain the optimal combination of hyperparameters. The Mamba3 prediction model is constructed based on the optimal hyperparameter combination. The key meteorological features and several subsequences are combined to form an input feature vector. The Mamba3 prediction model is trained to obtain the final Mamba3 prediction model. Several subsequences are obtained by processing photovoltaic power data from L consecutive moments before the current moment, and the key meteorological features of the current moment's meteorological data are input into the final Mamba3 prediction model to predict each subsequence and obtain single-step prediction values. All single-step prediction values are linearly superimposed and then inversely normalized to obtain the photovoltaic power prediction result for the current moment.
[0008] Furthermore, the historical photovoltaic power series was decomposed using CEEMDAN, including: Set the number of integrations. In each stage of decomposition, add a pair of Gaussian white noises with opposite positive and negative values to the current residual signal. Perform empirical mode decomposition on the signal with added noise, extract the intrinsic mode components, and perform an arithmetic mean on the intrinsic mode components obtained from each experiment. Use the average value as the final result of the intrinsic mode components in this stage. In the next stage of decomposition, the residual signal remaining after the extraction of intrinsic mode components in the previous stage is used as the new signal to be decomposed. The noise standard deviation coefficient corresponding to the next stage is added and multiplied by the result of the intrinsic mode component extraction operator in the previous stage applied to white noise. The above process of adding paired noise, empirical mode decomposition and averaging multiple experiments is repeated to extract each intrinsic mode component step by step. When the current residual signal cannot be further decomposed, the decomposition process is terminated, resulting in multiple intrinsic mode components arranged from high to low frequency and one residual component.
[0009] Further, the sample entropy of each intrinsic mode component is calculated, including: for each intrinsic mode component, setting the embedding dimension and similarity tolerance, counting the number of template vector pairs that satisfy the similarity tolerance condition under the embedding dimension, and the number of template vector pairs that continue to satisfy the similarity tolerance condition under the embedding dimension plus 1, calculating the ratio of the number of template vector pairs before and after and taking the negative logarithm to obtain the sample entropy value of the intrinsic mode component.
[0010] Furthermore, based on a preset threshold, the intrinsic mode components are divided into high-complexity components and low-complexity components, including: The calculated sample entropy value is compared with a preset threshold. When the sample entropy value is greater than the preset threshold, the corresponding intrinsic mode component is determined to be a high-complexity component; when the sample entropy value is less than or equal to the preset threshold, the corresponding intrinsic mode component is determined to be a low-complexity component.
[0011] Furthermore, variational mode decomposition is performed on the high-complexity components to obtain several decomposition sequences, including: For each intrinsic mode component that is determined to be a high-complexity component, the intrinsic mode component is used as the signal to be decomposed for variational mode decomposition. The number of modes is set and the signal to be decomposed is decomposed into multiple decomposition sequences equal to the number of modes. During the decomposition process, the center frequencies of each decomposition sequence are different, and the sum of all decomposition sequences is equal to the signal to be decomposed.
[0012] Furthermore, the Grey Wolf optimization algorithm is used to optimize the hyperparameters of the Mamba3 prediction model, obtaining the optimal hyperparameter combination, including: Initialize the gray wolf population, where the position vector of each individual gray wolf in the population represents a set of hyperparameter combinations of the Mamba3 prediction model; Each hyperparameter combination is input into the Mamba3 prediction model, and the mean squared error is calculated on the validation set as the fitness value. The population is then sorted from best to worst based on the fitness value, and the individual with the best fitness is marked as... Wolves, the second-best fit individuals are marked as The wolf with the third best fitness is marked as Wolves, the rest are marked as Wolf; In each iteration, each The wolf calculates its own situation and the current situation separately. Wolf, wolves and The distance between the wolves, and according to Wolf, wolves and The wolf's position vector is used to update its own position, causing the entire population to converge toward the optimal solution region; Wolf, wolves and The wolf's position is also dynamically updated based on its fitness value in each iteration; After reaching the preset maximum number of iterations, stop iterating and continue to the current iteration. The combination of hyperparameters corresponding to the wolf's position vector is taken as the optimal combination of hyperparameters.
[0013] Furthermore, when the Mamba3 prediction model makes predictions, it sequentially performs the following forward propagation process: The input projection matrix, output projection matrix, and time step parameters in the selective state space model are dynamically generated based on the input feature vector at the current moment, so that the Mamba3 prediction model can adaptively adjust the state update method according to the current input. By using the discretized state transition matrix and the discretized input projection matrix, the hidden state of the previous time step is updated to the hidden state of the current time step; the hidden state of the current time step is mapped to the output of the current time step through the output projection matrix to obtain the single-step prediction value of each subsequence at the current time step.
[0014] Furthermore, when selecting a state update, the Mamba3 prediction model dynamically adjusts the state transition matrix and time step parameters based on the magnitude of changes in the external driving signal and the internal inertial signal in the current input feature vector. When the magnitude of the change in the external driving signal exceeds a preset threshold, the influence weight of the external driving signal on the hidden state update is increased, so that the Mamba3 prediction model outputs an earlier response to weather changes. When the magnitude of the change in the external driving signal does not exceed the preset threshold, the dominant weight of the internal inertial signal on the hidden state update is maintained, so that the output of the Mamba3 prediction model follows the historical change inertia of each component.
[0015] A second aspect of this application provides a short-term photovoltaic power prediction system, comprising: The preprocessing module is used to acquire meteorological data and photovoltaic power data of photovoltaic power stations, preprocess the photovoltaic power data to obtain historical photovoltaic power sequences, preprocess the meteorological data to obtain meteorological characteristic data, calculate the meteorological characteristic data related to the photovoltaic power data, and obtain key meteorological characteristics. The CEEMDAN decomposition module is used to perform CEEMDAN decomposition on historical photovoltaic power sequences to obtain multiple intrinsic mode components and one residual component. The sample entropy calculation module is used to calculate the sample entropy of each intrinsic mode component and divide the intrinsic mode components into high-complexity components and low-complexity components according to a preset threshold. The VMD decomposition module is used to perform variational mode decomposition on the high-complexity components to obtain several decomposition sequences; the low-complexity components and the residual components are directly retained and combined with the several decomposition sequences to form several subsequences. The hyperparameter optimization module is used to optimize the hyperparameters of the Mamba3 prediction model using the Grey Wolf Optimization Algorithm to obtain the optimal hyperparameter combination. The model training module constructs a Mamba3 prediction model based on the optimal hyperparameter combination, and uses the key meteorological features and several subsequences to form an input feature vector to train the Mamba3 prediction model, thereby obtaining the final Mamba3 prediction model. The Mamba3 prediction model is used to select several subsequences obtained by processing photovoltaic power data from L consecutive time points before the current time, and input them with key meteorological features of the current meteorological data. The Mamba3 prediction model is then used to predict each subsequence to obtain a single-step prediction value. All single-step prediction values are linearly superimposed and then inversely normalized to obtain the photovoltaic power prediction result for the current time.
[0016] Compared with the prior art, the advantages of this application are as follows: This application introduces CEEMDAN (Complete Ensemble Empirical Mode Decomposition with Adaptive Noise) to perform multi-scale decomposition of the original photovoltaic power sequence, effectively suppressing the mode aliasing problem existing in the traditional single EMD method and improving the separation accuracy of high-frequency disturbances and low-frequency trends. On this basis, the complexity of each intrinsic mode component is evaluated by combining sample entropy, and VMD (Variational Mode Decomposition) is applied to high-complexity components to further refine their internal structure. Thus, while preserving the overall trend of low-complexity components, the ability to characterize local drastic fluctuations is enhanced, significantly improving the modelability of input features.
[0017] The Grey Wolf Optimization (GWO) algorithm is used to automatically optimize the key hyperparameters of the Mamba3 prediction model, which overcomes the limitations of relying on manual experience for parameter tuning, avoids getting trapped in local optima, and enhances the model's generalization ability and robustness under different seasons and weather conditions.
[0018] The adopted Mamba3 prediction model is based on a selective state-space mechanism. While maintaining linear computational complexity, it can dynamically adjust the state update strategy according to the current input characteristics: when a significant change is detected in the external meteorological driving signal, the model automatically increases its sensitivity to external disturbances; while during periods of stable weather, it focuses on maintaining historical inertia, thus ensuring both prediction accuracy and stability. This mechanism effectively overcomes the high computational cost of Transformer-type models in long-sequence processing and meets the real-time and efficiency requirements of short-term photovoltaic power prediction.
[0019] This application systematically solves the problems of modal aliasing, manual hyperparameter adjustment, and low efficiency of long sequence processing in existing methods through a technical architecture of multi-level adaptive decomposition, intelligent hyperparameter optimization, and dynamic response prediction, and achieves high-precision, highly adaptable, and computationally efficient short-term photovoltaic power prediction. Attached Figure Description
[0020] Figure 1 A flowchart illustrating a short-term photovoltaic power prediction method provided in this application embodiment; Figure 2 A block diagram of a short-term photovoltaic power prediction system provided in this application embodiment; Figure 3 This is a diagram showing the results of all decomposition sequences obtained after variational mode decomposition, as provided in an embodiment of this application. Figure 3 (a) in the diagram represents the signal to be decomposed. Figure 3 (b) to (f) are word sequences or modal components with different center frequencies, respectively. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0022] See Figure 1 As shown in the embodiment of this application, a short-term photovoltaic power prediction method is provided, including: S101: Acquire meteorological data and photovoltaic power data of photovoltaic power station; preprocess photovoltaic power data to obtain historical photovoltaic power sequence; preprocess meteorological data to obtain meteorological characteristic data; calculate meteorological characteristic data related to photovoltaic power data; and obtain key meteorological characteristics. S102, perform CEEMDAN decomposition on the historical photovoltaic power sequence to obtain multiple intrinsic mode components and one residual component; S103, calculate the sample entropy of each intrinsic mode component, and divide the intrinsic mode components into high-complexity components and low-complexity components according to a preset threshold. S104, perform variational mode decomposition on the high-complexity component to obtain several decomposition sequences; the low-complexity component and the residual component are directly retained and combined with the several decomposition sequences to form several subsequences; S105, The Grey Wolf Optimization Algorithm is used to optimize the hyperparameters of the Mamba3 prediction model to obtain the optimal hyperparameter combination; S106. Based on the optimal hyperparameter combination, construct the Mamba3 prediction model, combine the key meteorological features with several subsequences to form an input feature vector, train the Mamba3 prediction model, and obtain the final Mamba3 prediction model. S107: Select several subsequences obtained by processing the photovoltaic power data of the previous L consecutive times, and input them with the key meteorological features of the meteorological data at the current time into the final Mamba3 prediction model to predict each subsequence and obtain the single-step prediction value. After linearly superimposing all the single-step prediction values, perform inverse normalization to obtain the photovoltaic power prediction result at the current time.
[0023] In one embodiment, step S101, acquiring meteorological data and photovoltaic power data of the photovoltaic power station, includes: Meteorological data includes the following characteristics: wind speed, wind direction, air temperature, humidity, air pressure, backsheet temperature, direct radiation, diffuse radiation, total horizontal irradiance, atmospheric aerosol concentration, the increment of total radiation over a fixed time interval, effective backsheet temperature, module slope irradiance, and time characteristics after sinusoidal processing. The above meteorological data, once acquired, serves as the raw meteorological characteristic data.
[0024] The photovoltaic power data is the sequence of active power actually output by the photovoltaic power station. The data collection time interval is fixed, and the collection frequency is consistent with that of meteorological data.
[0025] The acquired raw data is preprocessed, including missing value imputation, data normalization, and outlier detection and removal.
[0026] For missing values, time-based linear interpolation is used to fill in the missing values. The interpolation is performed linearly according to the time distance based on the observations at the nearest known time before and after the missing time.
[0027] Specifically, for data normalization, min-max normalization is used, linearly mapping all observations of each feature to the interval [0,1]. The minimum and maximum values of that feature across the entire dataset are used as the lower and upper boundaries, respectively. This is represented as: , In the formula, The normalized value. These are the original observations. and These are the minimum and maximum values of the feature across the entire dataset, respectively.
[0028] Specifically, for outlier detection and removal, the DBSCAN density clustering algorithm (a density-based spatial clustering algorithm) is used to identify and remove outliers caused by sensor malfunctions, communication errors, or extreme weather. The neighborhood radius of the DBSCAN density clustering algorithm is determined by... The distance map is determined, and the minimum sample size is preset based on the data size. After detecting and removing outliers, linear interpolation is used again to fill the resulting time gaps in order to maintain the continuity of the fixed-resolution time series.
[0029] Missing moments are filled using time-based linear interpolation: , In the formula, For a moment The interpolation results, and for The closest known time before and after, for Data at any given time for Data at any given moment.
[0030] The meteorological feature data obtained after the above preprocessing is used to quantitatively evaluate the linear correlation between each meteorological feature data and photovoltaic power data using the Pearson correlation coefficient. Meteorological feature data with correlation coefficients lower than a preset threshold are removed, and meteorological feature data with correlation coefficients higher than the preset threshold are retained as key meteorological features.
[0031] The Pearson correlation coefficient (PCC) is expressed as follows: , In the formula, The first meteorological characteristic data One observation value, The first photovoltaic power data One observation value, The mean of the meteorological characteristic data, This represents the average of the photovoltaic power data. The total number of samples.
[0032] In step S102, the preprocessed historical photovoltaic power sequence is decomposed using CEEMDAN (Adaptive Noise Complete Ensemble Empirical Mode Decomposition), which decomposes it into multiple intrinsic mode components arranged from high to low frequency and a residual component. CEEMDAN decomposition effectively suppresses mode mixing and ensures the completeness of the decomposition by adaptively adding pairs of positive and negative Gaussian white noise to the residual signal at each stage of decomposition and using multiple ensemble averaging to eliminate the influence of noise.
[0033] The historical photovoltaic power series was decomposed using CEEMDAN, including: Set the number of integrations. In each stage of decomposition, add a pair of Gaussian white noises with opposite positive and negative values to the current residual signal. Perform empirical mode decomposition on the signal with added noise, extract the intrinsic mode components, and perform an arithmetic mean on the intrinsic mode components obtained from each experiment. Use the average value as the final result of the intrinsic mode components in this stage. In the next stage of decomposition, the residual signal remaining after the extraction of intrinsic mode components in the previous stage is used as the new signal to be decomposed. The noise standard deviation coefficient corresponding to the next stage is added and multiplied by the result of the intrinsic mode component extraction operator in the previous stage applied to white noise. The above process of adding paired noise, empirical mode decomposition and averaging multiple experiments is repeated to extract each intrinsic mode component step by step. When the current residual signal cannot be further decomposed, the decomposition process is terminated, resulting in multiple intrinsic mode components arranged from high to low frequency and one residual component.
[0034] In one example, before the decomposition begins, the number of integrations, M, is set. The number of integrations, M, refers to the total number of repeated trials for empirical mode decomposition (EMD) after adding different white noise to the residual signal at each stage of the decomposition. In the first stage of decomposition, paired positive and negative Gaussian white noise is added to the historical photovoltaic power signal to generate Y noisy signals. EMD is then performed on each noisy signal to extract the first-order intrinsic mode components (IEMs). The arithmetic mean of the n extraction results is then used to obtain the final result of the first-order IEMs. Simultaneously, calculate the residual signal after subtracting IMF1 from the original photovoltaic power signal. .
[0035] Entering the stage( During decomposition, the residual signal from the previous stage is used as the signal to be decomposed. The corresponding noise standard deviation coefficient is added to the residual signal from the previous stage and multiplied by the result of the intrinsic mode component extraction operator from the previous stage applied to white noise to generate the decomposition signal. For each noisy signal, empirical mode decomposition is performed to extract the intrinsic mode components. The arithmetic mean of the extraction results is used to obtain the first extraction result. The final result of the first-order intrinsic mode components Simultaneously calculate The residual signal of the first stage minus the second stage The final result of the first-order intrinsic mode components The residual signal after Among them, the intrinsic mode component extraction operator refers to the operator that extracts the eigenmode components after performing empirical mode decomposition. Operations on the intrinsic mode components.
[0036] After extracting each first-order component, determine the current residual signal. Does the empirical mode decomposition termination condition meet? When the residual signal cannot be further decomposed (e.g., the residual signal is a monotonic function or the number of extreme points does not exceed two), the decomposition process is terminated, and the current residual signal is output as the final residual component.
[0037] After CEEMDAN decomposition, multiple intrinsic mode components arranged from high to low frequency and one residual component are obtained. Among them, the earlier-order intrinsic mode components exhibit high-frequency oscillation characteristics, corresponding to the instantaneous fluctuations and random disturbances in the photovoltaic power sequence; the intermediate-order intrinsic mode components exhibit a mid-to-low frequency periodic structure, corresponding to the daily cycle, weather processes, and other variation patterns in the photovoltaic power sequence; the residual component characterizes the long-term variation trend of the original photovoltaic power sequence.
[0038] In step S103, the intrinsic mode components obtained from CEEMDAN decomposition are evaluated for complexity quantification to determine which intrinsic mode components require further variational mode decomposition (VMD). In this step, sample entropy is introduced as a complexity metric to objectively quantify the irregularity of each intrinsic mode component.
[0039] Sample entropy is a nonlinear dynamic metric that measures the complexity of a time series data set. Its physical meaning is: in a time series data set with an embedding dimension of... Under the condition that two sequences are in The distance between consecutive points is less than the similarity tolerance. At that time, it was The negative logarithm of the conditional probability of maintaining similarity at each point. The larger the sample entropy value, the lower the self-similarity and the higher the irregularity of the photovoltaic power sequence; the smaller the sample entropy value, the stronger the regularity and the higher the predictability of the photovoltaic power sequence.
[0040] For each intrinsic mode component obtained after CEEMDAN decomposition, its sample entropy value is calculated. The specific process includes... For each intrinsic mode component, we set the embedding dimension and similarity tolerance, count the number of template vector pairs that satisfy the similarity tolerance condition under the embedding dimension, and the number of template vector pairs that continue to satisfy the similarity tolerance condition under the embedding dimension plus 1. We calculate the ratio of the number of template vector pairs before and after the embedding dimension and take the negative logarithm to obtain the sample entropy value of the intrinsic mode component.
[0041] The formula is expressed as: , In the formula, For the embedding dimension, For similarity tolerance, The length of the time series. In order to be in The number of template vector pairs matched within a point In order to be in The number of pairs to continue matching within a given point. This refers to the sample entropy value. When the sample entropy value of the intrinsic mode component... When a component is identified as high-complexity, it undergoes a secondary decomposition using VMD (Variational Mode Decomposition); when the sample entropy value... When the complexity is low, it is defined as a low-complexity component and directly retained in the subsequent prediction process. A threshold screening mechanism ensures that the secondary decomposition is applied only to the truly necessary components, effectively controlling computational complexity while maximizing signal stationarity.
[0042] Variational mode decomposition was performed on the high-complexity components selected by sample entropy values after CEEMDAN decomposition to further separate the different frequency components implicit within them.
[0043] Variational Mode Decomposition (VMD) is a completely non-recursive adaptive signal decomposition method. Its core idea is to decompose the signal into several modal components with specific sparse characteristics. Each modal component is concentrated around its center frequency, and the sum of all modal components equals the original signal. VMD achieves signal decomposition by constructing and solving a constrained variational problem. The constrained optimization problem is to minimize the sum of the bandwidths of each modal component while ensuring that the sum of all modal components equals the original signal. Specifically, for each modal component, its analytic signal is calculated, its center frequency is shifted to baseband by multiplying it by an exponential signal, and then the gradient of the shifted signal is calculated. The square of the norm is used as a bandwidth estimate, and the optimization objective is to minimize the sum of the bandwidths of all modal components.
[0044] In one example, by introducing a quadratic penalty factor and Lagrange multipliers, the constrained optimization problem is transformed into an unconstrained optimization problem. An iterative solution using the alternating direction multiplier method is then employed, sequentially updating each modal component and its corresponding center frequency until the convergence condition is met. Finally, the signal to be decomposed is decomposed into... One modal component.
[0045] In step S104, for each intrinsic mode component identified as a high-complexity component, variational mode decomposition is performed on it as the signal to be decomposed. The number of modes K for each high-complexity component is determined by the center frequency method: starting from an initial value, the number of modes K is gradually increased, and variational mode decomposition is performed on the signal to be decomposed once for each increase. The difference between the center frequencies of adjacent mode components after decomposition is calculated. When the center frequencies of adjacent modes overlap, the number of modes before the overlap is taken as the final number of modes for that mode component.
[0046] The expression for the constrained optimization problem of variational mode decomposition is: , , In the formula, For the first One modal component, For the first The center frequency corresponding to each modal component The high-complexity components to be decomposed. The Dirac function is represented by ∗, where ∗ denotes convolution. Indicates constraints. Indicates time Find the partial derivative. Represents the imaginary unit. The first time variable Each high-complexity component has a modal component. The number of modes in each high-complexity component is... Determined using the center frequency method: gradually increase the number of modes. When the center frequencies of adjacent modes overlap significantly, the number of modes K in the previous mode is taken as the final number of modes.
[0047] After setting the number of modes corresponding to each high-complexity component using the method described above, variational mode decomposition is performed on each high-complexity component. Each high-complexity component is decomposed into a number of decomposition sequences (modal components) equal to the number of its own modes. During the decomposition process, the center frequencies of each decomposition sequence are different, and the sum of all decomposition sequences is equal to that high-complexity component.
[0048] The low-complexity components and the residual components are directly retained without secondary decomposition. All decomposed sequences obtained after variational mode decomposition, together with the directly retained low-complexity components and residual components, form the set of components to be predicted in the subsequent Mamba3 prediction model, i.e., several subsequences. Each subsequence in this set of components to be predicted is the basic unit that is finally input into the Mamba3 prediction model for prediction.
[0049] See Figure 3 The image shown is a graph illustrating the results of all decomposition sequences obtained after variational mode decomposition. Figure 3 (a) in the diagram represents the signal to be decomposed. Figure 3 In the diagram, (b) to (f) represent multiple word sequences or modal components arranged from low to high center frequencies. It can be seen that, through secondary decomposition, the high-complexity component is further decomposed into multiple modal components or decomposed sequences.
[0050] Before using the Mamba3 prediction model to predict the photovoltaic power at the current moment, the Mamba3 prediction model needs to be trained. Before training, the hyperparameters of the Mamba3 prediction model are optimized using the Grey Wolf optimization algorithm in step S105 to obtain the optimal combination of hyperparameters. Here, Mamba3 refers to the selective state-space model, which is the third generation of the Mamba series models.
[0051] The Gray Wolf Optimization Algorithm is a swarm intelligence optimization algorithm that simulates the social hierarchy and cooperative hunting strategies of gray wolf populations in nature. In the Gray Wolf Optimization Algorithm, the wolf pack is ranked into four levels according to their fitness values, from best to worst: the optimal individual is marked as... Wolves, the second-best individual is marked as Wolf, the third best individual is marked as Wolves, the rest are marked as Wolves. Among them... Wolf, wolves and The wolves form the leadership, guiding the entire pack's search direction. The wolf follows the first three to update its position.
[0052] The specific process of hyperparameter optimization is as follows: Initialize the gray wolf population. The position vector of each individual gray wolf in the population represents a set of hyperparameter combinations of the Mamba3 prediction model, including all hyperparameters to be optimized. The population size is set to 20.
[0053] Each individual gray wolf's hyperparameter combination is input into the Mamba3 prediction model. The mean squared error (MSE) of the Mamba3 prediction model is calculated on the validation set and used as the fitness value for that individual. A smaller MSE indicates higher prediction accuracy and better fitness for that hyperparameter combination of the Mamba3 prediction model. The MSE is calculated as the mean of the squares of the differences between the predicted and actual values.
[0054] The population is sorted from best to worst based on fitness values, and the individual with the best fitness is marked as... Wolves, the second-best fit individuals are marked as The wolf with the third best fitness is marked as Wolves, the rest are marked as Wolf.
[0055] In each iteration, each The wolf calculates its own situation and the current situation separately. Wolf, wolves and The distance between the wolves, and according to Wolf, wolves and The wolf's position vector is used to update its own position, causing the entire population to converge toward the optimal solution region. Wolf, wolves and The wolf's position is also dynamically updated based on its fitness value in each iteration. Through continuous iteration, individuals in the population gradually approach the global optimum.
[0056] The formula for updating the wolf pack's position is: , , In the formula, , , These are the position vectors of the current optimal, second-best, and third-best solutions, respectively. , , A vector of random coefficients. This represents the current iteration number. For the current individual and The distance vector between wolves For the current individual and The distance vector between wolves For the current individual and Distance vector between wolves Let this be the current position vector of the individual gray wolf. For the number of iterations The position vector of the individual gray wolf at that time.
[0057] In this embodiment, there are a total of 7 hyperparameters to be optimized, including: learning rate, number of network layers, model feature dimension, state space dimension, feature expansion factor, attention head dimension, and random inactivation rate.
[0058] Iteration stops after reaching the maximum number of iterations (50), and continues from the current iteration. The hyperparameter combination corresponding to the wolf's position vector is output as the optimal hyperparameter combination and used for the subsequent construction of the Mamba3 prediction model.
[0059] In step S106, a Mamba3 prediction model is constructed based on the optimal hyperparameter combination. There are seven hyperparameters to be configured, including learning rate, number of network layers, model feature dimension, state space dimension, feature expansion factor, attention head dimension, and random inactivation rate, all optimized using the Grey Wolf optimization algorithm. Set the numerical value corresponding to the wolf's position vector.
[0060] The core of the Mamba3 prediction model is the selective state-space model. The continuous-time form of the selective state-space model is as follows: the derivative of the hidden state equals the state transition matrix multiplied by the current hidden state plus the input projection matrix multiplied by the current input feature vector. The output of the Mamba3 prediction model equals the output projection matrix multiplied by the current hidden state. The formula is expressed as: , , After zero-order preserved discretization, we obtain: , , In the formula, In hidden state, and The meaning is the same; it indicates a hidden state. For the input feature vector, and They have the same meaning; they are input feature vectors. The time derivative of the hidden state. Here is the state transition matrix. For the input projection matrix, To output the projection matrix, For time step parameters, It is the identity matrix. and One meaning refers to the output of the amba3 prediction model; This is the hidden state from the previous moment. This is the discretized state transition matrix. The input projection matrix is discretized. In the amba3 prediction model... , and All are derived from the current input feature vector Dynamic generation enables selective state updates for each subsequence; meanwhile, the Mamba3 prediction model employs a multiple-input multiple-output (MIMO) mechanism to support joint modeling of multidimensional meteorological features and multi-scale decomposed subsequences, with both input dimension d and output dimension p being configurable.
[0061] After zero-order preserved discretization, the discretized state transition matrix is equal to the state transition matrix multiplied by the matrix exponent of the time step parameter. The discretized input projection matrix is jointly determined by the time step parameter, the state transition matrix, and the input projection matrix. The hidden state at the next time step is equal to the discretized state transition matrix multiplied by the current hidden state plus the discretized input projection matrix multiplied by the current input feature vector. The output at the current time step is equal to the output projection matrix multiplied by the current hidden state.
[0062] Unlike standard state-space models, the input projection matrix, output projection matrix, and time step parameters in the Mamba3 prediction model are dynamically generated from the input feature vector at the current time step. This allows the Mamba3 prediction model to adaptively adjust the state update method according to the current input, achieving selective state updates for each subsequence.
[0063] The input projection matrix is calculated from the input feature vector at the current time through the first learnable linear projection layer. The input projection matrix is used to control the degree of influence of the external driving signal and the internal inertial signal in the current input feature vector on the hidden state update. The external driving signal is the key meteorological feature, and the internal inertial signal is the historical observation value of each subsequence. The output projection matrix is calculated from the input feature vector at the current time through the second learnable linear projection layer. The output projection matrix is used to control the selective extraction and mapping of information related to each component to be predicted in the current hidden state to the output of the Mamba3 prediction model. The time step parameter is calculated from the input feature vector at the current moment through the third learnable linear projection layer. The time step parameter is used to control the speed of hidden state updates. When the change amplitude of the key meteorological features in the input feature vector exceeds the preset threshold, the time step parameter increases, the state update speeds up, and the Mamba3 prediction model adjusts the prediction output in advance based on meteorological changes before the power value has fully responded. When the change amplitude of the key meteorological features does not exceed the preset threshold, the time step parameter remains flat, the state update slows down, and the Mamba3 prediction model relies on the historical change inertia of each subsequence to continue the prediction trend.
[0064] The first, second, and third learnable linear projection layers are independent linear transformation networks, each with its own learning parameters. During model training, each projection layer automatically learns the mapping relationship from the input feature vector to the corresponding parameters through the backpropagation algorithm, and forms a fixed mapping function after training. Key meteorological features retained after Pearson correlation coefficient screening are used as external driving signals. Historical observations of the subsequences obtained from variational mode decomposition of the high-complexity component, the low-complexity component, and the residual component are used as internal inertial signals. The key meteorological features, subsequences, low-complexity components, and residual components at the same time are concatenated dimensionally to form the input feature vector for the current time. The total dimension of the input feature vector equals the sum of the number of key meteorological features and the number of components to be predicted.
[0065] The external driving signal consists of key meteorological features retained after screening by the Pearson correlation coefficient, including at least one of irradiance, temperature, humidity, wind speed, and air pressure. The internal inertial signal consists of subsequences composed of the decomposed sequences of the high-complexity component, the low-complexity component, and the residual component, representing observations from multiple consecutive times prior to the current moment. The external driving signal provides the Mamba3 prediction model with meteorological change information at current and historical moments, enabling the Mamba3 prediction model to capture the immediate driving impact of abrupt changes in irradiance, temperature variations, and wind speed fluctuations on photovoltaic power. The internal inertial signal provides the Mamba3 prediction model with the numerical change trajectory of each component at historical moments, enabling the Mamba3 prediction model to capture the inherent periodic variation patterns and trend continuity of each component.
[0066] In one embodiment, when selecting a state update, the Mamba3 prediction model dynamically adjusts the state transition matrix and time step parameters based on the magnitude of changes in the values of the external driving signal and the internal inertial signal in the current input feature vector. When the magnitude of the change in the external driving signal exceeds a preset threshold, the influence weight of the external driving signal on the hidden state update is increased, so that the Mamba3 prediction model output responds to weather changes in advance. When the magnitude of the change in the external driving signal does not exceed the preset threshold, the dominant weight of the internal inertial signal on the hidden state update is maintained, so that the output of the Mamba3 prediction model follows the historical change inertia of each component.
[0067] For example, when the irradiance or wind speed in the external driving signal changes abruptly, the input projection matrix increases the weight of the external driving signal in updating the hidden state, and the time step parameter is increased to accelerate the state update. The Mamba3 prediction model adjusts its output in advance based on meteorological changes. When the external driving signal changes smoothly, the input projection matrix maintains the dominant weight of the internal inertial signal in updating the hidden state, and the time step parameter remains flat. The Mamba3 prediction model follows the historical changes of each subsequence and outputs predicted values inertial manner.
[0068] The Mamba3 prediction model employs a multiple-input multiple-output (MIMO) mechanism. The input dimension of the Mamba3 prediction model is equal to the sum of the number of key meteorological features and the number of components to be predicted, while the output dimension is equal to the number of components to be predicted. It supports joint modeling of key meteorological features and multi-scale decomposition subsequences.
[0069] Training the Mamba3 prediction model involves dividing the training set data into multiple training samples with a fixed time window length. Each training sample is a sequence of samples preceding the current time. The input feature vector at each time step is used as the input to the Mamba3 prediction model. The subsequences, low-complexity components, and residual component observations at the next time step (i.e., the current time step) after L consecutive time steps are used as the output labels. That is, the mapping relationship learned by the Mamba3 prediction model is: based on the meteorological feature data and power component observations of the past L time steps, predict the values of each power component at the current time step.
[0070] Each training sample is sequentially input into the Mamba3 prediction model. The Mamba3 prediction model performs linear projection, root mean square normalization, rotation position encoding, and lookup key normalization on the input sequence through the MambaMixer module (selective state-space mixing module). Multi-scale temporal dependencies are extracted through a multi-input multi-output state-space model. Features are selectively fused through a Sigmoid gating mechanism. Then, nonlinear feature transformation is performed through the SwiGLU prediction block (gated linear unit). Finally, the predicted power components of each subsequence, each low-complexity component, and the residual component at the current time are obtained through a fully connected output layer. Selective feature fusion through the Sigmoid gating mechanism means that the Sigmoid function is applied to a linearly transformed feature vector to generate a gated weight vector in the range (0,1). The gated weight vector is multiplied element-wise with another linearly transformed feature vector to achieve selective feature fusion. The SwiGLU prediction block inputs the input features into two parallel learnable weight matrices for linear transformation. One branch is processed by the SiLU activation function and then multiplied element-wise with the output of the other branch.
[0071] Mean squared error (MSE) is used as the loss function to calculate the error between the predicted values output by the Mamba3 prediction model and the true labels. The learnable parameters of the Mamba3 prediction model are updated layer by layer through the backpropagation algorithm. The MSE is the mean of the squares of the differences between the predicted values and the true values for each sample.
[0072] After each training epoch, the validation set data is input into the current Mamba3 prediction model to calculate the validation set loss function value. If the validation set loss function value does not decrease in multiple consecutive training epochs, the training is terminated early, and the model parameters with the smallest validation set loss function value are saved as the final Mamba3 prediction model.
[0073] In the actual prediction phase, the trained final Mamba3 prediction model is used to predict photovoltaic power. The specific process is as follows: At the actual forecast time, acquire the meteorological data for the current moment, including characteristics such as irradiance, temperature, humidity, wind speed, air pressure, backsheet temperature, direct radiation, diffuse radiation, total horizontal irradiance, module slope irradiance, and atmospheric aerosol concentration. Acquire photovoltaic power data for the L consecutive moments preceding the current moment (i.e., the current moment, the previous moment, ..., and backward L-1 moments, for a total of L moments).
[0074] The acquired photovoltaic power data at L time points are processed as follows: First, the original photovoltaic power data undergoes the same preprocessing as in the training phase (missing value imputation and normalization). Then, the preprocessed power sequence is decomposed using CEEMDAN to obtain multiple intrinsic mode components and one residual component. The sample entropy of each intrinsic mode component is calculated. Based on a preset threshold, intrinsic mode components with sample entropy greater than 1 are identified as high-complexity components and subjected to secondary decomposition of variational modes. Low-complexity components and the residual component are directly retained. The decomposed sequences obtained from variational mode decomposition, the low-complexity components, and the residual component are combined to form several subsequences.
[0075] Extract the observation values of each subsequence from the L consecutive time steps preceding the current time step as the internal inertial signal. Extract the key meteorological features of the current time step (features retained after being filtered by Pearson correlation coefficient) as the external driving signal.
[0076] The key meteorological features at the current moment are aligned with the observations of each subsequence from the previous L consecutive time steps, forming the input feature vector. The total dimension of the input feature vector is equal to the sum of the number of key meteorological features and the number of components to be predicted (each subsequence), with a sequence length of L. This input feature vector has the same input format as the one used in the training phase.
[0077] The constructed input feature vector sequence is fed into the pre-trained final Mamba3 prediction model. The Mamba3 prediction model loads the optimal parameters saved during the training phase and executes the following forward propagation process sequentially: The Mamba3 prediction model dynamically generates the input projection matrix, output projection matrix, and time step parameters of the selective state-space model based on the key meteorological features in the input feature vector at the current time. Using the discretized state transition matrix and the discretized input projection matrix, the hidden state at the previous time step is updated to the hidden state at the current time step. The hidden state at the current time step is then mapped to the intermediate output of the model at the current time step through the output projection matrix. After further processing by the MambaMixer module and the SwiGLU prediction block, the predicted values of each subsequence at the current time step are output through a fully connected output layer.
[0078] Because the Mamba3 model employs a multiple-input multiple-output (MIMO) mechanism, it simultaneously outputs the predicted values of all components to be predicted (including variational mode decomposition sequences, low-complexity components, and residual components) at the current time step during a forward propagation process. Each output dimension corresponds to the predicted value of a subsequence. The predicted values of each subsequence are single-step predictions, meaning they are estimates of the subsequences at the current time step obtained from data from L consecutive time steps prior to the current time step.
[0079] The predicted values of each subsequence are linearly superimposed at their corresponding time points. Since each subsequence is a decomposition of the original power sequence at different frequency scales, the sum of the subsequences equals the original power sequence. Therefore, the reconstructed power prediction result is obtained by adding the predicted values of all subsequences. The subsequences are added with equal weights, and the weight coefficient is 1 for each subsequence.
[0080] Obtain the minimum and maximum values of the original photovoltaic power data before normalization. Then, perform inverse normalization on the reconstructed prediction results using the inverse normalization transformation. That is, the inverse normalized prediction value is equal to the reconstructed prediction value multiplied by the difference between the maximum and minimum values of the original data plus the minimum value of the original data. Finally, restore the prediction results to the original power dimensions to obtain the final photovoltaic power prediction result at the current moment.
[0081] Through the above process, the Mamba3 prediction model only needs to perform one forward propagation calculation for each prediction to complete the entire prediction process from data acquisition to final power prediction output, thus meeting the timeliness requirements of short-term power prediction for photovoltaic power plants.
[0082] On the other hand, see Figure 2 As shown in the figure, this application provides a short-term photovoltaic power prediction system, including: The preprocessing module is used to acquire meteorological data and photovoltaic power data of photovoltaic power stations, preprocess the photovoltaic power data to obtain historical photovoltaic power sequences, preprocess the meteorological data to obtain meteorological characteristic data, calculate the meteorological characteristic data related to the photovoltaic power data, and obtain key meteorological characteristics. The CEEMDAN decomposition module is used to perform CEEMDAN decomposition on historical photovoltaic power sequences to obtain multiple intrinsic mode components and one residual component. The sample entropy calculation module is used to calculate the sample entropy of each intrinsic mode component and divide the intrinsic mode components into high-complexity components and low-complexity components according to a preset threshold. The VMD decomposition module is used to perform variational mode decomposition on the high-complexity components to obtain several decomposition sequences; the low-complexity components and the residual components are directly retained and combined with the several decomposition sequences to form several subsequences. The hyperparameter optimization module is used to optimize the hyperparameters of the Mamba3 prediction model using the Grey Wolf Optimization Algorithm to obtain the optimal hyperparameter combination. The model training module constructs a Mamba3 prediction model based on the optimal hyperparameter combination, and uses the key meteorological features and several subsequences to form an input feature vector to train the Mamba3 prediction model, thereby obtaining the final Mamba3 prediction model. The Mamba3 prediction model is used to select several subsequences obtained by processing photovoltaic power data from L consecutive time points before the current time, and input them with key meteorological features of the current meteorological data. The Mamba3 prediction model is then used to predict each subsequence to obtain a single-step prediction value. All single-step prediction values are linearly superimposed and then inversely normalized to obtain the photovoltaic power prediction result for the current time.
[0083] Specifically, the preprocessing module acquires meteorological and photovoltaic power data from the photovoltaic power plant. The acquired meteorological data includes wind speed, wind direction, air temperature, humidity, air pressure, backsheet temperature, direct radiation, diffuse radiation, total horizontal irradiance, atmospheric aerosol concentration, the increment of total radiation over a fixed time interval, effective backsheet temperature, module slope irradiance, and time characteristics processed by sinusoidal analysis. The preprocessing module preprocesses the photovoltaic power data, including linear interpolation to fill missing values, min-max normalization, and outlier detection and removal based on the DBSCAN density clustering algorithm, to obtain a historical photovoltaic power sequence. The preprocessing module also preprocesses the meteorological data to obtain meteorological feature data, and uses the Pearson correlation coefficient to quantify the linear correlation between each meteorological feature and photovoltaic power. Meteorological features with correlation coefficients below a preset threshold are removed, while those above the preset threshold are retained as key meteorological features.
[0084] The CEEMDAN decomposition module is used to perform adaptive noise-complete ensemble empirical mode decomposition on the historical photovoltaic power sequence, obtaining multiple intrinsic mode components and one residual component. In each stage of decomposition, the CEEMDAN decomposition module adds paired positive and negative Gaussian white noise to the current residual signal, averages the results of multiple experiments to obtain each intrinsic mode component, and iterates step-by-step until the residual signal can no longer be decomposed, terminating at which point multiple intrinsic mode components arranged from high to low frequency and one residual component are obtained.
[0085] The sample entropy calculation module calculates the sample entropy of each intrinsic mode component (EMF). Based on a preset threshold, the EMFs are classified into high-complexity and low-complexity components. For each EMF, the module sets the embedding dimension and similarity tolerance, counts the number of template vector pairs that satisfy the similarity tolerance condition at the current embedding dimension, and the number of template vector pairs that continue to satisfy the similarity tolerance condition even with an increased embedding dimension. The negative logarithm of the ratio of the latter to the former is calculated to obtain the sample entropy value of that EMF. The module compares the sample entropy value of each component with the preset threshold. If the sample entropy value is greater than one, the EMF is classified as a high-complexity component; if the sample entropy value is not greater than one, the EMF is classified as a low-complexity component.
[0086] The VMD decomposition module is used to perform variational mode decomposition on high-complexity components, resulting in several decomposition sequences. The VMD decomposition module treats each high-complexity component as the signal to be decomposed, sets the number of modes, and decomposes the signal into multiple decomposition sequences equal to the number of modes. During the decomposition process, the center frequencies of each decomposition sequence are different, and the sum of all decomposition sequences equals the signal to be decomposed. The number of modes for each high-complexity component is determined by the center frequency method, i.e., the number of modes is gradually increased, and when the center frequencies of adjacent modes overlap, the number of modes from the previous sequence is taken as the final number of modes. The low-complexity components and the residual components are directly retained without variational mode decomposition and, together with the decomposition sequences, form several subsequences.
[0087] The hyperparameter optimization module is used to optimize the hyperparameters of the Mamba3 prediction model using the gray wolf optimization algorithm to obtain the optimal hyperparameter combination. The module initializes the gray wolf population, where the position vector of each individual gray wolf represents a set of hyperparameter combinations for the Mamba3 prediction model. Each hyperparameter combination is input into the Mamba3 prediction model, and the mean squared error is calculated on the validation set as the fitness value. The population is then ranked according to the fitness values. Wolf, Wolf, wolves and There are four levels of wolves, with the first three guiding the search direction; after reaching the maximum number of iterations, ... The hyperparameter combination corresponding to the wolf's position is output as the optimal hyperparameter combination. The hyperparameters to be optimized include the learning rate, number of network layers, model feature dimension, state space dimension, feature expansion factor, attention head dimension, and random inactivation rate.
[0088] The model training module is used to construct a Mamba3 prediction model based on the optimal hyperparameter combination. The key meteorological features and several subsequences are combined to form an input feature vector, which is used to train the Mamba3 prediction model to obtain the final Mamba3 prediction model.
[0089] The core of the Mamba3 prediction model is a selective state-space model. The model training module uses key meteorological features retained after Pearson correlation coefficient filtering as external driving signals, and the historical observations of the several subsequences themselves as internal inertial signals. It concatenates the key meteorological features and subsequences at the same time according to their dimensions to form the input feature vector for the current time. The total dimension of the input feature vector equals the sum of the number of key meteorological features and the number of components to be predicted, and the output dimension equals the number of components to be predicted.
[0090] The model training module divides the training set data into multiple training samples according to a fixed time window. Each training sample uses the input feature vectors from multiple consecutive time points as the model input and the observation values of each subsequence at the next time point as the output label. The model training module uses mean squared error as the loss function, updates the model parameters through the backpropagation algorithm, and implements an early stopping mechanism on the validation set. It saves the model parameters when the loss function value on the validation set is minimized, thus obtaining the final Mamba3 prediction model.
[0091] In the Mamba3 prediction model, the input projection matrix, output projection matrix, and time step parameter are all dynamically generated from the input feature vector at the current moment. This allows the Mamba3 prediction model to adaptively adjust its state update method based on the current input, achieving selective state updates for the sequence. When the change in key meteorological features in the input feature vector exceeds a preset threshold, the time step parameter increases, and the state update accelerates. The Mamba3 prediction model adjusts its prediction output in advance based on meteorological changes before the power value has fully responded. When the change in key meteorological features does not exceed the preset threshold, the time step parameter remains flat, and the Mamba3 prediction model relies on the historical change inertia of each subsequence to continue the prediction trend.
[0092] The Mamba3 prediction model comprises the MambaMixer module and the SwiGLU prediction block. The MambaMixer module sequentially performs linear projection, root mean square normalization, rotational position encoding, and lookup key normalization on the input sequence. After extracting multi-scale temporal dependencies using a multi-input multi-output state-space model, it selectively fuses features through a Sigmoid gating mechanism. The SwiGLU prediction block transforms the input through two learnable weight matrices. One branch is processed by the SiLU activation function, and then multiplied element-wise with the other branch. The output is then mapped through a fully connected layer to the predicted values of each subsequence at the current time step.
[0093] The Mamba3 prediction model is used to select consecutive moments before the current time. The photovoltaic power data at each time point is processed to obtain several subsequences. These subsequences, along with the key meteorological features of the current time's meteorological data, are input into the final Mamba3 prediction model to predict each subsequence and obtain single-step prediction values. All single-step prediction values are linearly superimposed and then inversely normalized to obtain the photovoltaic power prediction result for the current time point.
[0094] The Mamba3 prediction model first acquires the meteorological data at the current moment and the photovoltaic power data from the L consecutive moments preceding the current moment. The photovoltaic power data from these L moments is then processed using the same preprocessing, CEEMDAN decomposition, sample entropy filtering, and variational mode decomposition procedures as in the training phase, resulting in several sub-sequences. The Mamba3 prediction model extracts key meteorological features from the current moment as external driving signals and extracts data from the L consecutive moments preceding the current moment. The observations of each subsequence at each time step are used as internal inertial signals. After aligning the two by time step, they are input into the final Mamba3 prediction model.
[0095] The Mamba3 prediction model performs forward propagation calculations, simultaneously outputting the single-step prediction value of each subsequence at the current time. The Mamba3 model then linearly superimposes the prediction values of each subsequence with equal weights at their corresponding times to obtain the reconstructed power prediction result. The Mamba3 model obtains the minimum and maximum values of the original photovoltaic power data before normalization, performs an inverse normalization transformation on the reconstructed prediction result to restore it to the original power dimensions, and outputs the final photovoltaic power prediction result for the current time.
[0096] The short-term photovoltaic power prediction system provided in this application implements a preprocessing module for data cleaning and feature selection, a CEEMDan decomposition module and a VMD decomposition module for multi-scale signal decomposition, a sample entropy calculation module for effective control of computational complexity, a hyperparameter optimization module for automatic optimization of model hyperparameters, a model training module for efficient training of the Mamba3 prediction model, and a Mamba3 prediction model for real-time prediction and result reconstruction. These modules work collaboratively to achieve high-precision and high-efficiency short-term photovoltaic power prediction.
[0097] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A short-term photovoltaic power prediction method, characterized in that, include: Acquire meteorological data and photovoltaic power data of photovoltaic power stations, preprocess the photovoltaic power data to obtain historical photovoltaic power sequences, preprocess the meteorological data to obtain meteorological characteristic data, calculate the meteorological characteristic data related to photovoltaic power data, and obtain key meteorological characteristics; The historical photovoltaic power sequence was decomposed using CEEMDAN to obtain multiple intrinsic mode components and one residual component. Calculate the sample entropy of each intrinsic mode component, and divide the intrinsic mode components into high-complexity components and low-complexity components according to a preset threshold. Variational mode decomposition is performed on the high-complexity components to obtain several decomposition sequences; the low-complexity components and the residual components are directly retained and combined with the several decomposition sequences to form several subsequences; The Grey Wolf optimization algorithm was used to optimize the hyperparameters of the Mamba3 prediction model and obtain the optimal combination of hyperparameters. The Mamba3 prediction model is constructed based on the optimal hyperparameter combination. The key meteorological features and several subsequences are combined to form an input feature vector. The Mamba3 prediction model is trained to obtain the final Mamba3 prediction model. Several subsequences are obtained by processing photovoltaic power data from L consecutive moments before the current moment, and the key meteorological features of the current moment's meteorological data are input into the final Mamba3 prediction model to predict each subsequence and obtain single-step prediction values. All single-step prediction values are linearly superimposed and then inversely normalized to obtain the photovoltaic power prediction result for the current moment.
2. The short-term photovoltaic power prediction method according to claim 1, characterized in that, The historical photovoltaic power series was decomposed using CEEMDAN, including: Set the number of integrations. In each stage of decomposition, add a pair of Gaussian white noises with opposite positive and negative values to the current residual signal. Perform empirical mode decomposition on the signal after adding noise, extract the intrinsic mode components, and perform an arithmetic mean on the intrinsic mode components obtained from each experiment. Use the average value as the final result of the intrinsic mode components in this stage. In the next stage of decomposition, the residual signal remaining after the extraction of intrinsic mode components in the previous stage is used as the new signal to be decomposed. The noise standard deviation coefficient corresponding to the next stage is added and multiplied by the result of the intrinsic mode component extraction operator in the previous stage applied to white noise. The above process of adding paired noise, empirical mode decomposition and averaging multiple experiments is repeated to extract each intrinsic mode component step by step. When the current residual signal cannot be further decomposed, the decomposition process is terminated, resulting in multiple intrinsic mode components arranged from high to low frequency and one residual component.
3. The short-term photovoltaic power prediction method according to claim 1, characterized in that, The sample entropy of each intrinsic mode component is calculated as follows: for each intrinsic mode component, the embedding dimension and similarity tolerance are set, the number of template vector pairs that satisfy the similarity tolerance condition under the embedding dimension is counted, and the number of template vector pairs that continue to satisfy the similarity tolerance condition under the embedding dimension plus 1 is counted. The ratio of the number of template vector pairs before and after the embedding dimension is calculated and the negative logarithm is taken to obtain the sample entropy value of the intrinsic mode component.
4. The short-term photovoltaic power prediction method according to claim 3, characterized in that, Based on a preset threshold, the intrinsic mode components are divided into high-complexity components and low-complexity components, including: The calculated sample entropy value is compared with a preset threshold. When the sample entropy value is greater than the preset threshold, the corresponding intrinsic mode component is determined to be a high-complexity component; when the sample entropy value is less than or equal to the preset threshold, the corresponding intrinsic mode component is determined to be a low-complexity component.
5. The short-term photovoltaic power prediction method according to claim 1, characterized in that, Variational mode decomposition is performed on the high-complexity components to obtain several decomposition sequences, including: For each intrinsic mode component that is determined to be a high-complexity component, the intrinsic mode component is used as the signal to be decomposed for variational mode decomposition. The number of modes is set and the signal to be decomposed is decomposed into multiple decomposition sequences equal to the number of modes. During the decomposition process, the center frequencies of each decomposition sequence are different, and the sum of all decomposition sequences is equal to the signal to be decomposed.
6. The short-term photovoltaic power prediction method according to claim 1, characterized in that, The Grey Wolf optimization algorithm is used to optimize the hyperparameters of the Mamba3 prediction model, obtaining the optimal hyperparameter combination, including: Initialize the gray wolf population, where the position vector of each individual gray wolf in the population represents a set of hyperparameter combinations of the Mamba3 prediction model; Each hyperparameter combination is input into the Mamba3 prediction model, and the mean squared error is calculated on the validation set as the fitness value. The population is then sorted from best to worst based on the fitness value, and the individual with the best fitness is marked as... Wolves, the second-best fittest individuals are marked as The wolf with the third best fitness is marked as Wolves, the rest are marked as Wolf; In each iteration, each The wolf calculates its own and current states respectively. Wolf, wolves and The distance between the wolves, and according to Wolf, wolves and The wolf's position vector is used to update its own position, causing the entire population to converge toward the optimal solution region; Wolf, wolves and The wolf's position is also dynamically updated based on its fitness value in each iteration; After reaching the preset maximum number of iterations, stop iterating and continue to the current iteration. The combination of hyperparameters corresponding to the wolf's position vector is taken as the optimal combination of hyperparameters.
7. The short-term photovoltaic power prediction method according to claim 1, characterized in that, When the Mamba3 prediction model makes predictions, it performs the following forward propagation process in sequence: The input projection matrix, output projection matrix, and time step parameters in the selective state space model are dynamically generated based on the input feature vector at the current moment, so that the Mamba3 prediction model can adaptively adjust the state update method according to the current input. Using the discretized state transition matrix and the discretized input projection matrix, the hidden state of the previous time step is updated to the hidden state of the current time step; The hidden state at the current time step is mapped to the output at the current time step through the output projection matrix, thus obtaining the single-step prediction value of each subsequence at the current time step.
8. The short-term photovoltaic power prediction method according to claim 7, characterized in that, When selecting a state update, the Mamba3 prediction model dynamically adjusts the state transition matrix and time step parameters based on the magnitude of changes in the external driving signal and the internal inertial signal in the current input feature vector. When the magnitude of the change in the external driving signal exceeds a preset threshold, the influence weight of the external driving signal on the hidden state update is increased, so that the Mamba3 prediction model output responds to weather changes in advance. When the magnitude of the change in the external driving signal does not exceed the preset threshold, the dominant weight of the internal inertial signal on the hidden state update is maintained, so that the output of the Mamba3 prediction model follows the historical change inertia of each component.
9. A short-term photovoltaic power prediction system, characterized in that, include: The preprocessing module is used to acquire meteorological data and photovoltaic power data of photovoltaic power stations, preprocess the photovoltaic power data to obtain historical photovoltaic power sequences, preprocess the meteorological data to obtain meteorological characteristic data, calculate the meteorological characteristic data related to the photovoltaic power data, and obtain key meteorological characteristics. The CEEMDAN decomposition module is used to perform CEEMDAN decomposition on historical photovoltaic power sequences to obtain multiple intrinsic mode components and one residual component. The sample entropy calculation module is used to calculate the sample entropy of each intrinsic mode component and divide the intrinsic mode components into high-complexity components and low-complexity components according to a preset threshold. The VMD decomposition module is used to perform variational mode decomposition on high-complexity components to obtain several decomposition sequences; low-complexity components and the residual components are directly retained and combined with several decomposition sequences to form several subsequences. The hyperparameter optimization module is used to optimize the hyperparameters of the Mamba3 prediction model using the Grey Wolf Optimization Algorithm to obtain the optimal hyperparameter combination. The model training module constructs a Mamba3 prediction model based on the optimal hyperparameter combination. It uses key meteorological features and several subsequences to form an input feature vector, trains the Mamba3 prediction model, and obtains the final Mamba3 prediction model. The Mamba3 prediction model is used to select several subsequences of photovoltaic power data from L consecutive time points before the current time, process them, and combine them with key meteorological features of the current meteorological data to obtain a single-step prediction value. After linear superposition and inverse normalization, the photovoltaic power prediction result for the current time is obtained.