Intra-region photovoltaic power prediction method and system based on multivariable and spatio-temporal information

Through the method of feature mode decomposition and maximum information coefficient screening, photovoltaic power data is combined with meteorological factors to establish an ETSformer spatiotemporal model, and the parameters are optimized through the improved PID search algorithm, the problem of insufficient accuracy and flexibility of the existing photovoltaic power prediction methods is solved, achieving more efficient and accurate photovoltaic power prediction.

CN119518708APending Publication Date: 2025-02-25HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411528996.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing photovoltaic power prediction methods have problems such as environmental factors sensitivity, insufficient model generalization capabilities, inaccurate data and complex processes, resulting in insufficient prediction accuracy and flexibility.

Method used

The intra-regional photovoltaic power prediction method based on multivariable and spatiotemporal information is adopted, and the historical photovoltaic power data is decomposed into multiple modes through feature mode decomposition (FMD), and the meteorological factors are screened using the maximum information coefficient (MIC), an ETSformer spatiotemporal model is established, and the model parameters are optimized through the improved PID search algorithm (IPSA).

Benefits of technology

It improves the accuracy and efficiency of photovoltaic power prediction, reduces noise interference, reduces computing resource consumption, and enhances the practicality and adaptability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119518708A_ABST
    Figure CN119518708A_ABST
Patent Text Reader

Abstract

The invention discloses an intra-region photovoltaic power prediction method and system based on multivariable and spatio-temporal information, and the method comprises the following steps: collecting historical photovoltaic power data and meteorological data of a plurality of photovoltaic power stations, and carrying out the preprocessing of the data: decomposing the historical photovoltaic power data into a plurality of modes through feature mode decomposition; performing feature selection on the meteorological factor data through the maximum information coefficient, forming a multivariable input matrix with the plurality of modals, and dividing the multivariable input matrix into a training set and a test set; establishing an ETSform space-time model, and training the model by using the training set; the method comprises the following steps: improving a PID search algorithm by using a Halton sequence and a prying foraging strategy to obtain an improved PID search algorithm (IPSA); hyper-parameters such as the learning rate and the batch size of the ETSform model are optimized through IPSA; and predicting the photovoltaic power through the test set. According to the method, meteorological factors and time-space information are considered, the method is suitable for photovoltaic power stations of different areas and different scales, and high-precision prediction of the photovoltaic power is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of new energy prediction, and relates to a method and system for predicting photovoltaic power in a region based on multivariate and spatiotemporal information. Background Art

[0002] As a renewable energy source, solar energy has obvious advantages in terms of resource abundance, environmental friendliness and flexibility, which helps solve energy problems, promote social progress and environmental protection. The prediction of photovoltaic power is of great significance in ensuring the stable operation of the power system, improving energy efficiency, reducing operating costs and promoting the widespread application of renewable energy. However, photovoltaic power generation is also intermittent, volatile and uncertain, which may affect the stability of the power grid.

[0003] At present, photovoltaic power prediction methods are divided into direct prediction methods and indirect prediction methods. The direct prediction method directly uses relevant meteorological parameters and historical power generation data as input, and uses mathematical and statistical methods to predict photovoltaic power generation. The direct prediction method has high prediction accuracy, strong adaptability and good real-time performance, but it also faces problems such as sensitivity to environmental factors and model generalization ability. The indirect prediction method needs to predict solar radiation and environmental parameters first, then establish a physical model of the photovoltaic system and calculate the photoelectric conversion efficiency, and then adjust the model parameters according to the actual operation data. Finally, the predicted solar radiation and other environmental parameters are input into the photovoltaic system model to calculate and obtain the predicted photovoltaic output power. The indirect prediction method can analyze and understand meteorological conditions more deeply, quickly adjust the prediction model according to real-time meteorological data, and improve the flexibility of prediction. In photovoltaic power generation systems that are sensitive to changes in meteorological conditions, it can provide strong support for grid operation and energy management, but it also faces problems such as inaccurate data and relatively complex processes.

