A photovoltaic power prediction method based on trend fusion and random term correction

By decomposing the photovoltaic power sequence into low-frequency, high-frequency, and random components, a stochastic differential equation model is constructed, which solves the problem of separating deterministic changes from random fluctuations in photovoltaic power prediction and achieves high-precision and reliable probabilistic prediction.

CN122634331APending Publication Date: 2026-08-25STATE GRID JIBEI ELECTRIC POWER COMPANY +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610552495.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-24
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing photovoltaic power prediction methods struggle to effectively distinguish between the deterministic structure of photovoltaic power changes and the sources of random fluctuations, resulting in insufficient prediction accuracy and reliability.

Method used

The STL decomposition method based on robust local weighted regression is adopted, combined with the photovoltaic scene modulation factor, to decompose the photovoltaic power sequence into low-frequency trend components, high-frequency trend components and random components. Feature extraction is performed using a time-series feature extraction network and a multilayer perceptron, and a stochastic differential equation model of photovoltaic power evolution is constructed. The model is then solved using the Milstein numerical method to achieve probabilistic prediction of photovoltaic power.

Benefits of technology

It improves the accuracy and reliability of short-term probability prediction of photovoltaic power, can more flexibly adapt to changes in photovoltaic power under different operating conditions, and enhances the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122634331A_ABST
    Figure CN122634331A_ABST
Patent Text Reader

Abstract

The present application belongs to the field of electric power, and particularly relates to a photovoltaic power prediction method based on trend fusion and random term correction; the present application is directed to the fact that photovoltaic power generation is jointly influenced by factors such as solar radiation, cloud blocking and temperature, and presents non-stationary characteristics of coexistence of certainty and random disturbance, and proposes a photovoltaic power probability prediction method of fusing time series decomposition, deep learning feature extraction, Gaussian process regression and random differential equation modeling, which can realize separate modeling of the deterministic change structure and the random fluctuation component of photovoltaic power, and improve the accuracy and reliability of the probability prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power, specifically relating to a photovoltaic power prediction method based on trend fusion and random term correction. Background Technology

[0002] In the field of photovoltaic (PV) power generation forecasting, with the continuous expansion of new energy grid connection, PV power forecasting has gradually become a research hotspot in power system dispatching and operation and new energy consumption. Compared with traditional empirical models and single deterministic forecasting methods, data-driven deep learning and probabilistic forecasting methods have advantages such as strong modeling capabilities, high prediction accuracy, and good adaptability to complex operating conditions, and can more effectively solve the volatility and uncertainty problems in the PV power generation process. The typical PV power forecasting process requires first training with a large amount of historical power data to build the corresponding forecasting model.

[0003] However, photovoltaic power is affected by a variety of factors, including solar irradiance, cloud cover, and temperature, exhibiting a non-stationary characteristic with both obvious trends and random disturbances. Traditional methods typically model the original power sequence as a whole, making it difficult to effectively distinguish between deterministic structural changes and sources of random fluctuations; while common parametric probabilistic models rely on pre-defined function forms, making them difficult to adapt to complex nonlinear and time-varying characteristics. Therefore, conventional offline training models often fail to accurately characterize the power evolution and random fluctuation features in actual operation.

[0004] Therefore, there is an urgent need to develop a photovoltaic power prediction method based on trend fusion and random term correction to address the shortcomings of existing technologies. Summary of the Invention

[0005] To address the aforementioned issues, this invention proposes a photovoltaic power prediction method based on trend fusion and random term correction. This method considers various influencing factors such as periodic changes, trend drift, and random fluctuations during the evolution of photovoltaic power. It constructs a non-parametric probabilistic prediction model for the non-stationary characteristics of photovoltaic power, achieving the effect of jointly modeling deterministic structures and random disturbances, thereby greatly improving the accuracy and reliability of short-term probabilistic prediction of photovoltaic power.

[0006] To achieve the above-mentioned technical objectives, the technical solution adopted by this invention is as follows: This invention proposes a photovoltaic power prediction method based on trend fusion and random term correction, comprising the following steps: S1: Obtain historical photovoltaic power generation data and corresponding meteorological data, preprocess the raw data, and construct a time series sample set for probability prediction; S2: The STL decomposition method based on robust local weighted regression is adopted, and combined with the photovoltaic scene modulation factor, the original photovoltaic power sequence is split into low-frequency trend component, high-frequency trend component and random component, so as to separate the deterministic change structure of photovoltaic power from the random disturbance component. S3: Input the low-frequency trend component and the high-frequency trend component into the time series feature extraction network for high-dimensional representation learning to obtain the corresponding trend representation; at the same time, input the random term into the multilayer perceptron for nonlinear mapping to obtain the random perturbation feature representation. S4: Based on the extracted features, a stochastic differential equation model of photovoltaic power evolution is constructed. The high and low frequency trend term functions are modeled as Gaussian processes defined on the latent feature space. The Gaussian process is approximated by the stochastic Fourier feature method to obtain the final trend term function. At the same time, after performing an equivalent transformation on the stochastic function, it is approximated by the stochastic Fourier feature to achieve non-parametric learning of the two functions. S5: After the trend term function and the random term function are determined, the continuous-time stochastic dynamic equation of photovoltaic power is constructed, and the stochastic differential equation is solved by the Milstein numerical method. Multiple stochastic evolution trajectories are obtained by sampling, thereby obtaining the probability distribution, prediction interval and probability prediction results of photovoltaic power at different confidence levels.

