Photovoltaic power generation prediction method and system based on improved TimeMixer
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGXI UNIV OF SCI & TECH
- Filing Date
- 2026-05-12
- Publication Date
- 2026-08-07
AI Technical Summary
光伏出力的实际演变实质上是宏观天气趋势与微观局部扰动深度非线性耦合的结果,而这种纯线性的浅层集成范式割裂了不同频段信号间深层的物理交叉路径,难以精确拟合复杂气象环境下宏观演变与微观波动之间的非线性动态耦合规律
[0092]本发明具备对高频无序噪声的自适应筛选与降噪机制,保证在极端工况下的鲁棒性。同时,对不同频段信号间深层的物理交叉路径,实现精确拟合复杂气象环境下宏观演变与微观波动之间的非线性动态耦合规律;有效克服了复杂气象下的高频噪声干扰与多尺度特征孤立问题,显著提升了光伏发电预测的全局精度与动态追踪能力。
Smart Images

Figure CN122532886A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of photovoltaic power generation, and in particular to a photovoltaic power generation prediction method and system based on an improved TimeMixer. Background Technology
[0002] With the large-scale grid connection of high proportions of renewable energy, the operation of the power system places extremely high demands on the accuracy of forecasting on the generation side. As an important clean energy source, photovoltaic (PV) power generation is directly affected by micrometeorological factors such as solar irradiance, ambient temperature, and transient cloud cover, exhibiting strong randomness, volatility, and non-stationarity. Accurate PV power forecasting is a crucial prerequisite for ensuring the safe and stable operation of the power grid, optimizing day-ahead economic dispatch, and improving the efficiency of energy storage deployment.
[0003] To address the complex characteristics of photovoltaic power time-series signals, existing prediction techniques have evolved from traditional shallow machine learning algorithms to deep learning models based on deep neural networks. To further uncover the periodic and trend patterns in long-series time-series data, current techniques typically introduce time-series decomposition mechanisms and multi-scale hybrid architectures. By extracting macroscopic trend components and microscopic detail components at different sampling frequencies, these techniques aim to improve the model's ability to fit diverse and complex scenarios.
[0004] However, when faced with complex micrometeorological conditions such as sudden changes in cloud cover and alternating extreme weather events, existing multi-scale time-series forecasting models still face serious structural limitations, specifically in the following two aspects:
[0005] On the one hand, existing technologies lack adaptive filtering and denoising mechanisms for high-frequency disordered noise. Under complex weather conditions, the fine-grained sequence of photovoltaic power output is filled with transient high-frequency noise caused by micro-meteorological disturbances. When performing cross-scale feature interactions, existing models often assign a constant confidence level to each feature channel, failing to dynamically attenuate invalid noise interference based on the current data state. These low-confidence redundant features are directly passed to the downstream prediction network, easily leading to abnormal local oscillations in the final output power prediction curve, severely weakening the model's robustness under extreme conditions.
[0006] On the other hand, existing models generally suffer from isolated physical correlations during the multi-scale feature fusion stage. Current techniques typically employ multiple independent linear predictors at the model output to generate predictions for each scale, followed by simple equal-weighted or weighted linear superposition. The actual evolution of photovoltaic power output is essentially the result of a deep nonlinear coupling between macroscopic weather trends and microscopic local disturbances. This purely linear, shallow integration paradigm severs the deep physical intersection paths between signals of different frequency bands, making it difficult to accurately fit the nonlinear dynamic coupling law between macroscopic evolution and microscopic fluctuations under complex meteorological conditions.
[0007] Therefore, those skilled in the art urgently need to propose a photovoltaic power generation prediction method that can effectively suppress cross-layer interference from high-frequency meteorological noise and break the physical isolation state of multi-scale features, so as to further improve the global prediction accuracy and transient extreme value tracking capability of photovoltaic power. Summary of the Invention
[0008] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a photovoltaic power generation prediction method and system based on an improved TimeMixer. First, a multi-scale historical observation sequence set is constructed through average pooling downsampling. Second, this set is input into a historically decomposable hybrid architecture to decouple it into trend and seasonal components, and cross-scale information interaction is performed to extract multi-scale hidden layer features. Then, after time-dimensional alignment, a dynamic attention mask is calculated using the Sigmoid activation function and performed with the hidden layer features through a Hadamard product operation to adaptively attenuate high-frequency meteorological noise channels, obtaining a pure feature sequence. Finally, the pure sequences are aggregated along the feature channels to construct a cross-scale joint state matrix, which is then input into a deep nonlinear mapping network containing the GELU operator to achieve deep cross-coupling of multi-frequency band components, outputting the final photovoltaic active power prediction sequence.
[0009] The objective of this invention is achieved through the following technical solution: a photovoltaic power generation prediction method based on an improved TimeMixer, comprising the following steps:
[0010] S1. Obtain historical photovoltaic active power sequences and associated meteorological feature sequences, and perform average pooling downsampling operation along the time dimension to construct multi-scale feature sequences with different resolutions;
[0011] S2. Construct a past decomposable hybrid module, input the multi-scale feature sequence into the past decomposable hybrid module, decouple the multi-scale feature sequence into trend component and seasonal component at each time scale, and perform top-down trend information transmission and bottom-up seasonal feature fusion respectively to obtain deep feature sequence.
[0012] S3. After length alignment of the deep feature sequence, the feature scale is obtained. The dynamic attention mask of the deep feature sequence is calculated using linear transformation and Sigmoid activation function. The dynamic attention mask and the feature scale are subjected to Hadamard product operation to adaptively attenuate the feature channel of high-frequency meteorological noise and obtain the filtered pure feature sequence.
[0013] S4. Aggregate the pure feature sequences at each scale along the feature channel dimension to construct a cross-scale joint state matrix. Input the joint state matrix into a deep nonlinear mapping network of the GELU activation function to induce deep cross-coupling of components in different frequency bands and generate a fused hidden state. Finally, project the fused hidden state onto the target physical space through the output mapping matrix to generate a single-variable photovoltaic active power prediction sequence for photovoltaic power generation scheduling.
[0014] Furthermore, step S1 includes:
[0015] S11. Obtain the historical photovoltaic active power sequence and associated meteorological characteristic sequence within the preset time window. , where P is the time step and C is the feature dimension;
[0016] S12. The meteorological feature sequence x is downsampled along the time dimension using average pooling to generate M downsampled sequences with different resolutions, as follows:
[0017] ;
[0018] In the formula, x m Let AvgPool(·) be the downsampled sequence at the m-th scale, and let AvgPool(·) be the average pooling.
[0019] S13, x is processed through the embedding layer m The mapping is performed to obtain the feature sequence x0m of the m-th scale at the 0th layer.
[0020] Furthermore, step S2 includes:
[0021] S21. Construct an L-layer stacked PDM (Prototype Decomposable Hybrid Module);
[0022] S22. Using the past decomposable mixture module, the feature sequence of the m-th scale output from the previous layer is decomposed into seasonal and trend components, as shown below:
[0023] ;
[0024] In the formula, Decomp(·) represents the subnet; Let m be the seasonal component of the m-th sequence in the l-th layer. Let m be the trend component of the m-th sequence in the l-th layer;
[0025] S23. Regarding the decomposed seasonal components A bottom-up hybridization strategy is adopted to incorporate fine-scale seasonal components. As a residual, it is added to the seasonal component at the coarse scale. In the middle, the ability to perceive fluctuation details at a coarse scale is enhanced, as shown below:
[0026] ;
[0027] In the formula, Mix S (·) represents a bottom-up mixing network; For m:1→M means mixing starts from sequence 1 and continues until sequence M;
[0028] S24. For the decomposed trend components A top-down hybrid strategy is adopted to combine coarse-scale trend components. As residuals, they are added to the trend components at a finer scale. In the middle, local noise interference is filtered out, as shown below:
[0029] ;
[0030] In the formula, Mix T (·) represents a top-down hybrid network;
[0031] S25. Summing the seasonal component and the trend component yields the feature sequence xl m of the l-th layer. After passing through the L-th layer of the decomposable mixing module, the final deep feature sequence xL m is output.
[0032] Furthermore, step S3 includes:
[0033] S31. Take the depth feature sequence xLm output in step S2 and align its temporal length to the prediction step size through a linear transformation to obtain the aligned feature scale. ;
[0034] S32. For each aligned feature scale The dynamic attention mask for the deep feature sequence is calculated through independent linear transformations and the sigmoid activation function, as shown below:
[0035] ;
[0036] In the formula, G m Let m be the dynamic attention mask for the m-th sequence. Let m be the weight matrix of the scale-m gated network. σ is the bias term of the m-th scale gated network, and σ(·) is the Sigmoid activation function;
[0037] S33. Perform a Hadamard product operation between the dynamic attention mask and the corresponding feature scale to obtain the purified feature sequence after feature filtering, as shown below:
[0038] ;
[0039] In the formula, This is the m-th pure feature sequence after feature filtering.
[0040] Furthermore, step S4 includes:
[0041] S41. Aggregate the pure feature sequences described in step S3 along the feature dimension to construct a cross-scale state matrix, as shown below:
[0042] ;
[0043] In the formula, || represents the splicing operation along the feature channel dimension;
[0044] S42. Input the joint state matrix into the deep projection network, and use the GELU activation function to induce deep cross-coupling of features from different frequency bands to generate a fused hidden state, as shown below:
[0045] ;
[0046] In the formula, Z is the fused hidden state matrix; W1 and b1 are the hidden layer projection matrix and bias term, respectively;
[0047] S43. Project the fused hidden state onto the target space using the output mapping matrix, and calculate the final predicted value of photovoltaic active power, as shown below:
[0048] ;
[0049] In the formula, is the predicted value of photovoltaic active power; W2 and b2 are the weight matrix and bias term of the output layer, respectively.
[0050] A photovoltaic power generation prediction system based on the improved TimeMixer, used to implement the aforementioned photovoltaic power generation prediction method based on the improved TimeMixer, includes:
[0051] The data input layer is used to perform average pooling downsampling on the historical photovoltaic active power sequence and the associated meteorological feature sequence along the time dimension to construct a multi-scale feature sequence with different resolutions.
[0052] The feature interaction layer is used to decouple the multi-scale feature sequence into trend components and seasonal components at various time scales, and respectively perform top-down trend information transmission and bottom-up seasonal feature fusion to obtain deep feature sequences.
[0053] The noise reduction and filtering layer is used to obtain the feature scale after length alignment of the deep feature sequence. The dynamic attention mask of the deep feature sequence is calculated by using linear transformation and Sigmoid activation function. The dynamic attention mask and the feature scale are subjected to Hadamard product operation to adaptively attenuate the feature channel of high-frequency meteorological noise and obtain the filtered clean feature sequence.
[0054] The output layer aggregates the clean feature sequences at each scale along the feature channel dimension to construct a cross-scale joint state matrix. The joint state matrix is then input into a deep nonlinear mapping network with a GELU activation function, which promotes deep cross-coupling of components in different frequency bands to generate a fused hidden state. Finally, the fused hidden state is projected onto the target physical space through the output mapping matrix to generate a single-variable photovoltaic active power prediction sequence for photovoltaic power generation scheduling.
[0055] Furthermore, the data input layer performs the following operations:
[0056] 1.1) Obtain the historical photovoltaic active power sequence and associated meteorological characteristic sequence x∈ℝ within a preset time window. P×C , where P is the time step and C is the feature dimension;
[0057] 1.2) The meteorological feature sequence x is downsampled along the time dimension using average pooling to generate M downsampled sequences with different resolutions, as detailed below:
[0058] ;
[0059] In the formula, x m Let AvgPool(·) be the downsampled sequence at the m-th scale, and let AvgPool(·) be the average pooling.
[0060] 1.3) Through the embedding layer on x m The mapping is performed to obtain the feature sequence x0m of the m-th scale at the 0th layer.
[0061] Furthermore, the feature interaction layer performs the following operations:
[0062] 2.1) Construct an L-layer stacked PDM that can be decomposed from the past;
[0063] 2.2) Using the past decomposable hybrid module, the feature sequence at the m-th scale output of the previous layer is decomposed into seasonal and trend components, as shown below:
[0064] ;
[0065] In the formula, Decomp(·) represents the subnet; Let m be the seasonal component of the m-th sequence in the l-th layer. Let m be the trend component of the m-th sequence in the l-th layer;
[0066] 2.3) Regarding the decomposed seasonal components A bottom-up hybridization strategy is adopted to incorporate fine-scale seasonal components. As a residual, it is added to the seasonal component at the coarse scale. In the middle, the ability to perceive fluctuation details at a coarse scale is enhanced, as shown below:
[0067] ;
[0068] In the formula, MixS(·) is a bottom-up mixing network; For m:1→M means mixing from sequence 1 to sequence M;
[0069] 2.4) Regarding the decomposed trend components A top-down hybrid strategy is adopted to combine coarse-scale trend components. As residuals, they are added to the trend components at a finer scale. In the middle, local noise interference is filtered out, as shown below:
[0070] ;
[0071] In the formula, Mix T (·) represents a top-down hybrid network;
[0072] 2.5) The seasonal component and the trend component are summed to obtain the feature sequence xl m of the l-th layer. After passing through the L-th layer of the past decomposable mixing module, the final deep feature sequence xL m is output.
[0073] Furthermore, the noise reduction and filtering layer performs the following operations:
[0074] 3.1) The depth feature sequence xLm output in step S2 is linearly transformed to align the temporal length to the prediction step size, thus obtaining the aligned feature scale. ;
[0075] 3.2) For each aligned feature scale The dynamic attention mask in the deep feature sequence is calculated through independent linear transformations and the sigmoid activation function, as shown below:
[0076] ;
[0077] In the formula, G m Let m be the dynamic attention mask for the m-th sequence. Let m be the weight matrix of the scale-m gated network. σ is the bias term of the m-th scale gated network, and σ(·) is the Sigmoid activation function;
[0078] 3.3) Perform a Hadamard product operation between the dynamic attention mask and the corresponding feature scale to obtain the purified feature sequence after feature filtering, as shown below:
[0079] ;
[0080] In the formula, This is the m-th pure feature sequence after feature filtering.
[0081] Furthermore, the output layer performs the following operations:
[0082] 4.1) Aggregate the pure feature sequences described in step S3 along the feature dimension to construct a cross-scale state matrix, as shown below:
[0083] ;
[0084] In the formula, || represents the splicing operation along the feature channel dimension;
[0085] 4.2) Input the joint state matrix into the deep projection network, and use the GELU activation function to induce deep cross-coupling of features from different frequency bands, generating a fused hidden state, as shown below:
[0086] ;
[0087] In the formula, Z is the fused hidden state matrix; W1 and b1 are the hidden layer projection matrix and bias term, respectively;
[0088] 4.3) Project the fused hidden state onto the target space using the output mapping matrix, and calculate the final predicted value of photovoltaic active power, as shown below:
[0089] ;
[0090] In the formula, is the predicted value of photovoltaic active power; W2 and b2 are the weight matrix and bias term of the output layer, respectively.
[0091] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0092] This invention possesses an adaptive filtering and noise reduction mechanism for high-frequency disordered noise, ensuring robustness under extreme operating conditions. Simultaneously, it accurately fits the nonlinear dynamic coupling law between macroscopic evolution and microscopic fluctuations under complex meteorological conditions by addressing deep physical cross-paths between signals of different frequency bands. This effectively overcomes the problems of high-frequency noise interference and multi-scale feature isolation under complex meteorological conditions, significantly improving the global accuracy and dynamic tracking capability of photovoltaic power generation prediction. Attached Figure Description
[0093] Figure 1 This is a flowchart illustrating the process architecture of a photovoltaic power generation prediction method based on an improved TimeMixer.
[0094] Figure 2 A comparison chart of predicted photovoltaic power output. Detailed Implementation
[0095] The present invention will be further described below with reference to specific embodiments.
[0096] Example 1
[0097] See Figure 1 As shown, the photovoltaic power generation prediction method based on the improved TimeMixer provided in this embodiment includes the following steps:
[0098] S1. Obtain historical photovoltaic active power sequences and associated meteorological feature sequences, and perform average pooling downsampling operation along the time dimension to construct multi-scale feature sequences with different resolutions, including the following steps:
[0099] S11. Obtain the historical photovoltaic active power sequence and associated meteorological characteristic sequence within the preset time window. , where P is the time step and C is the feature dimension;
[0100] S12. The meteorological feature sequence x is downsampled along the time dimension using average pooling to generate M downsampled sequences with different resolutions, as follows:
[0101] ;
[0102] In the formula, x m Let AvgPool(·) be the downsampled sequence at the m-th scale, and let AvgPool(·) be the average pooling.
[0103] S13, x is processed through the embedding layer m The mapping is performed to obtain the feature sequence x0m of the m-th scale at the 0th layer.
[0104] S2. Construct a past decomposable fusion module. Input the multi-scale feature sequence into the past decomposable fusion module, and decouple the multi-scale feature sequence into trend components and seasonal components at each time scale. Perform top-down trend information transmission and bottom-up seasonal feature fusion respectively to obtain a deep feature sequence, including the following steps:
[0105] S21. Construct an L-layer stacked PDM (Prototype Decomposable Hybrid Module);
[0106] S22. Using the past decomposable mixture module, the feature sequence of the m-th scale output from the previous layer is decomposed into seasonal and trend components, as shown below:
[0107] ;
[0108] In the formula, Decomp(·) represents the subnet; Let m be the seasonal component of the m-th sequence in the l-th layer. Let m be the trend component of the m-th sequence in the l-th layer;
[0109] S23. Regarding the decomposed seasonal components A bottom-up hybridization strategy is adopted to incorporate fine-scale seasonal components. As a residual, it is added to the seasonal component at the coarse scale. In the middle, the ability to perceive fluctuation details at a coarse scale is enhanced, as shown below:
[0110] ;
[0111] In the formula, Mix S (·) represents a bottom-up mixing network; For m:1→M means mixing starts from sequence 1 and continues until sequence M;
[0112] S24. For the decomposed trend components A top-down hybrid strategy is adopted to combine coarse-scale trend components. As residuals, they are added to the trend components at a finer scale. In the middle, local noise interference is filtered out, as shown below:
[0113] ;
[0114] In the formula, Mix T (·) represents a top-down hybrid network;
[0115] S25. Summing the seasonal component and the trend component yields the feature sequence xl m of the l-th layer. After passing through the L-th layer of the decomposable mixing module, the final deep feature sequence xL m is output.
[0116] S3. After length alignment of the deep feature sequence, the feature scale is obtained. The dynamic attention mask of the deep feature sequence is calculated using linear transformation and Sigmoid activation function. The dynamic attention mask and the feature scale are then subjected to Hadamard product operation to adaptively attenuate the feature channels of high-frequency meteorological noise, thereby obtaining the filtered clean feature sequence. This includes the following steps:
[0117] S31. Take the depth feature sequence xLm output in step S2 and align its temporal length to the prediction step size through a linear transformation to obtain the aligned feature scale. ;
[0118] S32. For each aligned feature scale The dynamic attention mask for the deep feature sequence is calculated through independent linear transformations and the sigmoid activation function, as shown below:
[0119] ;
[0120] In the formula, G m Let m be the dynamic attention mask for the m-th sequence. Let m be the weight matrix of the scale-m gated network. σ is the bias term of the m-th scale gated network, and σ(·) is the Sigmoid activation function;
[0121] S33. Perform a Hadamard product operation between the dynamic attention mask and the corresponding feature scale to obtain the purified feature sequence after feature filtering, as shown below:
[0122] ;
[0123] In the formula, This is the m-th pure feature sequence after feature filtering.
[0124] S4. Aggregate the pure feature sequences at each scale along the feature channel dimension to construct a cross-scale joint state matrix; input the joint state matrix into a deep nonlinear mapping network with GELU activation function to induce deep cross-coupling of components in different frequency bands, generating a fused hidden state; finally, project the fused hidden state onto the target physical space through the output mapping matrix to generate a univariate photovoltaic active power prediction sequence for photovoltaic power generation scheduling, including the following steps:
[0125] S41. Aggregate the pure feature sequences described in step S3 along the feature dimension to construct a cross-scale state matrix, as shown below:
[0126] ;
[0127] In the formula, || represents the splicing operation along the feature channel dimension;
[0128] S42. Input the joint state matrix into the deep projection network, and use the GELU activation function to induce deep cross-coupling of features from different frequency bands to generate a fused hidden state, as shown below:
[0129] ;
[0130] In the formula, Z is the fused hidden state matrix; W1 and b1 are the hidden layer projection matrix and bias term, respectively;
[0131] S43. Project the fused hidden state onto the target space using the output mapping matrix, and calculate the final predicted value of photovoltaic active power, as shown below:
[0132] ;
[0133] In the formula, is the predicted value of photovoltaic active power; W2 and b2 are the weight matrix and bias term of the output layer, respectively.
[0134] Using the same set of photovoltaic power generation data, predictions were made using Support Vector Machine (SVM), Long Short-Term Memory Recurrent Neural Network (LSTM), Informer, Autoformer, and TimeMixer, respectively. The prediction results are shown in Table 1, and the prediction comparison results are as follows. Figure 2 As shown.
[0135] Table 1. Comparison of overall prediction errors of different models on the test set.
[0136]
[0137] Conclusion: From Table 1 and Figure 2 The results show that the improved TimeMixer outperforms Long Short-Term Memory Recurrent Neural Networks, Informer, Autoformer, and TimeMixer. Compared to other algorithms, the improved TimeMixer optimization algorithm can find the globally optimal solution in a very short number of iterations.
[0138] Example 2
[0139] See Figure 1 As shown, the photovoltaic power generation prediction system based on the improved TimeMixer provided in this embodiment is used to implement the photovoltaic power generation prediction method based on the improved TimeMixer described in Embodiment 1, including:
[0140] The data input layer is used to perform average pooling downsampling along the time dimension on the historical photovoltaic active power sequence and the associated meteorological feature sequence to construct a multi-scale feature sequence with different resolutions; the data input layer performs the following operations:
[0141] 1.1) Obtain the historical photovoltaic active power sequence and associated meteorological characteristic sequence within the preset time window. , where P is the time step and C is the feature dimension;
[0142] 1.2) The meteorological feature sequence x is downsampled along the time dimension using average pooling to generate M downsampled sequences with different resolutions, as detailed below:
[0143] ;
[0144] In the formula, x m Let AvgPool(·) be the downsampled sequence at the m-th scale, and let AvgPool(·) be the average pooling.
[0145] 1.3) Through the embedding layer on x m The mapping is performed to obtain the feature sequence x0m of the m-th scale at the 0th layer.
[0146] The feature interaction layer is used to decouple multi-scale feature sequences into trend components and seasonal components at various time scales, and respectively perform top-down trend information transmission and bottom-up seasonal feature fusion to obtain deep feature sequences; the feature interaction layer performs the following operations:
[0147] 2.1) Construct an L-layer stacked PDM that can be decomposed from the past;
[0148] 2.2) Using the past decomposable hybrid module, the feature sequence at the m-th scale output of the previous layer is decomposed into seasonal and trend components, as shown below:
[0149] ;
[0150] In the formula, Decomp(·) represents the subnet; Let m be the seasonal component of the m-th sequence in the l-th layer. Let m be the trend component of the m-th sequence in the l-th layer;
[0151] 2.3) Regarding the decomposed seasonal components A bottom-up hybridization strategy is adopted to incorporate fine-scale seasonal components. As a residual, it is added to the seasonal component at the coarse scale. In the middle, the ability to perceive fluctuation details at a coarse scale is enhanced, as shown below:
[0152] ;
[0153] In the formula, Mix S (·) represents a bottom-up mixing network; For m:1→M means mixing starts from sequence 1 and continues until sequence M;
[0154] 2.4) Regarding the decomposed trend components A top-down hybrid strategy is adopted to combine coarse-scale trend components. As residuals, they are added to the trend components at a finer scale. In the middle, local noise interference is filtered out, as shown below:
[0155] ;
[0156] In the formula, Mix T (·) represents a top-down hybrid network;
[0157] 2.5) The seasonal component and the trend component are summed to obtain the feature sequence xl m of the l-th layer. After passing through the L-th layer of the past decomposable mixing module, the final deep feature sequence xL m is output.
[0158] The noise reduction and filtering layer is used to obtain the feature scale after length alignment of the deep feature sequence. A dynamic attention mask for the deep feature sequence is calculated using a linear transformation and a Sigmoid activation function. The dynamic attention mask is then subjected to a Hadamard product operation with the feature scale to adaptively attenuate the feature channels of high-frequency meteorological noise, thereby obtaining a filtered, clean feature sequence. The noise reduction and filtering layer performs the following operations:
[0159] 3.1) The depth feature sequence xLm output in step S2 is linearly transformed to align the temporal length to the prediction step size, thus obtaining the aligned feature scale. ;
[0160] 3.2) For each aligned feature scale The dynamic attention mask in the deep feature sequence is calculated through independent linear transformations and the sigmoid activation function, as shown below:
[0161] ;
[0162] In the formula, G m Let m be the dynamic attention mask for the m-th sequence. Let m be the weight matrix of the scale-m gated network. σ is the bias term of the m-th scale gated network, and σ(·) is the Sigmoid activation function;
[0163] 3.3) Perform a Hadamard product operation between the dynamic attention mask and the corresponding feature scale to obtain the purified feature sequence after feature filtering, as shown below:
[0164] ;
[0165] In the formula, This is the m-th pure feature sequence after feature filtering.
[0166] The output layer aggregates clean feature sequences at various scales along the feature channel dimension to construct a cross-scale joint state matrix. This joint state matrix is then input into a deep nonlinear mapping network with a GELU activation function, promoting deep cross-coupling of components across different frequency bands to generate a fused hidden state. Finally, the fused hidden state is projected onto the target physical space through the output mapping matrix to generate a univariate photovoltaic active power prediction sequence for photovoltaic power generation scheduling. The output layer performs the following operations:
[0167] 4.1) Aggregate the pure feature sequences described in step S3 along the feature dimension to construct a cross-scale state matrix, as shown below:
[0168] ;
[0169] In the formula, || represents the splicing operation along the feature channel dimension;
[0170] 4.2) Input the joint state matrix into the deep projection network, and use the GELU activation function to induce deep cross-coupling of features from different frequency bands, generating a fused hidden state, as shown below:
[0171] ;
[0172] In the formula, Z is the fused hidden state matrix; W1 and b1 are the hidden layer projection matrix and bias term, respectively;
[0173] 4.3) Project the fused hidden state onto the target space using the output mapping matrix, and calculate the final predicted value of photovoltaic active power, as shown below:
[0174] ;
[0175] In the formula, is the predicted value of photovoltaic active power; W2 and b2 are the weight matrix and bias term of the output layer, respectively.
[0176] Example 3
[0177] This embodiment discloses a non-transitory computer-readable medium storing instructions that, when executed by a processor, perform the steps of the photovoltaic power generation prediction method based on the improved TimeMixer as described in Embodiment 1.
[0178] In this embodiment, the non-transitory computer-readable medium can be a disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), USB flash drive, portable hard drive, etc.
[0179] Example 4
[0180] This embodiment discloses a computing device, including a processor and a memory for storing processor-executable programs. When the processor executes the program stored in the memory, it implements the photovoltaic power generation prediction method based on the improved TimeMixer described in Embodiment 1.
[0181] The computing device described in this embodiment may be a desktop computer, laptop computer, smartphone, PDA handheld terminal, tablet computer, programmable logic controller (PLC), or other terminal device with processor function.
[0182] The above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Therefore, any changes made in accordance with the shape and principle of the present invention should be covered within the protection scope of the present invention.
Claims
1. A photovoltaic power generation prediction method based on an improved TimeMixer, characterized in that, Includes the following steps: S1. Obtain historical photovoltaic active power sequences and associated meteorological feature sequences, and perform average pooling downsampling operation along the time dimension to construct multi-scale feature sequences with different resolutions; S2. Construct a past decomposable hybrid module, input the multi-scale feature sequence into the past decomposable hybrid module, decouple the multi-scale feature sequence into trend component and seasonal component at each time scale, and perform top-down trend information transmission and bottom-up seasonal feature fusion respectively to obtain deep feature sequence. S3. After length alignment of the deep feature sequence, the feature scale is obtained. The dynamic attention mask of the deep feature sequence is calculated using linear transformation and Sigmoid activation function. The dynamic attention mask and the feature scale are subjected to Hadamard product operation to adaptively attenuate the feature channel of high-frequency meteorological noise and obtain the filtered pure feature sequence. S4. Aggregate the pure feature sequences at each scale along the feature channel dimension to construct a cross-scale joint state matrix. Input the joint state matrix into a deep nonlinear mapping network of the GELU activation function to induce deep cross-coupling of components in different frequency bands and generate a fused hidden state. Finally, project the fused hidden state onto the target physical space through the output mapping matrix to generate a single-variable photovoltaic active power prediction sequence for photovoltaic power generation scheduling.
2. The photovoltaic power generation prediction method based on the improved TimeMixer according to claim 1, characterized in that, Step S1 includes: S11. Obtain the historical photovoltaic active power sequence and associated meteorological characteristic sequence within the preset time window. , where P is the time step and C is the feature dimension; S12. The meteorological feature sequence x is downsampled along the time dimension using average pooling to generate M downsampled sequences with different resolutions, as follows: ; In the formula, x m Let AvgPool(·) be the downsampled sequence at the m-th scale, and let AvgPool(·) be the average pooling. S13, x is processed through the embedding layer m The mapping is performed to obtain the feature sequence x0m of the m-th scale at the 0th layer.
3. The photovoltaic power generation prediction method based on the improved TimeMixer according to claim 2, characterized in that, Step S2 includes: S21. Construct an L-layer stacked PDM (Prototype Decomposable Hybrid Module); S22. Using the past decomposable mixture module, the feature sequence of the m-th scale output from the previous layer is decomposed into seasonal and trend components, as shown below: ; In the formula, Decomp(·) represents the subnet; Let m be the seasonal component of the m-th sequence in the l-th layer. Let m be the trend component of the m-th sequence in the l-th layer; S23. Regarding the decomposed seasonal components A bottom-up hybridization strategy is adopted to incorporate fine-scale seasonal components. As a residual, it is added to the seasonal component at the coarse scale. In the middle, the ability to perceive fluctuation details at a coarse scale is enhanced, as shown below: ; In the formula, Mix S (·) represents a bottom-up mixing network; For m:1→M means mixing starts from sequence 1 and continues until sequence M; S24. For the decomposed trend components A top-down hybrid strategy is adopted to combine coarse-scale trend components. As residuals, they are added to the trend components at a finer scale. In the middle, local noise interference is filtered out, as shown below: ; In the formula, Mix T (·) represents a top-down hybrid network; S25. Summing the seasonal component and the trend component yields the feature sequence xl m of the l-th layer. After passing through the L-th layer of the decomposable mixing module, the final deep feature sequence xL m is output.
4. The photovoltaic power generation prediction method based on the improved TimeMixer according to claim 3, characterized in that, Step S3 includes: S31. Take the depth feature sequence xLm output in step S2 and align its temporal length to the prediction step size through a linear transformation to obtain the aligned feature scale. ; S32. For each aligned feature scale The dynamic attention mask in the deep feature sequence is calculated through independent linear transformations and the sigmoid activation function, as shown below: ; In the formula, G m Let m be the dynamic attention mask for the m-th sequence. Let m be the weight matrix of the scale-m gated network. σ is the bias term of the m-th scale gated network, and σ(·) is the Sigmoid activation function; S33. Perform a Hadamard product operation between the dynamic attention mask and the corresponding feature scale to obtain the purified feature sequence after feature filtering, as shown below: ; In the formula, This is the m-th pure feature sequence after feature filtering.
5. The photovoltaic power generation prediction method based on the improved TimeMixer according to claim 4, characterized in that, Step S4 includes: S41. Aggregate the pure feature sequences described in step S3 along the feature dimension to construct a cross-scale state matrix, as shown below: ; In the formula, || represents the splicing operation along the feature channel dimension; S42. Input the joint state matrix into the deep projection network, and use the GELU activation function to induce deep cross-coupling of features from different frequency bands to generate a fused hidden state, as shown below: ; In the formula, Z is the fused hidden state matrix; W1 and b1 are the hidden layer projection matrix and bias term, respectively; S43. Project the fused hidden state onto the target space using the output mapping matrix, and calculate the final predicted value of photovoltaic active power, as shown below: ; In the formula, is the predicted value of photovoltaic active power; W2 and b2 are the weight matrix and bias term of the output layer, respectively.
6. A photovoltaic power generation prediction system based on an improved TimeMixer, characterized in that, The photovoltaic power generation prediction method based on the improved TimeMixer as described in any one of claims 1-5 includes: The data input layer is used to perform average pooling downsampling on the historical photovoltaic active power sequence and the associated meteorological feature sequence along the time dimension to construct a multi-scale feature sequence with different resolutions. The feature interaction layer is used to decouple the multi-scale feature sequence into trend components and seasonal components at various time scales, and respectively perform top-down trend information transmission and bottom-up seasonal feature fusion to obtain deep feature sequences. The noise reduction and filtering layer is used to obtain the feature scale after length alignment of the deep feature sequence. The dynamic attention mask of the deep feature sequence is calculated by using linear transformation and Sigmoid activation function. The dynamic attention mask and the feature scale are subjected to Hadamard product operation to adaptively attenuate the feature channel of high-frequency meteorological noise and obtain the filtered clean feature sequence. The output layer aggregates the clean feature sequences at each scale along the feature channel dimension to construct a cross-scale joint state matrix. The joint state matrix is then input into a deep nonlinear mapping network with a GELU activation function, which promotes deep cross-coupling of components in different frequency bands to generate a fused hidden state. Finally, the fused hidden state is projected onto the target physical space through the output mapping matrix to generate a single-variable photovoltaic active power prediction sequence for photovoltaic power generation scheduling.
7. The photovoltaic power generation prediction system based on the improved TimeMixer according to claim 6, characterized in that, The data input layer performs the following operations: 1.1) Obtain the historical photovoltaic active power sequence and associated meteorological characteristic sequence within the preset time window. , where P is the time step and C is the feature dimension; 1.2) The meteorological feature sequence x is downsampled along the time dimension using average pooling to generate M downsampled sequences with different resolutions, as detailed below: ; In the formula, x m Let AvgPool(·) be the downsampled sequence at the m-th scale, and let AvgPool(·) be the average pooling. 1.3) Through the embedding layer on x m The mapping is performed to obtain the feature sequence x0m of the m-th scale at the 0th layer.
8. The photovoltaic power generation prediction system based on the improved TimeMixer according to claim 7, characterized in that, The feature interaction layer performs the following operations: 2.1) Construct an L-layer stacked PDM that can be decomposed from the past; 2.2) Using the past decomposable hybrid module, the feature sequence at the m-th scale output of the previous layer is decomposed into seasonal and trend components, as shown below: ; In the formula, Decomp(·) represents the subnet; Let m be the seasonal component of the m-th sequence in the l-th layer. Let m be the trend component of the m-th sequence in the l-th layer; 2.3) Regarding the decomposed seasonal components A bottom-up hybridization strategy is adopted to incorporate fine-scale seasonal components. As a residual, it is added to the seasonal component at the coarse scale. In the middle, the ability to perceive fluctuation details at a coarse scale is enhanced, as shown below: ; In the formula, Mix S (·) represents a bottom-up mixing network; For m:1→M means mixing starts from sequence 1 and continues until sequence M; 2.4) Regarding the decomposed trend components A top-down hybrid strategy is adopted to combine coarse-scale trend components. As residuals, they are added to the trend components at a finer scale. In the middle, local noise interference is filtered out, as shown below: ; In the formula, Mix T (·) represents a top-down hybrid network; 2.5) The seasonal component and the trend component are summed to obtain the feature sequence xl m of the l-th layer. After passing through the L-th layer of the past decomposable mixing module, the final deep feature sequence xL m is output.
9. The photovoltaic power generation prediction system based on the improved TimeMixer according to claim 8, characterized in that, The noise reduction and filtering layer performs the following operations: 3.1) The depth feature sequence xLm output in step S2 is linearly transformed to align the temporal length to the prediction step size, thus obtaining the aligned feature scale. ; 3.2) For each aligned feature scale The dynamic attention mask in the deep feature sequence is calculated through independent linear transformations and the sigmoid activation function, as shown below: ; In the formula, G m Let m be the dynamic attention mask for the m-th sequence. Let m be the weight matrix of the scale-m gated network. σ is the bias term of the m-th scale gated network, and σ(·) is the Sigmoid activation function; 3.3) Perform a Hadamard product operation between the dynamic attention mask and the corresponding feature scale to obtain the purified feature sequence after feature filtering, as shown below: ; In the formula, This is the m-th pure feature sequence after feature filtering.
10. The photovoltaic power generation prediction system based on the improved TimeMixer according to claim 9, characterized in that, The output layer performs the following operations: 4.1) Aggregate the pure feature sequences described in step S3 along the feature dimension to construct a cross-scale state matrix, as shown below: ; In the formula, || represents the splicing operation along the feature channel dimension; 4.2) Input the joint state matrix into the deep projection network, and use the GELU activation function to induce deep cross-coupling of features from different frequency bands, generating a fused hidden state, as shown below: ; In the formula, Z is the fused hidden state matrix; W1 and b1 are the hidden layer projection matrix and bias term, respectively; 4.3) Project the fused hidden state onto the target space using the output mapping matrix, and calculate the final predicted value of photovoltaic active power, as shown below: ; In the formula, is the predicted value of photovoltaic active power; W2 and b2 are the weight matrix and bias term of the output layer, respectively.