[0004] The models for photovoltaic power prediction include physical models, statistical models, and artificial intelligence models. The physical model is based on physical mechanisms and can provide an in-depth understanding of the photovoltaic power generation process, but as the system operating parameters change over time, the prediction accuracy may decrease. The statistical model predicts future photovoltaic power by analyzing historical data. It is easy to implement, but it requires a large amount of historical data support and has poor adaptability to changes in weather conditions. Artificial intelligence models are divided into machine learning models and deep learning models. Machine learning models automatically learn rules from data through training algorithms and then use these rules to make predictions. Common machine learning algorithms include regression analysis, support vector machines, decision trees, random forests, etc. These models usually require manual selection and extraction of appropriate features to improve prediction accuracy, and are usually suitable for situations with small data volumes and clear features. The deep learning model is a more complex machine learning model. The deep learning model is based on a multi-layer neural network and is good at automatically extracting features and processing high-dimensional big data. In photovoltaic power prediction, it can comprehensively consider multiple influencing factors, capture the complex relationship between variables, and has strong adaptability and good robustness. Summary of the invention

[0005] Purpose of the invention: In view of the problems existing in the prior art, the present invention provides a method and system for regional photovoltaic power prediction based on multivariate and spatiotemporal information, which can effectively improve the prediction accuracy of photovoltaic power.

[0006] Technical solution: A method for predicting photovoltaic power in a region based on multivariate and spatiotemporal information of the present invention comprises the following steps:

[0007] (1) Collect historical photovoltaic power data and meteorological data from multiple photovoltaic power stations and pre-process the data;

[0008] (2) Decomposing historical PV power data into multiple modes using eigenmode decomposition (FMD);

[0009] (3) Using the maximum information coefficient (MIC) to screen out meteorological factors with a high correlation with photovoltaic power, and combining them with multiple modes in step (2) to form a multivariate input matrix, which is divided into a training set and a test set;

[0010] (4) Establish the ETSformer spatiotemporal model and train the ETSformer model using the training set;

[0011] (5) The PID search algorithm (PSA) was improved by using the Halton sequence and the somersault foraging strategy to obtain the improved PID search algorithm (IPSA); the learning rate, batch size and other hyperparameters of the ETSformer model were optimized by IPSA;

[0012] (6) Predict photovoltaic power using the test set.

[0013] Furthermore, the data preprocessing in step (1) includes clearing redundant data, filling missing data, correcting abnormal data and normalizing data.

[0014] Furthermore, the meteorological data described in step (1) includes solar radiation intensity, temperature, humidity, air pressure, wind speed, and wind direction.

[0015] Furthermore, in step (2), the historical photovoltaic power is decomposed into multiple modes using FMD, and the implementation process is as follows:

[0016] (21) The original PV power signal y(n) is used as input, and the FIR filter is initialized by L Hanning windows. It is expressed by equations (1) and (2). The FMD theory is transformed into a solution to the constraint problem, and the relevant kurtosis (C) is used as the objective function to iteratively update the filter bank.

[0017]

[0018] Where: v l represents the lth modal component; C M (v l ) represents its related kurtosis; g l represents the lth FIR filter of length K; Tr represents the input period; M represents the shift order, and N is the signal length;

[0019] (22) To solve the constraint problem in (1) and (2), the decomposition model can be transformed into formula (3):

[0020] v l =Yg y (3)

[0021] The decomposition pattern can then be defined as:

[0022]

[0023] Where: I represents the conjugate transpose operation; XM is used as an intermediate variable to control the weighted correlation matrix;

[0024] (23) Substituting (4) into (3) we can get C M (v l )The new expression is as follows:

[0025]

[0026] Where: S YXY , S YY denote the weighted correlation matrix and the correlation matrix respectively; mathematically, the maximization of formula (5) with respect to C is equivalent to formula (6):

[0027] SYY g l =S YY g l β (6)

[0028] (24) Through continuous iteration, the lth filter coefficient will be updated according to the solution of equation (6), so as to achieve a filtered signal with the maximum C, and then the filter coefficient is updated;

[0029] (25) Finally, the correlation coefficient between every two adjacent modal components is calculated and a correlation coefficient matrix is ​​constructed; the two adjacent modal components with the largest correlation coefficient are selected, and the modal component with the larger C is selected from the two modal components.

[0030] Furthermore, the screening implementation process of step (3) is as follows:

[0031] (31) Define a target dataset as photovoltaic power and a candidate feature dataset as meteorological factors, align the target dataset and the candidate feature dataset to ensure that there are observations at the same time point or time period;