[0007] Furthermore, the photovoltaic scene modulation factor mentioned in step S2 includes the solar irradiance effective coefficient and the local fluctuation modulation factor; Constructed solar efficiency coefficient This is used to reflect the scenario characteristics of photovoltaic power sequences being close to zero at night and significantly affected by daytime irradiance variations, and is expressed as follows: (4) in, Represents the set of effective power generation times. This is used to limit the high-frequency components from participating in the renewal primarily during the effective power generation period; Constructed local wave modulation factor v t This is used to reflect short-term fluctuations caused by cloud cover and local abrupt changes, and its expression is as follows: (5) Where q represents the half-width of the local window, To prevent tiny positive numbers with a denominator of 0, x t Let represent the observed photovoltaic power at time t.

[0008] Furthermore, step S2 specifically includes the following steps: S2.1 Obtain the historical photovoltaic power sequence. Using the STL decomposition method based on robust local weighted regression, the original power sequence is split into low-frequency trend components, high-frequency trend components, and random components, as shown in the following equation (2): (2) in, x t This represents the observed photovoltaic power at time t. The low-frequency trend term refers to the component in the photovoltaic power sequence that characterizes the overall slow-varying evolution pattern. The high-frequency trend term refers to the component in the photovoltaic power series that characterizes short-term periodic changes and rapid fluctuations. Indicates a random item; S22. Initialize the outer loop iteration count k, the inner loop iteration count j, and the maximum outer loop iteration count K. max and initial robust weights; after initialization: (3) in, As the initial robust weights, This represents the initial low-frequency trend term; S23. For each outer loop, perform an inner loop: first, perform low-frequency preprocessing, then perform local weighted regression smoothing based on the local weights after photovoltaic scene modulation, and obtain the low-frequency trend estimate through low-pass filtering; then, perform low-frequency processing on the high-frequency components and extract the high-frequency components, and then perform local weighted regression smoothing on the sequence after removing the high frequencies to obtain the updated low-frequency components, and then obtain the random components. S24: Determine if the inner loop converges. If it converges, update the robust weights using the normalized reciprocal form based on the random components. S25: Determine if the outer loop has converged. If it has not converged, return to step S23. If it has converged, output the final low-frequency component sequence, high-frequency component sequence, and random component sequence.