[0032] (32) For each pair of data, calculate the MIC value

[0033]

[0034] Among them, a and b are the values ​​of candidate features and target data respectively, C1 is the maximum upper limit of the number of m1×n1 grids to be constructed, and f(a,b) is the joint probability density function;

[0035] (33) Feature selection was performed, and the MIC value range was [0, 1]. The larger the value, the higher the correlation between the two variables. The MIC threshold was taken as 0.6.

[0036] Furthermore, the implementation process of step (4) is as follows:

[0037] (41) The obtained multivariate input matrix D e-O:e Decompose into seasonal component and trend component, and the trend component is further decomposed into horizontal component and growth component; then, the different components are input into the mapping latent space by entering the Embedding module;

[0038] (42) Then, the seasonal component and growth component of the decomposed modal time series are extracted through the encoder, which are nonlinearly transformed and moved to the next layer;

[0039]

[0040] Among them, e is the current moment, O is the length of the historical sequence, n2 represents the number of layers; LN is layer normalization, and FF is the position feedforward network; is the residual of the nth encoder layer; is the residual of the previous encoder layer, MH-ESA is the head exponential smoothing attention mechanism, FA is the frequency attention mechanism, is the historical growth component, is the historical seasonal component;

[0041] (43) Define the horizontal part at the current moment

[0042]

[0043] Among them, λ is a weight parameter, is the growth amount of the previous moment, is the seasonal component at the current moment;

[0044] (44) Obtaining the prediction of the U-step growth component and the seasonal component through the decoder;

[0045]

[0046] in, is the growth component at the current moment, and represent the forecast of the H-step growth component and the forecast of the meteorological factor component respectively; J e:e+U represents the prediction of the horizontal component of the U step; N2 represents the number of stacks, and GD is the growth damping;

[0047] (45) The U-step forecast of PV power forecast is obtained by combining level, growth, and seasonal forecasts.

[0048]

[0049] Furthermore, in step (5), the improved PID search algorithm (IPSA) optimization implementation process is as follows:

[0050] (51) Use the Halton sequence to generate the position of an initial population:

[0051] E=ly+halton(N1,D,q)·(uy-ly) (16)

[0052] In the above formula, E represents the initial position of the population; N1 and D represent the number of individuals in the population and the dimension of the search space respectively; q is the cardinality of the Halton sequence, which must be a prime number greater than 1; uy and ly represent the upper and lower limits of the search space respectively;

[0053] (52) Select two prime numbers as bases and generate a set of uniformly distributed and non-repetitive data by repeatedly dividing these bases. The division formula is as follows:

[0054]

[0055] H(b)=[y1(b),y2(b)](19)

[0056] Where b represents any integer between [1, n1], n1 represents the number of points; a is a constant between [0, q-1], q represents the cardinality of Halton; y(b) is the sequence function, and H(b) is the final Halton sequence;

[0057] (53) The objective function is defined as the root mean square error between the multivariate predicted value and the actual value of photovoltaic power, and the fitness value of the individual is calculated through the objective function;

[0058] (54) First calculate the system deviation, so that the best individual x*(t) at iteration t is the individual corresponding to the overall historical minimum, and the overall deviation of multiple iterations t is e k (t) is:

[0059] e k (t) = x * (t-1)-x(t-1)(20)

[0060] (55) Then PID adjustment is performed. When the number of iterations reaches t, the output value Δu(t) of PID adjustment is

[0061] Δu(t)=K p ·r3·[e k (t)-e k-1 (t)]+K i ·r4·e k (t)+K d ·r5·[e k (t)-2e k-1 (t)+e k-2 (t)](21)

[0062] K p , K i and K d are the adjustment coefficients for proportional, integral and differential respectively;

[0063] (56) Add a zero output condition factor to the original Δu(t). The specific process is as follows:

[0064] o(t)=(cos(1-t / T)+λ(t)r5·L)·e k (t)(22)

[0065] Where L represents the Levy flight function, r is a random number from 0 to 1; λ(t) is a dynamic factor that changes with the number of iterations;

[0066] (57) The update of all individuals is related to Δu(t) and o(t). The somersault foraging strategy is used for improvement. At this time, the population update formula is defined as:

[0067]

[0068] Among them, η is the weight coefficient, x(t) is the current position of the individual; x* is the global optimal individual; S is the flip factor (currently set to 2); v is a random number (between 0 and 1).

[0069] Furthermore, a regional photovoltaic power prediction system based on multivariable and spatiotemporal information is provided, comprising:

[0070] An acquisition module is used to obtain historical photovoltaic power data and meteorological data of each photovoltaic power station in the region;

[0071] A preprocessing module, used for preprocessing the historical photovoltaic power data and meteorological data;

[0072] A decomposition module is used to decompose historical photovoltaic power data into multiple modes;

[0073] The screening module is used to screen out meteorological factors with high correlation with photovoltaic power, form a multivariate input matrix with multiple modes, and divide it into training set and test set;

[0074] Model building and training module, used to build the ETSformer spatiotemporal model and train the ETSformer model through the training set;

[0075] The power prediction module is used to predict the photovoltaic power by inputting the test set into the trained ETSformer model.

[0076] Furthermore, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory stores the computer program; and the processor executes the steps of the above-mentioned method for predicting regional photovoltaic power based on multivariate and spatiotemporal information.

[0077] Furthermore, a readable storage medium is provided, storing a computer program; when the computer program is executed by a processor, it is used to implement the steps of the method for predicting photovoltaic power in a region based on multivariate and spatiotemporal information.

[0078] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: 1. The present invention proposes to use the characteristic mode decomposition (FMD) method to decompose the original photovoltaic power time series, which greatly reduces the nonlinear and non-stationary characteristics of the original signal. Through the adaptive filter of FMD, the useful information in the signal can be more effectively separated and the noise interference can be reduced;

[0079] 2. The present invention proposes to use the maximum information coefficient (MIC) to screen meteorological factors with high correlation between meteorological data and photovoltaic power. MIC removes noise features in multivariate data by identifying the features most relevant to meteorological factors, retains stable and useful features, reduces the interference of irrelevant or weakly correlated features, reduces the number of features required for model training, reduces computing resource consumption, and improves data processing efficiency and model practicality;

[0080] 3. Establish the ETSformer model and redesign the Transformer architecture with modular decomposition blocks. The ETSformer model can process multiple variables at the same time. By decomposing the time series into trend, seasonal and cyclical components, the model can capture the long-term trend and short-term fluctuations in the time series respectively, and effectively obtain the spatiotemporal characteristics of the time series data. ETSformer can maintain the prediction accuracy while having higher computational efficiency, thereby improving accuracy and efficiency;

[0081] 4. The present invention adopts Halton sequence and somersault foraging strategy to improve the PID search algorithm (PSA). Firstly, the Halton sequence is used to initialize the population space to make its distribution more uniform, thereby reducing the blank area and improving the diversity of the population. The somersault foraging strategy can adaptively reduce the somersault range to intensify the convergence and gradually approach the optimal search space. IPSA is then used to optimize the learning rate, batch size and other parameters of the ETSformer model, further improving the accuracy of model prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 It is a flow chart of the present invention.

[0083] Figure 2 It is a schematic diagram of the ETSformer model structure of the present invention.

[0084] Figure 3 This is the IPSA search algorithm flow of the present invention. DETAILED DESCRIPTION

[0085] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0086] The present invention provides a method and system for regional photovoltaic power prediction based on multivariate and spatiotemporal information. Figure 1 As shown, specifically comprising the following steps:

[0087] Step 1: Collect historical photovoltaic power data and meteorological data of the photovoltaic power station and perform data preprocessing.

[0088] Meteorological data include solar radiation intensity, temperature, humidity, air pressure, wind speed and wind direction. Redundant data are removed, missing data are filled and abnormal data are corrected; data are normalized for comparison and analysis.

[0089] Step 2: By using the eigenmode decomposition (FMD), the historical photovoltaic power can be decomposed into multiple modes by establishing an adaptive finite impulse response filter bank and combining the correlation function. The original photovoltaic power time series is decomposed by the eigenmode decomposition (FMD) method, which greatly reduces the nonlinear and non-stationary characteristics of the original signal. The specific steps are as follows:

[0090] (21) The original PV power signal y(n) is taken as input, and the FIR filter is initialized by L Hanning windows. It is expressed by equations (1) and (2). The FMD theory becomes the solution to the constraint problem, and the relevant kurtosis (C) is used as the objective function to iteratively update the filter group.

[0091]

[0092] Where: v l represents the lth modal component; C M (v l ) represents its related kurtosis; g l represents the lth FIR filter of length K; Tr represents the input period; M represents the shift order, and N is the signal length.

[0093] (22) To solve the constraint problem in (1) and (2), the decomposition model can be transformed into formula (3):

[0094] v l =Yg y (3)

[0095] The decomposition pattern can then be defined as:

[0096]

[0097] Where: I represents the conjugate transpose operation; XM is used as an intermediate variable to control the weighted correlation matrix.

[0098] (23) Substituting (4) into (3) we can get C M (v l)The new expression is as follows:

[0099]

[0100] Where: S YXY , S YY denote the weighted correlation matrix and the correlation matrix respectively; mathematically, the maximization of formula (5) with respect to C is equivalent to formula (6):

[0101] S YY g l =S YY g l β (6)

[0102] (24) Through continuous iteration, the lth filter coefficient will be updated according to the solution of equation (6), so as to achieve the filtered signal with the maximum C, and then the filter coefficient is updated.

[0103] (25) Finally, the correlation coefficient between every two adjacent modal components is calculated and a correlation coefficient matrix is ​​constructed; the two adjacent modal components with the largest correlation coefficient are selected, and the modal component with the larger C is selected from the two modal components.

[0104] Step 3: Use the maximum information coefficient (MIC) to screen out meteorological factors with a high correlation with photovoltaic power, and form a multivariate input matrix with multiple modes in step (2), which is divided into a training set and a test set.

[0105] MIC removes noise features in multivariate data by identifying the features most relevant to meteorological factors, retains stable and useful features, and reduces the interference of irrelevant or weakly relevant features. The specific steps are as follows:

[0106] (31) Define a target dataset as photovoltaic power and a candidate feature dataset as meteorological factors. Align the target dataset and the candidate feature dataset to ensure that there are observations at the same time point or time period.

[0107] (32) For each pair of data, calculate the MIC value

[0108]

[0109] Among them, a and b are the values ​​of candidate features and target data respectively, C1 is the maximum upper limit of the number of m1×n1 grids to be constructed, and f(a,b) is the joint probability density function;

[0110] (33) Feature selection was performed, and the MIC value range was [0, 1]. The larger the value, the higher the correlation between the two variables. The MIC threshold was taken as 0.6.

[0111] Step 4:

[0112] Establish the ETSformer spatiotemporal model, such as Figure 2 As shown in the schematic diagram of the ETSformer model structure, the ETSformer model is trained using the training set. The specific steps are as follows:

[0113] (41) Input the obtained multivariate into D e-O:e Decompose into seasonal component and trend component, and the trend component is further decomposed into horizontal component and growth component; then, the different components are input into the mapping latent space by entering the Embedding module;

[0114] (42) Then, the encoder is used to extract the seasonal component and growth component of the decomposed modal time series, which are nonlinearly transformed and then moved to the next layer;

[0115]

[0116] Among them, e is the current moment, O is the length of the historical sequence, n2 represents the number of layers; LN is layer normalization, and FF is the position feedforward network; is the residual of the nth encoder layer; is the residual of the previous encoder layer, MH-ESA is the head exponential smoothing attention mechanism, FA is the frequency attention mechanism, is the historical growth component, is the historical seasonal component;

[0117] (43) Define the horizontal part at the current moment

[0118]

[0119] Among them, λ is a weight parameter, is the growth amount of the previous moment, is the seasonal component at the current moment;

[0120] (44) Obtaining the prediction of the U-step growth component and the seasonal component through the decoder;

[0121]

[0122] in, is the growth component at the current moment, and represent the forecast of the H-step growth component and the forecast of the meteorological factor component respectively; J e:e+U represents the prediction of the horizontal component of the U step; N2 represents the number of stacks, and GD is the growth damping;

[0123] (45) The U-step forecast of PV power forecast is obtained by combining level, growth, and seasonal forecasts.

[0124]

[0125] Step 5:

[0126] The present invention adopts Halton sequence and somersault foraging strategy to improve PID search algorithm (PSA). Firstly, Halton sequence is used to initialize population space to make its distribution more uniform, thereby reducing blank areas and improving population diversity. The somersault foraging strategy can adaptively reduce the somersault range to intensify convergence and gradually approach the optimal search space. IPSA is then used to optimize the learning rate, batch size and other parameters of the ETSformer model to further improve the accuracy of model prediction, thereby obtaining an improved PID search algorithm (IPSA). The IPSA search algorithm process is as follows: Figure 3 As shown in the figure, IPSA is used to optimize the learning rate, batch size and other hyperparameters of the ETSformer model. The specific steps are as follows:

[0127] (51) Use the Halton sequence to generate the position of an initial population:

[0128] E=ly+halton(N1,D,q)·(uy-ly) (16)

[0129] In the above formula, E represents the initial position of the population; N1 and D represent the number of individuals in the population and the dimension of the search space respectively; q is the cardinality of the Halton sequence, which must be a prime number greater than 1; uy and ly represent the upper and lower limits of the search space respectively;

[0130] (52) Select two prime numbers as bases and generate a set of uniformly distributed and non-repetitive data by repeatedly dividing these bases. The division formula is as follows:

[0131]

[0132] H(b)=[y1(b),y2(b)](19)

[0133] Where b represents any integer between [1, n1], n1 represents the number of points; a is a constant between [0, q-1], q represents the cardinality of Halton; y(b) is the sequence function, and H(b) is the final Halton sequence;

[0134] (53) The objective function is defined as the root mean square error between the multivariate predicted value and the actual value of photovoltaic power, and the fitness value of the individual is calculated through the objective function;

[0135] (54) First calculate the system deviation, so that the best individual x*(t) at iteration t is the individual corresponding to the overall historical minimum, and the overall deviation of multiple iterations t is e k (t) is:

[0136] e k (t) = x * (t-1)-x(t-1)(20)

[0137] (55) Then PID adjustment is performed. When the number of iterations reaches t, the output value Δu(t) of PID adjustment is

[0138] Δu(t)=K p ·r3·[e k (t)-e k-1 (t)]+K i ·r4·e k (t)+K d ·r5·[e k (t)-2e k-1 (t)+e k-2 (t)](21)

[0139] K p , K i and K d are the adjustment coefficients for proportional, integral and differential respectively;

[0140] (56) Add a zero output condition factor to the original Δu(t). The specific process is as follows:

[0141] o(t)=(cos(1-t / T)+λ(t)r5·L)·e k (t)(22)

[0142] Where L represents the Levy flight function, r is a random number from 0 to 1, and λ(t) is a dynamic factor that changes with the number of iterations.

[0143] (57) The update of all individuals is related to Δu(t) and o(t). The somersault foraging strategy is used for improvement. At this time, the population update formula is defined as:

[0144]

[0145] Among them, η is the weight coefficient, x(t) is the current position of the individual; x* is the global optimal individual; S is the flip factor (currently set to 2); v is a random number (between 0 and 1).

[0146] The present invention also provides a regional photovoltaic power prediction system based on multivariable and spatiotemporal information, comprising:

[0147] An acquisition module is used to obtain historical photovoltaic power data and meteorological data of each photovoltaic power station in the region;

[0148] A preprocessing module, used for preprocessing the historical photovoltaic power data and meteorological data;

[0149] A decomposition module is used to decompose historical photovoltaic power data into multiple modes;

[0150] The screening module is used to screen out meteorological factors with high correlation with photovoltaic power, form a multivariate input matrix with multiple modes, and divide it into training set and test set;

[0151] Model building and training module, used to build the ETSformer spatiotemporal model and train the ETSformer model through the training set;

[0152] The power prediction module is used to predict the photovoltaic power by inputting the test set into the trained ETSformer model.

[0153] The present invention also provides a computer device, including a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the memory stores the computer program; the processor executes the steps of the above-mentioned method for predicting regional photovoltaic power based on multivariable and spatiotemporal information.

[0154] The present invention also provides a readable storage medium storing a computer program; when the computer program is executed by a processor, it is used to implement the steps of the above-mentioned method for predicting regional photovoltaic power based on multivariable and spatiotemporal information.

Claims