[0009] Furthermore, step S2.3 is as follows: For each outer loop k = 1,2,…,K max Execute the inner loop; first, perform low-frequency preprocessing, as shown in equation (6): (6) in, This represents the low-frequency input sequence in the k-th outer loop and the j-th inner loop. Secondly, local weighted regression smoothing is performed on the low-frequency sequence, and the local weights after modulation of the photovoltaic scenario are defined as follows: (7) in, Let λ be the robust weight corresponding to the t-th sampling time in the k-th outer loop. ν Let λ be the local wave modulation coefficient. ν [0.1, 2], used to control local fluctuation modulation factors ν t The impact on the degree of weight decay; Using locally weighted regression operators After smoothing, we get: (8) Where, Lω( () is a locally weighted regression operator, which uses a locally linear weighted regression operator; Next, the smoothed result is low-pass filtered to obtain the low-frequency trend estimate: (9) in, F P ( ) indicates that the period length is P The low-pass filter operator; Then, high-frequency components are de-lowered, as shown in equation (10): (10) in, Used to suppress ineffective power generation during nighttime periods, making high-frequency components more consistent with the intraday power generation patterns of photovoltaics; Then, a high-frequency smoothing operator based on robust local weighted regression is used. (·)right High-frequency extraction yields: (11) in, This represents the updated high-frequency components; The sequence after removing high-frequency components is then subjected to local weighted regression smoothing again to obtain the low-frequency trend components: (12) in, This indicates the updated low-frequency component; This yields the random component: (13).

[0010] Furthermore, steps S2.4 to S2.5 are as follows: To determine whether the inner loop has converged, if the following equation (14) is satisfied, the inner loop is determined to have converged, and the inner loop under the current outer loop is terminated; (14) in, The inner loop convergence threshold is T, where T represents the total sampling length. After each inner loop, the robust weights are updated using the normalized reciprocal form based on the random components, as shown in the following expression (15): (15) in, This represents the median deviation of the random residual sequence under the k-th outer loop. To prevent tiny positive numbers with a denominator of zero; Finally, if the outer loop convergence condition is met, as shown in equation (16), then the outer loop is determined to be converged; otherwise, return to step S23 to update again. (16) in, This is the outer loop convergence threshold; Repeat the inner and outer loops until the convergence condition is met, and output the low-frequency component sequence. High-frequency component sequences and random component sequences .

[0011] Furthermore, the temporal feature extraction network in step S3 uses an iTransformer encoder to extract the long-term slow evolution information of the low-frequency trend component and the short-term periodic repetition pattern information of the high-frequency trend component, respectively.

[0012] Furthermore, step S4 specifically includes the following steps: To simultaneously characterize the deterministic evolution and stochastic fluctuations of photovoltaic power, the continuous-time dynamic process of photovoltaic power is described as an Itō-type stochastic differential equation: (17) Among them, X t This represents the photovoltaic power state variable at time t. f tr ( )and f se ( ) are the low-frequency trend term function and the high-frequency trend term function, respectively, g( ) is a random term function, W t For standard Wiener process; The low-frequency and high-frequency trend term sub-functions are modeled as Gaussian processes in different latent feature spaces, and the Gaussian processes are approximated using the stochastic Fourier feature method. The stochastic feature mapping is defined as follows: (18) Where v is the latent feature vector, M is the dimension of the random feature, and ω M Let b be the Mth random frequency vector. M Let T be the Mth random phase offset, and let T denote the transpose.

[0013] By approximating the low-frequency and high-frequency trend term sub-functions using stochastic Fourier features respectively, we have: (19) (20) in, and These are the low-frequency and high-frequency parameter vectors to be learned, respectively. ( )and ( These are the stochastic Fourier feature maps corresponding to low-frequency and high-frequency trends, respectively. Combining the two into the final trend term function, the final trend term expression is: (twenty one) Apply an equivalent transformation to the random function: (twenty two) The random term function is then approximated as: (twenty three) in, This is the vector of parameters to be learned.

[0014] Furthermore, the state update formula of the Milstein numerical method described in step S5 includes a local correction term for the random term function, used to improve the approximation accuracy of random fluctuations; the specific state update formula is as follows: (25) Where, f(X) n Let X be the trend term function at time n, representing the state X. n The function value under the following conditions, g(X) n Let X be the state of a random term function at time n. n The function value below; Represents the random term function g( The derivative with respect to the state variable is used to construct the local correction term in the Milstein method, Δ. Wn The Wiener increment is expressed as follows: (twenty four) in, This represents the standard Wiener process at time n. The value of the Wiener process at time n+1 is given, where Δt is the discrete time step. It is a Gaussian distribution with a mean of 0 and a variance of Δt.

[0015] Furthermore, the probability prediction results in step S5 are obtained by performing Ns independent samplings on the discretized stochastic differential equation to obtain Ns future power evolution trajectories; constructing an empirical probability distribution based on all sampled trajectories, extracting the upper and lower quantiles corresponding to different confidence levels through the quantile operator, and calculating the prediction interval.

[0016] Furthermore, the discretized stochastic differential equation is sampled Ns times independently to obtain Ns future power evolution trajectories; an empirical probability distribution is constructed based on all sampled trajectories, and the upper and lower quantiles corresponding to different confidence levels are extracted using the quantile operator to calculate the prediction interval; specifically as follows: During the prediction phase, multiple random trajectory samples are performed on equation (25); let the prediction result of the m-th sampled trajectory at a future time τ be: (26) in, N s This represents the total number of sampled trajectories. Construct an empirical probability distribution for future times based on all sampled trajectories, and extract the given quantiles: (27) Among them, Quantile α ( ) represents the quantile operator for finding the α quantile value of a sample set; When the confidence level is β, the corresponding prediction interval is represented as follows: (28).

[0017] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art: 1. This invention decomposes the photovoltaic power sequence into low-frequency trend components, high-frequency trend components, and random components, which are then used to construct trend terms and random terms, respectively. This enables hierarchical modeling of the deterministic structure and random disturbances of photovoltaic power, thereby improving the model's ability to express non-stationary sequences.

[0018] 2. This invention constructs corresponding trend term sub-functions based on low-frequency and high-frequency trend characteristics, and then combines them to form the final trend term. This allows the deterministic part to describe both the long-term smooth changes in photovoltaic power and the periodic repetitive patterns, thereby improving the accuracy of characterizing the evolution law of photovoltaic power.

[0019] 3. This invention generates probabilistic prediction results by performing non-parametric learning on the trend term sub-function and the random term, and combining stochastic Fourier features and numerical solution methods. It does not require pre-defining a fixed function form, and can more flexibly adapt to changes in photovoltaic power under different operating conditions, thereby improving the accuracy, reliability and generalization ability of the probabilistic prediction results. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments will be briefly introduced below.

[0021] Figure 1 This is a simplified flowchart of the present invention; Figure 2 To stabilize the daily forecast results; Figure 3 This is the forecast result for the day of fluctuation. Detailed Implementation

[0022] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are for illustrative purposes only and do not limit the scope of the invention. Similarly, the following embodiments are only some, not all, embodiments of the present invention, and all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] See attached document Figure 1 As shown, this embodiment provides a photovoltaic power prediction method based on trend fusion and random term correction, including the following steps: S1: Obtain historical photovoltaic power generation data and corresponding meteorological data, preprocess the raw data, and construct a time series sample set for probability prediction.

[0024] S2: The STL decomposition method based on robust local weighted regression is adopted, and combined with the photovoltaic scene modulation factor, the original photovoltaic power sequence is split into low-frequency trend components, high-frequency trend components and random components, so as to separate the deterministic change structure of photovoltaic power from the random disturbance components.

[0025] Among them, the modulation factor for photovoltaic scenarios includes the effective solar radiation coefficient and the local fluctuation modulation factor; Considering the scenario characteristics of photovoltaic power sequences, which are close to zero at night and significantly affected by daytime irradiance variations, the constructed solar irradiance coefficient... This is used to reflect the scenario characteristics of photovoltaic power sequences being close to zero at night and significantly affected by daytime irradiance variations, and is expressed as follows: (4) in, Represents the set of effective power generation times. This is used to limit the high-frequency components from participating in the renewal primarily during the effective power generation period; To reflect short-term fluctuations caused by cloud cover and local abrupt changes, a local fluctuation modulation factor was constructed. v t This is used to reflect short-term fluctuations caused by cloud cover and local abrupt changes, and its expression is as follows: (5) Where q represents the half-width of the local window, To prevent tiny positive numbers with a denominator of 0; v t It is used to measure the intensity of abrupt changes relative to the local average fluctuation level at the current moment.

[0026] Specifically, the historical photovoltaic power series is decomposed to extract the trend term and the random term. First, the historical photovoltaic power series is obtained, denoted as: (1) in, x t Let T represent the photovoltaic power observation value at time t, and T represent the total sampling length.

[0027] The STL decomposition method based on robust local weighted regression is used to split the original power sequence into low-frequency trend components, high-frequency trend components, and random components, as shown in equation (2) below: (2) in, The low-frequency trend term refers to the component in the photovoltaic power sequence that characterizes the overall slow-varying evolution pattern. The high-frequency trend term refers to the component in the photovoltaic power series that characterizes short-term periodic changes and rapid fluctuations. This indicates a random item.

[0028] Initialize the outer loop iteration count k, the inner loop iteration count j, and the maximum outer loop iteration count K. max and initial robust weights; after initialization: (3) in, As the initial robust weights, This represents the initial low-frequency trend term; For each outer loop iteration, the inner loop is executed as follows: First, low-frequency preprocessing is performed, then local weighted regression smoothing is performed based on the local weights modulated by the photovoltaic scenario, and low-frequency trend estimates are obtained after low-pass filtering; then, high-frequency components are processed to remove low frequencies and high-frequency components are extracted, and then local weighted regression smoothing is performed on the sequence after removing high frequencies to obtain updated low-frequency components, and finally, random components are obtained; the details are as follows: For each outer loop k = 1,2,…,K max Execute the inner loop; first, perform low-frequency preprocessing, as shown in equation (6): (6) in, This represents the low-frequency input sequence in the k-th outer loop and the j-th inner loop. Secondly, local weighted regression smoothing is performed on the low-frequency sequence, and the local weights after modulation of the photovoltaic scenario are defined as follows: (7) in, Let λ be the robust weight corresponding to the t-th sampling time in the k-th outer loop. ν Let λ be the local wave modulation coefficient. ν [0.1, 2], used to control local fluctuation modulation factors ν t The impact on the degree of weight decay.

[0029] Using locally weighted regression operators After smoothing, we get: (8) Wherein, Lω( The operator is a locally weighted regression operator, which employs a locally linear weighted regression operator. Its output at the t-th sampling time is obtained by the following weighted least squares problem:

[0030]

[0031] Among them, z i Let be the value of the sequence to be smoothed at time i. The set of local neighborhood samples centered at t, where ωi is the modulation weight of sample point i, K( ) is the local kernel weight function, and h is the smoothing bandwidth. The fitted value obtained from the regression at time t is... Let be the local slope at time t.

[0032] Next, the smoothed result is low-pass filtered to obtain the low-frequency trend estimate: (9) in, F P ( ) indicates that the period length is P The low-pass filter operator, P=144.

[0033] Then, high-frequency components are de-lowered, as shown in equation (10): (10) in, Used to suppress ineffective power generation during nighttime periods, making high-frequency components more consistent with the intraday power generation patterns of photovoltaics; Then use a high-frequency smoothing operator (·)right High-frequency extraction yields: (11) in, This represents the updated high-frequency components; The sequence after removing high-frequency components is then subjected to local weighted regression smoothing again to obtain the low-frequency trend components: (12) in, This indicates the updated low-frequency component; This yields the random component: (13) At this point, determine whether the inner loop has converged. If it has converged, update the robust weights using the normalized reciprocal form based on the random components; specifically as follows: To determine whether the inner loop has converged, if the following equation (14) is satisfied, the inner loop is determined to have converged, and the inner loop under the current outer loop is terminated; (14) in, The inner loop convergence threshold is T, where T represents the total sampling length. After each inner loop, the robust weights are updated based on the random components. To avoid numerical amplification when the residual is close to zero due to the traditional direct reciprocal form, the weights are updated using the normalized reciprocal form, as shown in equation (15): (15) in, This represents the median deviation of the random residual sequence under the k-th outer loop. To prevent tiny positive numbers with a denominator of zero.

[0034] Finally, determine if the outer loop converges. If it does not converge, return to the above steps of executing the inner loop for each outer loop iteration. If it converges, output the final low-frequency component sequence, high-frequency component sequence, and random component sequence, as follows: If the outer loop convergence condition is met, as shown in equation (16), then the outer loop is determined to be converged; otherwise, return to perform the inner loop steps for each outer loop and update again. (16) in, This is the outer loop convergence threshold; Repeat the inner and outer loops until the convergence condition is met, and output the low-frequency component sequence. High-frequency component sequences and random component sequences .

[0035] S3: The low-frequency and high-frequency trend components are input into a time-series feature extraction network for high-dimensional representation learning to obtain the corresponding trend representations. The time-series feature extraction network preferably uses an iTransformer encoder to extract long-term slow-varying evolution information and periodic repetitive pattern information from the photovoltaic power sequence. Simultaneously, the random term is input into a multilayer perceptron for nonlinear mapping to obtain a random perturbation feature representation. Through this step, features for constructing the low-frequency trend term sub-function, features for constructing the high-frequency trend term sub-function, and random features for constructing the random term are obtained.

[0036] S4: Based on the extracted features, a stochastic differential equation model of photovoltaic power evolution is constructed. The high- and low-frequency trend term functions are modeled as Gaussian processes defined on the latent feature space, and the Gaussian processes are approximated using the stochastic Fourier feature method to obtain the final trend term function. Simultaneously, after performing an equivalent transformation on the stochastic function, it is approximated using stochastic Fourier features to achieve non-parametric learning of the two functions. Specifically, the following steps are included: To simultaneously characterize the deterministic evolution and stochastic fluctuations of photovoltaic power, the continuous-time dynamic process of photovoltaic power is described as an Itō-type stochastic differential equation: (17) Among them, X t This represents the photovoltaic power state variable at time t. f tr ( )and f se ( ) are the low-frequency trend term function and the high-frequency trend term function, respectively, g( ) is a random term function, W t This is the standard Wiener process.

[0037] The low-frequency and high-frequency trend term sub-functions are modeled as Gaussian processes in different latent feature spaces. To improve computational efficiency, the stochastic Fourier feature method is used to approximate the Gaussian processes, and the stochastic feature mapping is defined as: (18) Where v is the latent feature vector, M is the dimension of the random feature, and ω M Let b be the Mth random frequency vector. M This is the Mth random phase offset.

[0038] By approximating the low-frequency and high-frequency trend term sub-functions using stochastic Fourier features respectively, we have: (19) (20) in, and These are the low-frequency and high-frequency parameter vectors to be learned, respectively. ( )and ( These are the stochastic Fourier feature maps corresponding to low-frequency and high-frequency trends, respectively. Combining the two into the final trend term function, the final trend term expression is: (twenty one) Apply an equivalent transformation to the random function: (twenty two) The random term function is then approximated as: (twenty three) in, This is the vector of parameters to be learned.

[0039] The purpose of this step is to adaptively learn the deterministic change patterns and random fluctuation intensity of the system in a non-parametric manner, thereby balancing model flexibility and interpretability.

[0040] S5: After determining the trend term function and the random term function, a continuous-time stochastic dynamic equation for photovoltaic power is constructed, and the Milstein numerical method is used to solve the stochastic differential equation. Multiple stochastic evolution trajectories are obtained through sampling, thereby obtaining the probability distribution, prediction interval, and probability prediction results of photovoltaic power at different confidence levels. The specific steps include the following: After obtaining the trend function and the stochastic function, the established stochastic differential equation needs to be solved discretely. Let the discrete time step be Δ. t Wiener increments satisfy: (twenty four) in, This represents the standard Wiener process at time n. The value of the Wiener process at time n+1 is given, where Δt is the discrete time step. It is a Gaussian distribution with a mean of 0 and a variance of Δt.

[0041] State updates are performed using the Milstein method: (25) Where, f(X) n Let X be the trend term function at time n, representing the state X. n The function value under the following conditions, g(X) n Let X be the state of a random term function at time n. n The function value below; Represents the random term function g( The derivative with respect to the state variable is used to construct the local correction term in the Milstein method, Δ. Wn This represents the Wiener increment. Compared to simple discrete methods, the Milstein method improves the approximation accuracy of the stochastic term function while maintaining manageable computational complexity, allowing the learned trend term function and trend term function to be more stably transformed into stochastic trajectories that can be used for probabilistic prediction.

[0042] In this embodiment, the probability prediction results are obtained as follows: Ns independent samples are performed on the discretized stochastic differential equation to obtain Ns future power evolution trajectories; an empirical probability distribution is constructed based on all sampled trajectories, and the upper and lower quantiles corresponding to different confidence levels are extracted using the quantile operator to calculate the prediction interval, as detailed below: During the prediction phase, multiple random trajectory samples are performed on equation (25); let the prediction result of the m-th sampled trajectory at a future time τ be: (26) in, N s This represents the total number of sampled trajectories.

[0043] Construct an empirical probability distribution for future times based on all sampled trajectories, and extract the given quantiles: (27) Among them, Quantile α ( ) represents the quantile operator for finding the α quantile value of a sample set.

[0044] When the confidence level is β, the corresponding prediction interval is represented as follows: (28) This step allows us to obtain the probability distribution, prediction range, and probability prediction results at different confidence levels of photovoltaic power at future moments, thus expanding from single-point prediction to probability prediction.

[0045] Furthermore, the functional units in the embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0046] The following specific examples demonstrate the predictive performance of the present invention: The dataset used is from a photovoltaic power plant in Alice Springs, Australia, with an installed capacity of 26.5 kW. Historical photovoltaic power was recorded through a data acquisition system behind the panels, and meteorological data was collected by the meteorological monitoring station within the power plant. Photovoltaic data from 2015-2016 were selected as the original dataset, with a time resolution of 5 minutes, and the training and test sets were divided in a 7:3 ratio. Historical photovoltaic power was normalized according to the power plant's installed capacity, and the corresponding meteorological data was standardized based on the mean and standard deviation of all samples. The iTransformer model has an input dimension of 9 for both the encoding and decoding layers, 10 attention heads, and an output dimension of 1, with an input sequence length of 144. The MLP uses a three-layer fully connected layer structure with 64 hidden layers and ReLU activation. The fusion attention layer has an embedding dimension of 512 and 4 attention heads. The RFF-GP module has 256 random Fourier features, a kernel length scale of 1, and an observation noise term of 1e-3.

[0047] Two representative prediction dates, January 1st and January 4th, 2016, were selected for case studies, representing stable output days and highly volatile output days, respectively. Stable days exhibited gradual power changes, while volatile days displayed significant intermittency and randomness. By comparing the prediction performance under these two scenarios, the adaptability and robustness of this method in uncertainty modeling can be effectively evaluated. The method of this invention is compared with the standard Ornstein method. A comparative analysis was conducted on the Uhlenbeck process model (labeled OU), the extended Ornstein-Uhlenbeck process model (labeled Extended-OU), and the Gaussian mixture model based on the Beta distribution (labeled Beta-GMM). The prediction results at 90% and 70% confidence levels for stable and fluctuating days are compared in Tables 1 and 2 below.

[0048] Table 1. Comparison of prediction results at 90% and 70% confidence levels on stable days.

[0049] Table 2 Comparison of prediction results at 90% and 70% confidence levels on the day of fluctuation

[0050] From Tables 1-2 and Appendix Figures 2-3 As can be seen, the method of this invention can effectively compress the prediction interval while maintaining good reliability under stable output conditions. At the same time, it better balances coverage and interval accuracy in environments with drastic fluctuations, and continues to maintain good prediction accuracy and uncertainty modeling capabilities.

[0051] The above description is only a part of the embodiments of the present invention and does not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made based on the content of the present invention specification and drawings, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A photovoltaic power prediction method based on trend fusion and random term correction, characterized in that, Includes the following steps: S1: Obtain historical photovoltaic power generation data and corresponding meteorological data, preprocess the raw data, and construct a time series sample set for probability prediction; S2: The STL decomposition method based on robust local weighted regression is adopted, and combined with the photovoltaic scene modulation factor, the original photovoltaic power sequence is split into low-frequency trend component, high-frequency trend component and random component, so as to separate the deterministic change structure of photovoltaic power from the random disturbance component. S3: Input the low-frequency trend component and the high-frequency trend component into the time series feature extraction network for high-dimensional representation learning to obtain the corresponding trend representation; at the same time, input the random term into the multilayer perceptron for nonlinear mapping to obtain the random perturbation feature representation. S4: Based on the extracted features, a stochastic differential equation model of photovoltaic power evolution is constructed. The high and low frequency trend term functions are modeled as Gaussian processes defined on the latent feature space. The Gaussian process is approximated by the stochastic Fourier feature method to obtain the final trend term function. At the same time, after performing an equivalent transformation on the stochastic function, it is approximated by the stochastic Fourier feature to achieve non-parametric learning of the two functions. S5: After the trend term function and the random term function are determined, the continuous-time stochastic dynamic equation of photovoltaic power is constructed, and the stochastic differential equation is solved by the Milstein numerical method. Multiple stochastic evolution trajectories are obtained by sampling, thereby obtaining the probability distribution, prediction interval and probability prediction results of photovoltaic power at different confidence levels.

2. The photovoltaic power prediction method based on trend fusion and random term correction according to claim 1, characterized in that, The photovoltaic scene modulation factor mentioned in step S2 includes the solar irradiance effective coefficient and the local fluctuation modulation factor; Constructed solar efficiency coefficient This is used to reflect the scenario characteristics of photovoltaic power sequences being close to zero at night and significantly affected by daytime irradiance variations, and is expressed as follows: (4) in, Represents the set of effective power generation times. This is used to limit the high-frequency components from participating in the renewal primarily during the effective power generation period; Constructed local wave modulation factor v t This is used to reflect short-term fluctuations caused by cloud cover and local abrupt changes, and its expression is as follows: (5) Where q represents the half-width of the local window, To prevent tiny positive numbers with a denominator of 0, x t Let represent the observed photovoltaic power at time t.

3. The photovoltaic power prediction method based on trend fusion and random term correction according to claim 2, characterized in that, Step S2 specifically includes the following steps: S2.1 Obtain the historical photovoltaic power sequence. Using the STL decomposition method based on robust local weighted regression, the original power sequence is split into low-frequency trend components, high-frequency trend components, and random components, as shown in the following equation (2): (2) in, The low-frequency trend term refers to the component in the photovoltaic power sequence that characterizes the overall slow-varying evolution pattern. The high-frequency trend term refers to the component in the photovoltaic power series that characterizes short-term periodic changes and rapid fluctuations. Indicates a random item; S22. Initialize the outer loop iteration count k, the inner loop iteration count j, and the maximum outer loop iteration count K. max and initial robust weights; after initialization: (3) in, As the initial robust weights, This represents the initial low-frequency trend term; S23. For each outer loop, perform an inner loop: first, perform low-frequency preprocessing, then perform local weighted regression smoothing based on the local weights after photovoltaic scene modulation, and obtain the low-frequency trend estimate through low-pass filtering; then, perform low-frequency processing on the high-frequency components and extract the high-frequency components, and then perform local weighted regression smoothing on the sequence after removing the high frequencies to obtain the updated low-frequency components, and then obtain the random components. S24: Determine if the inner loop converges. If it converges, update the robust weights using the normalized reciprocal form based on the random components. S25: Determine if the outer loop has converged. If it has not converged, return to step S23. If it has converged, output the final low-frequency component sequence, high-frequency component sequence, and random component sequence.

4. The photovoltaic power prediction method based on trend fusion and random term correction according to claim 3, characterized in that, Step S2.3 is as follows: For each outer loop k = 1,2,…,K max Execute the inner loop; first, perform low-frequency preprocessing, as shown in equation (6): (6) in, This represents the low-frequency input sequence in the k-th outer loop and the j-th inner loop. Secondly, local weighted regression smoothing is performed on the low-frequency sequence, and the local weights after modulation of the photovoltaic scenario are defined as follows: (7) in, Let λ be the robust weight corresponding to the t-th sampling time in the k-th outer loop. ν Let λ be the local wave modulation coefficient. ν [0.1, 2], used to control local fluctuation modulation factors ν t The impact on the degree of weight decay; Using locally weighted regression operators After smoothing, we get: (8) Among them, L ω ( () is a locally weighted regression operator, which uses a locally linear weighted regression operator; Next, the smoothed result is low-pass filtered to obtain the low-frequency trend estimate: (9) in, F P ( ) indicates that the period length is P The low-pass filter operator; Then, high-frequency components are de-lowered, as shown in equation (10): (10) in, Used to suppress ineffective power generation during nighttime periods, making high-frequency components more consistent with the intraday power generation patterns of photovoltaics; Then, a high-frequency smoothing operator based on robust local weighted regression is used. (·)right High-frequency extraction yields: (11) in, This represents the updated high-frequency components; The sequence after removing high-frequency components is then subjected to local weighted regression smoothing again to obtain the low-frequency trend components: (12) in, This indicates the updated low-frequency component; This yields the random component: (13)。 5. The photovoltaic power prediction method based on trend fusion and random term correction according to claim 3, characterized in that, Steps S2.4 to S2.5 are as follows: To determine whether the inner loop has converged, if the following equation (14) is satisfied, the inner loop is determined to have converged, and the inner loop under the current outer loop is terminated; (14) in, The inner loop convergence threshold is T, where T represents the total sampling length. After each inner loop, the robust weights are updated using the normalized reciprocal form based on the random components, as shown in the following expression (15): (15) in, This represents the median deviation of the random residual sequence under the k-th outer loop. To prevent tiny positive numbers with a denominator of zero; Finally, if the outer loop convergence condition is met, as shown in equation (16), then the outer loop is determined to be converged; otherwise, return to step S23 to update again. (16) in, This is the outer loop convergence threshold; Repeat the inner and outer loops until the convergence condition is met, and output the low-frequency component sequence. High-frequency component sequences and random component sequences .

6. The photovoltaic power prediction method based on trend fusion and random term correction according to claim 1, characterized in that, The temporal feature extraction network described in step S3 uses an iTransformer encoder to extract the long-term slow evolution information of the low-frequency trend component and the short-term periodic repetition pattern information of the high-frequency trend component.

7. The photovoltaic power prediction method based on trend fusion and random term correction according to claim 1, characterized in that, Step S4 specifically includes the following steps: To simultaneously characterize the deterministic evolution and stochastic fluctuations of photovoltaic power, the continuous-time dynamic process of photovoltaic power is described as an Itō-type stochastic differential equation: (17) Among them, X t This represents the photovoltaic power state variable at time t. f tr ( )and f se ( ) are the low-frequency trend term function and the high-frequency trend term function, respectively, g( ) is a random term function, W t For standard Wiener processes; The low-frequency and high-frequency trend term sub-functions are modeled as Gaussian processes in different latent feature spaces, and the Gaussian processes are approximated using the stochastic Fourier feature method. The stochastic feature mapping is defined as follows: (18) Where v is the latent feature vector, M is the dimension of the random feature, and ω M Let b be the Mth random frequency vector. M Let T be the Mth random phase offset, and let T denote the transpose. By approximating the low-frequency and high-frequency trend term sub-functions using stochastic Fourier features respectively, we have: (19) (20) in, and These are the low-frequency and high-frequency parameter vectors to be learned, respectively. ( )and ( These are the stochastic Fourier feature maps corresponding to low-frequency and high-frequency trends, respectively. Combining the two into the final trend term function, the final trend term expression is: (21) Apply an equivalent transformation to the random function: (22) The random term function is then approximated as: (23) in, This is the vector of parameters to be learned.

8. The photovoltaic power prediction method based on trend fusion and random term correction according to claim 1, characterized in that, The state update formula of the Milstein numerical method described in step S5 includes a local correction term for the stochastic term function to improve the approximation accuracy of stochastic fluctuations; the specific state update formula is as follows: (25) Where, f(X) n Let X be the trend term function at time n, representing the state X. n The function value under the following condition, g(X) n Let X be the state of a random term function at time n. n The function value below; The random term function g( The derivative with respect to the state variable is used to construct the local correction term in the Milstein method, Δ. Wn The Wiener increment is expressed as follows: (24) in, This represents the standard Wiener process at time n. The value of the Wiener process at time n+1 is given, where Δt is the discrete time step. It is a Gaussian distribution with a mean of 0 and a variance of Δt.

9. The photovoltaic power prediction method based on trend fusion and random term correction according to claim 8, characterized in that, The probability prediction results in step S5 are obtained by performing Ns independent samplings on the discretized stochastic differential equation to obtain Ns future power evolution trajectories; constructing an empirical probability distribution based on all sampled trajectories; extracting the upper and lower quantiles corresponding to different confidence levels using the quantile operator; and calculating the prediction interval.

10. The photovoltaic power prediction method based on trend fusion and random term correction according to claim 9, characterized in that, The discretized stochastic differential equation is sampled Ns times independently to obtain Ns future power evolution trajectories. An empirical probability distribution is constructed based on all sampled trajectories, and the upper and lower quantiles corresponding to different confidence levels are extracted using the quantile operator to calculate the prediction interval. The details are as follows: During the prediction phase, multiple random trajectory samples are performed on equation (25); let the prediction result of the m-th sampled trajectory at a future time τ be: (26) in, N s This represents the total number of sampled trajectories. Construct an empirical probability distribution for future times based on all sampled trajectories, and extract the given quantiles: (27) Among them, Quantile α ( ) represents the quantile operator for finding the α quantile value of a sample set; When the confidence level is β, the corresponding prediction interval is represented as follows: (28)。