1. A method for predicting photovoltaic power in a region based on multivariate and spatiotemporal information, characterized in that: The steps include: (1) Collect historical photovoltaic power data and meteorological data from multiple photovoltaic power stations and pre-process the data; (2) Decomposing historical PV power data into multiple modes using eigenmode decomposition (FMD); (3) Using the maximum information coefficient (MIC) to screen out meteorological factors with a high correlation with photovoltaic power, and combining them with multiple modes in step (2) to form a multivariate input matrix, which is divided into a training set and a test set; (4) Establish the ETSformer spatiotemporal model and train the ETSformer model using the training set; (5) The PID search algorithm (PSA) was improved by using the Halton sequence and the somersault foraging strategy to obtain the improved PID search algorithm (IPSA); the learning rate, batch size and other hyperparameters of the ETSformer model were optimized by IPSA; (6) Predict photovoltaic power using the test set.

2. The method for regional photovoltaic power prediction based on multivariate and spatiotemporal information according to claim 1, characterized in that: The data preprocessing in step (1) includes clearing redundant data, filling missing data, correcting abnormal data and normalizing data.

3. The method for regional photovoltaic power prediction based on multivariate and spatiotemporal information according to claim 1, characterized in that: The meteorological data described in step (1) include solar radiation intensity, temperature, humidity, air pressure, wind speed and wind direction.

4. The method for regional photovoltaic power prediction based on multivariate and spatiotemporal information according to claim 1, characterized in that: In step (2), the historical photovoltaic power is decomposed into multiple modes using FMD, and the implementation process is as follows: (21) The original PV power signal y(n) is used as input, and the FIR filter is initialized by L Hanning windows. It is expressed by equations (1) and (2). The FMD theory is transformed into a solution to the constraint problem, and the relevant kurtosis (C) is used as the objective function to iteratively update the filter bank. Where: v l represents the lth modal component; C M (v l ) represents its related kurtosis; g l represents the lth FIR filter of length K; Tr represents the input period; M represents the shift order, and N is the signal length; (22) To solve the constraint problem in (1) and (2), the decomposition model can be transformed into formula (3): v l =Yg y (3) The decomposition pattern can then be defined as: Where: I represents the conjugate transpose operation; XM is used as an intermediate variable to control the weighted correlation matrix; (23) Substituting (4) into (3) we can get C M (v l )The new expression is as follows: Where: S YXY , S YY denote the weighted correlation matrix and the correlation matrix respectively; mathematically, the maximization of formula (5) with respect to C is equivalent to formula (6): S YY g l =S YY g l b (6) (24) Through continuous iteration, the lth filter coefficient will be updated according to the solution of equation (6), so as to achieve a filtered signal with the maximum C, and then the filter coefficient is updated; (25) Finally, the correlation coefficient between every two adjacent modal components is calculated and a correlation coefficient matrix is ​​constructed; the two adjacent modal components with the largest correlation coefficient are selected, and the modal component with the larger C is selected from the two modal components.

5. The method for regional photovoltaic power prediction based on multivariate and spatiotemporal information according to claim 1, characterized in that: Step (3) screening implementation process is as follows: (31) Define a target dataset as photovoltaic power and a candidate feature dataset as meteorological factors, align the target dataset and the candidate feature dataset to ensure that there are observations at the same time point or time period; (32) For each pair of data, calculate the MIC value: Among them, a and b are the values ​​of candidate features and target data respectively, C1 is the maximum upper limit of the number of m1×n1 grids to be constructed, and f(a,b) is the joint probability density function; (33) Feature selection was performed, and the MIC value range was [0, 1]. The larger the value, the higher the correlation between the two variables. The MIC threshold was taken as 0.

6.

6. The method for regional photovoltaic power prediction based on multivariate and spatiotemporal information according to claim 1, characterized in that: The implementation process of step (4) is as follows: (41) The obtained multivariate input matrix D e-O:e Decomposed into seasonal component and trend component, and the trend component is further decomposed into level component and growth component; Then, by inputting the Embedding module, the different components are mapped to the latent space; (42) Then, the seasonal component and growth component of the decomposed modal time series are extracted through the encoder, which are nonlinearly transformed and moved to the next layer; Among them, e is the current moment, O is the length of the historical sequence, n2 represents the number of layers; LN is layer normalization, and FF is the position feedforward network; is the residual of the nth encoder layer; is the residual of the previous encoder layer, MH-ESA is the head exponential smoothing attention mechanism, FA is the frequency attention mechanism, is the historical growth component, is the historical seasonal component; (43) Define the horizontal part at the current moment Among them, λ is a weight parameter, is the growth amount of the previous moment, is the seasonal component at the current moment; (44) Obtaining the prediction of the U-step growth component and the seasonal component through the decoder; in, is the growth component at the current moment, and represent the forecast of the H-step growth component and the forecast of the meteorological factor component respectively; J e:e+U represents the prediction of the horizontal component of the U step; N2 represents the number of stacks, and GD is the growth damping; (45) The U-step forecast of PV power forecast is obtained by combining level, growth, and seasonal forecasts.

7. The method for regional photovoltaic power prediction based on multivariate and spatiotemporal information according to claim 1, characterized in that: Step (5), the improved PID search algorithm (IPSA) optimization implementation process is as follows: (51) Use the Halton sequence to generate the position of an initial population: E=ly+halton(N1,D,q)·(uy-ly) (16) In the above formula, E represents the initial position of the population; N1 and D represent the number of individuals in the population and the dimension of the search space respectively; q is the cardinality of the Halton sequence, which is a prime number greater than 1; uy and ly represent the upper and lower limits of the search space respectively; (52) Select two prime numbers as cardinal numbers and generate a set of uniformly distributed and non-repetitive data by repeatedly dividing these cardinal numbers. The division formula is as follows: H(b)=[y1(b),y2(b)](19) Where b represents any integer between [1, n1], n1 represents the number of points; a is a constant between [0, q-1], q represents the cardinality of Halton; y(b) is the sequence function, and H(b) is the final Halton sequence; (53) The objective function is defined as the root mean square error between the multivariate predicted value and the actual value of photovoltaic power, and the fitness value of the individual is calculated through the objective function; (54) First calculate the system deviation, so that the best individual x*(t) at iteration number t is the individual corresponding to the overall historical minimum, and the overall deviation of multiple iterations t is e k (t) is: e k (t)=x * (t-1)-x(t-1)(20) (55) Then PID adjustment is performed. When the number of iterations reaches t, the output value Δu(t) of PID adjustment is Δu(t)=K p ·r3·[e k (t)-e k-1 (t)]+K i ·r4·e k (t)+K d ·r5·[e k (t)-2e k-1 (t)+e k-2 (t)](21) K p , K i and K d are the adjustment coefficients for proportional, integral and differential respectively; (56) Add a zero output condition factor to the original Δu(t). The specific process is as follows: o(t)=(cos(1-t / T)+λ(t)r5·L)·e k (t)(22) Where L represents the Levy flight function, r is a random number from 0 to 1, and λ(t) is a dynamic factor that changes with the number of iterations. (57) The update of all individuals is related to Δu(t) and o(t). The somersault foraging strategy is used for improvement. At this time, the population update formula is defined as: Among them, η is the weight coefficient, x(t) is the current position of the individual; x* is the global optimal individual; S is the flip factor; v is a random number between 0 and 1.

8. A regional photovoltaic power prediction system based on multivariable and spatiotemporal information, characterized in that: include: An acquisition module is used to obtain historical photovoltaic power data and meteorological data of each photovoltaic power station in the region; A preprocessing module, used for preprocessing the historical photovoltaic power data and meteorological data; A decomposition module is used to decompose historical PV power data into multiple modes; The screening module is used to screen out meteorological factors with high correlation with photovoltaic power, form a multivariate input matrix with multiple modes, and divide it into training set and test set; Model building and training module, used to build the ETSformer spatiotemporal model and train the ETSformer model through the training set; The power prediction module is used to predict the photovoltaic power by inputting the test set into the trained ETSformer model.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory stores the computer program; The processor executes the steps of the method for predicting photovoltaic power in a region based on multivariate and spatiotemporal information as described in any one of claims 1 to 7.

10. A readable storage medium storing a computer program; characterized in that: When the computer program is executed by a processor, it is used to implement the steps of the method for regional photovoltaic power prediction based on multivariate and spatiotemporal information as described in any one of claims 1 to 7.