Offshore wind power prediction method and device based on multi-scale space-time graph transformation network
Through the multi-scale spatio-temporal graph transformation network model, multi-time scale autocorrelation features and complex spatio-temporal features in offshore wind farm data are extracted, which solves the problem of low prediction accuracy in the existing technology and achieves higher wind power power prediction accuracy and stability.
Patent Information
- Application Number
- CN202311103993.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2043-08-29
AI Technical Summary
Existing wind power power prediction methods are difficult to fully utilize the multi-time scale information and spatio-temporal correlation characteristics in high-resolution data, resulting in low prediction accuracy. It is especially difficult to achieve accurate and stable power prediction in the dynamically changing environment of offshore wind farms.
Using the multi-scale spatio-temporal graph transformation network model (MSSTGTN), through the multi-time scale autocorrelation feature extraction module, spatio-temporal feature extraction module and prediction output module, combined with the hybrid dilated graph convolution network, variant Transformer and gated fusion mechanism, the maritime model is extracted Multi-time scale autocorrelation features and complex spatiotemporal features in wind farm data are analyzed, and hyperparameters are adjusted through a multi-objective Bayesian optimization algorithm to optimize prediction results.
It improves the accuracy and stability of offshore wind power power prediction, enhances feature expression capabilities and robustness, can better capture spatiotemporal relationships, adapt to dynamic changes in offshore wind farms, and improves the reliability of prediction results.
Smart Images

Figure CN117114192B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of centralized power prediction and data processing of a multi-task wind farm group, and specifically relates to an offshore wind power prediction method and device based on a multi-scale space-time graph transformation network. Background Art
[0002] As a clean and renewable form of energy, wind power is gradually becoming an important part of the global energy transformation. However, due to the uncertainty and variability of wind speed, the stable power supply of wind farms still faces challenges. my country's wind energy resources are mainly distributed in the north, northwest and eastern coastal areas. However, due to land policy restrictions and limited land resources in the eastern coastal areas, the large-scale development of onshore wind power faces challenges. In order to make full use of wind energy resources and meet the needs of the eastern load center, offshore wind power prediction has become a hot research direction. While achieving sustainable development, accurate prediction of offshore wind power output is crucial to optimizing grid scheduling and improving power generation efficiency and reliability.
[0003] Traditional wind power prediction methods usually use physical model methods or statistical model methods. The physical model method is based on the meteorological forecast values provided by the numerical weather prediction system (NWP), combined with the geographical environment of the wind farm and the physical information of the wind farm, and finally predicts the power according to the established model. However, the modeling process is complex, difficult, and the prediction accuracy is low. The statistical model method uses general mathematical statistics methods, and does not consider the changes in climate factors such as wind speed and wind angle during the prediction process. However, due to the poor nonlinear fitting ability of the statistical model, its prediction performance is also greatly limited. In view of the fact that the existing prediction model can only process single-scale time series and it is difficult to fully extract other time scale information in high-resolution data, it is also necessary to consider the autocorrelation of historical data at different time scales, and at the same time consider the spatiotemporal correlation characteristics at different spatial scales (wind turbines / stations / clusters). Research on offshore wind power prediction methods based on multi-scale spatiotemporal graph transformation networks can further improve the accuracy of wind power prediction, which is a very promising research direction in the field of offshore wind power prediction. Summary of the invention
[0004] Purpose of the invention: In view of the problems existing in the prior art, the present invention provides an offshore wind power prediction method and device based on a multi-scale space-time graph transformation network, which captures complex space-time relationships, takes into account multiple target indicators at the same time, adapts to the dynamic changes of offshore wind farms, improves the accuracy and stability of prediction, and thus achieves better power prediction results.
[0005] Technical solution: The offshore wind power prediction method based on a multi-scale spatiotemporal graph transformation network described in the present invention comprises the following steps:
[0006] (1) Collect historical data from multiple offshore wind farms and perform small sample enhancement on the data to obtain high-resolution data;
[0007] (2) constructing a multi-scale spatiotemporal graph transformation network model MSSTGTN, wherein the MSSTGTN model includes a multi-time scale autocorrelation feature extraction module, a spatiotemporal feature extraction module, and a prediction output module;
[0008] (3) The multi-time scale autocorrelation feature extraction module is used to construct convolution operators with different prediction time lengths for the data-enhanced historical data, and the autocorrelation features of different time scales in the high-resolution historical data are adaptively extracted;
[0009] (4) Extract complex spatiotemporal features through the hybrid dilated graph convolutional network and variant Transformer in the spatiotemporal feature extraction module; and introduce a gated fusion mechanism module to enhance the MSSTGTN model's ability to learn the spatiotemporal integration of data;
[0010] (5) A derivative-free optimization algorithm is introduced into the MSSTGTN model to dynamically adjust its hyperparameters. The time and shape distortion loss function is introduced as an additional loss function of the MSSTGTN model. A multi-objective Bayesian algorithm is used to establish an optimization objective function that minimizes the time and shape distortion loss, and optimize the hyperparameters of the MSSTGTN model and the weights of the time and shape distortion loss function.
[0011] (6) The extracted autocorrelation features and spatiotemporal features are output through a prediction output module to predict wind power and obtain prediction results.
[0012] Furthermore, the historical data in step (1) includes historical wind power data, NWP data, geographic potential dependency data sequence, adjacent data sequence, periodically repeated data sequence and historical meteorological element data sequence.
[0013] Furthermore, the implementation process of step (2) is as follows:
[0014] The one-dimensional convolution operator of the multi-scale adaptive feature extraction layer is used to adaptively extract the autocorrelation features of wind speed data at different time scales as the input features of the subsequent spatiotemporal feature extraction module. The mathematical formula of the one-dimensional convolution operator is described as follows:
[0015]
[0016] Where F represents the activation function, represents the input high-resolution historical data vector, represents the deviation of the feature map, is the weight of the kth convolution kernel, L is the length of the convolution operator, is an element of high-resolution historical data determined by L and step size S.
[0017] Furthermore, the step (4) comprises the following steps:
[0018] (41) The spatiotemporal feature extraction module includes four spatiotemporal convolution blocks, which respectively extract features from geographic potential dependency sequences, adjacent sequences, periodic repetitive sequences, and historical meteorological element sequences. Each spatiotemporal convolution block contains a spatial feature extraction submodule, a temporal feature extraction submodule, and a gated fusion mechanism module.
[0019] (42) The hybrid dilated graph convolutional network in the spatial feature extraction submodule is used to adaptively capture the spatial dependencies between wind turbines in the region;
[0020] (43) The variant Transformer in the temporal feature extraction submodule is used to effectively capture the temporal dependencies at different time scales in the time series;
[0021] (44) In the fusion of spatiotemporal modules, the input of the first layer is the output of the previous layer, and then they are superimposed one by one; the input matrix H (l) Enter the spatial feature extraction submodule, the temporal feature extraction submodule and the two Linear layers respectively, and then perform dot multiplication of the output results from the spatial and temporal feature extraction submodules with the weight matrix respectively, and sum the two to get the output H (l+1) :
[0022] H (l+1) =z⊙X ξ +(1-z)⊙(X τ ) T (2)
[0023] z=σ(Linear(H (l) )+Linear((H (l) ) T )) (3)
[0024] Among them, z represents the ratio of the two Linear layers in the control gate fusion mechanism module;
[0025] (45) For each submodule, an identity mapping is added between the input and output of each network layer, that is, no change is made to the original input, and only the output is summed. Its expression is as follows:
[0026] H(x)=F(x)+x (4)
[0027] Among them, x represents the input of the residual block, H(x) represents the output of the residual block, and F(x) represents the added identity mapping.
[0028] Furthermore, the specific steps of the spatial feature extraction submodule in step (42) are as follows:
[0029] (421) The location information between wind turbines in the region is abstracted into a graph G = (V, E, A), where V and E represent the nodes of wind turbines and the connections between nodes, respectively, and A is the adjacency matrix with Euclidean distances between wind turbines. The specific calculation formula of the elements in the matrix is as follows:
[0030]
[0031] Among them, v i and v j Represents any two nodes i and j in the region, and (0,1) represents the degree of association between the two nodes A i,j The size of is in the range of 0 to 1;
[0032] (422) Taking the input data in the graph G at time t as an example, the signal of the entire graph is represented by x∈R N×C , and the convolution kernel is defined as g θ (L), g θ (L) The formula for convolution in the Fourier domain is:
[0033] g θ (L)*x=Ug θ (U T x) (6)
[0034] Among them, θ is the parameter of the model, U is the eigenvector of the normalized Laplace matrix, and U T x represents the Fourier transform of x; through the convolution kernel g θ Extract the information of the 0 to (K-1) order neighborhood of each node in the graph; the final convolution formula is expressed as:
[0035]
[0036] in, is the recursive formula T k (x) = 2T k-1 (x)-T k-2 (x), where T0 = 1, T1 = x;
[0037] (423) The obtained graph convolution kernel is applied to each node of the graph G to capture the first-order neighboring information in the graph; the graph convolution network is composed of a layer of mixed dilated convolution layer and a layer of Add-Norm. A feedforward neural network module is added after the graph convolution. The feedforward neural network layer of the spatial feature extraction submodule is expressed as:
[0038] FFN(x m )=max(0,xm W1+b1)W2+b2 (8)
[0039] Among them, x m ∈R N×T is the input matrix.
[0040] Furthermore, the step (43) comprises the following steps:
[0041] (431) Modeling in the time dimension, the variant Transformer network consists of two parts: a position and time embedding module and a multi-head attention module;
[0042] (432) Use the relative position embedding method on the input sequence to generate a position matrix D p , and integrate it into the node feature, embed the time as the node feature in a similar way to the relative position encoding, and encode the absolute time of the sampling; encode the day, hour and minute as D d , D h and D t , and then summed as the final absolute time embedding D τ :
[0043] D τ =D d +D h +D t (9)
[0044] (433) The code X of the time series data and the relative position code D p and absolute time embedding D τ The sum of these three codes gives a matrix X containing position information. τ :
[0045] X τ =X+D p +D τ (10)
[0046] (434) The output of the position and time embedding modules is used as the input of the multi-head attention module. In the multi-head attention module, all the information of a time slice space is combined into a word vector to learn the correlation between different time slices. The input feature matrix is input in the form of T×N×C and mapped to a learnable latent subspace through a feedforward neural network. The multi-head attention mechanism divides the input into three homologous parts, namely Query, Key, and Value, and performs linear transformation on them:
[0047] Query = X τ W Query ,Key=X τ W Key,Value=X τ W Value (11)
[0048] in, Linear transformation, and in the self-attention mechanism,
[0049] (435) Input the three homologous matrices into the scaled dot product attention module to obtain the self-attention matrix:
[0050]
[0051] (436) Repeat (434) to (435), performing only one self-attention operation each time. The parameter W is different each time. The entire multi-head attention module is expressed as:
[0052]
[0053] O=MultiH(Query,Key,Value)=Concat(h1,…,h n )W (14)
[0054] Among them, O is the multi-head attention output matrix, n is the number of attention heads, and h i Represents the result of each attention operation.
[0055] Furthermore, the implementation process of step (5) is as follows:
[0056] (51) Training sample Train = {(X i ,Y i )|i=1,2,..,N}, where X i =[X i1 ,X i2 ,...,X ip ] T ∈R p represents the input dataset of the MSSTGTN model, Y i =[Y i1 ,Y i2 ,...,Y iq ] T ∈R q To predict the wind power data set; the time and shape distortion loss DILATE function is expressed as:
[0057]
[0058] in, is the predicted value of the wind power data set, γ is the smoothing parameter, is the regularized path, α∈[0,1] is the parameter to control the balance, is the Euclidean distance matrix, Ω is the loss matrix; the multi-objective MSSTGTN model considering reliability and accuracy requirements is expressed as:
[0059]
[0060] Where, L MSE and L DILATE represents the objective function of the multi-objective MSSTGTN model; λ is the decision variable consisting of the hyperparameters of the multi-objective MSSTGTN model; S is the feasible domain of the multi-objective optimization problem;
[0061] (52) Initialize algorithm parameters: set the number of sample points n, the maximum number of iterations K, the proxy model GPR(x), and the acquisition function UCB(x|D); the proxy model uses the efficient Gaussian process regression model GPs, and the observed function value y l Produced in the following form:
[0062]
[0063] The Gaussian likelihood function is as follows:
[0064]
[0065] Among them, f(x) obeys the following distribution:
[0066] f(x)~GP(m(x),k θ (x,x')) (20)
[0067] In the formula, m(x) is the mean function, k θ (x,x') is the kernel function, and θ is the hyperparameter of the kernel function;
[0068] The acquisition function is based on the posterior distribution P θ (f(·)|D) is constructed, and when GPs is selected as the proxy model, its posterior distribution is still a Gaussian distribution:
[0069] P θ (f(x 1:q )|D)=N(μ θ (x 1:q ),∑ θ (x 1:q )) (twenty one)
[0070] Then the acquisition function UCB(x|D) is expressed as follows:
[0071]
[0072] Among them, γθ (x j ) = f(x j ) - μ θ (x j ), where μ θ (x j ) is the posterior mean of the subsequent point;
[0073] (53) Initialize the sample points: Generate a set X init = {x1, x2,..., x n} of n sample points using Latin hypercube sampling in the feasible region S;
[0074] (54) Calculate the fitness values: Calculate the fitness values for X init = {x1, x2,..., x n} to obtain f(X init ), initialize the evaluation point set D0 = {X init , f(X init )}, let t = n, D t--1 = D0;
[0075] (55) Construct a surrogate model GPR(x) based on the currently obtained evaluation point set;
[0076] (56) Update the evaluation point: Based on the surrogate model GPR(x), maximize the acquisition function UCB(x|D t-1 ) to obtain the next evaluation point:
[0077] x t = argmin UCB(x|D t-1 ) (23)
[0078] (57) Update the fitness values: Calculate the fitness value f(x t ) of the evaluation point xt and add it to the current evaluation point set:
[0079] D t = D t-1 ∪ {x t , f(x t )} (24)
[0080] (58) Output the optimal solution: Obtain the current optimal Pareto solution set through the non - dominated sorting algorithm. If t < N, jump to step (55); otherwise, stop the iteration and output the Pareto optimal solution set of the optimization problem; Dynamically adjust the hyperparameters of the MSSTGTN model using the optimal solution set.
[0081] Furthermore, the prediction output module described in step (6) is a two - layer fully - connected feed - forward neural network.
[0082] A device according to the present invention includes a memory and a processor, wherein:
[0083] A memory for storing computer programs that can be run on the processor;
[0084] The processor is used to execute the steps of the above-mentioned offshore wind power prediction method based on a multi-scale space-time graph transformation network when running the computer program.
[0085] A storage medium described in the present invention stores a computer program, and when the computer program is executed by at least one processor, the steps of the offshore wind power prediction method based on the multi-scale space-time graph transformation network are implemented.
[0086] Beneficial effects: Compared with the prior art, the beneficial effects of the present invention are as follows: 1. The present invention establishes a multi-scale spatiotemporal graph transformation network prediction model MSSTGTN, and takes the time series data of multiple wind farms in the region as model input. It not only takes multi-source NWP time series data as input, but also takes historical time series data and the power prediction results of a single unit as input to assist in prediction and calibration errors, and then extracts the spatiotemporal characteristics of NWP data and historical data through a hybrid dilated graph convolutional network and a variant Transformer, and combines them through a fusion module; fully mines the multi-time scale autocorrelation characteristics and complex spatiotemporal characteristics in offshore wind farm data, and applies them to wind power prediction tasks; it has the advantages of improving feature expression capabilities, capturing spatiotemporal relationships, adaptability and robustness, and can improve the accuracy and stability of offshore wind power prediction; 2. The present invention adopts a multi-objective Bayesian optimization algorithm to dynamically adjust the hyperparameters of the MSSTGTN model, and effectively improves the reliability of the prediction results on the basis of determining the structure of the offshore wind power prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 This is a framework diagram of the multi-scale spatiotemporal graph transformation network model proposed by the present invention;
[0088] Figure 2 This is a flow chart of the model hyperparameter adaptive tuning based on multi-objective Bayesian optimization proposed in the present invention. DETAILED DESCRIPTION
[0089] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0090] like Figure 1 As shown, the present invention proposes an offshore wind power prediction method based on a multi-scale spatiotemporal graph transformation network, which specifically includes the following steps:
[0091] Step 1: Collect historical data of multiple offshore wind farms, including historical wind power data, NWP data, geographic potential dependence data series, adjacent data series, periodic repetitive data series, and historical meteorological element data series; and perform small sample enhancement on the data to obtain high-resolution data.
[0092] Step 2: If Figure 1 As shown, a multi-scale spatiotemporal graph transformation network model MSSTGTN is constructed. The MSSTGTN model includes a multi-time scale autocorrelation feature extraction module, a spatiotemporal feature extraction module and a prediction output module.
[0093] Step 3: Use the multi-time scale autocorrelation feature extraction module to construct convolution operators with different prediction time lengths for the historical data after data enhancement, and adaptively extract the autocorrelation features of different time scales in the high-resolution historical data.
[0094] Obtain high-resolution data enhanced with small samples; then convert the data-enhanced historical data into a series of input units of the same length through the high-resolution data input layer. The autocorrelation features of wind speed data at different time scales are adaptively extracted through the one-dimensional convolution operator of the multi-scale adaptive feature extraction layer as the input features of the subsequent spatiotemporal feature extraction module. The mathematical formula of the one-dimensional convolution operator is described as follows:
[0095]
[0096] Where F represents the activation function, represents the input high-resolution historical data vector, represents the deviation of the feature map, is the weight of the kth convolution kernel, L is the length of the convolution operator, is an element of high-resolution historical data determined by L and step size S.
[0097] Step 4: Extract complex spatiotemporal features through the hybrid dilated graph convolutional network and variant Transformer in the spatiotemporal feature extraction module; and introduce a gated fusion mechanism module to enhance the MSSTGTN model's ability to learn the spatiotemporal integration in the data.
[0098] (4.1) Four spatiotemporal convolution blocks are designed to extract features from geographic latent dependency sequences, adjacent sequences, periodic repetitive sequences, and historical meteorological element sequences respectively. Each spatiotemporal convolution block contains a spatial feature extraction submodule, a temporal feature extraction submodule, and a gated fusion mechanism module.
[0099] (4.2) The hybrid dilated graph convolutional network in the spatial feature extraction submodule is used to adaptively capture the spatial dependencies between wind turbines / wind farms in the region.
[0100] The location information between wind turbines / stations in the region is abstracted into a graph G = (V, E, A), where V and E represent the nodes of wind turbines / stations and the connections between nodes respectively; A is the adjacency matrix with Euclidean distances between wind turbines; the specific calculation formula of the elements in the matrix is as follows:
[0101]
[0102] Among them, v i and v j Represents any two nodes i and j in the region, and (0,1) represents the degree of association between the two nodes A i,j The size is in the range of 0 to 1.
[0103] Taking the input data in graph G at time t as an example, the signal of the entire graph can be expressed as x∈R N×C , and the convolution kernel is defined as g θ (L), g θ (L) The formula for convolution in the Fourier domain is:
[0104] g θ (L)*x=Ug θ (U T x) (6)
[0105] Among them, θ is the parameter of the model, U is the eigenvector of the normalized Laplace matrix, and U T x represents the Fourier transform of x. Solving this formula using the approximate expansion of Chebyshev polynomials is equivalent to using the convolution kernel g θ Extract the information of the 0 to K-1 order neighborhood of each node in the graph. Therefore, the final convolution formula can be expressed as:
[0106]
[0107] in, is the recursive formula T k (x) = 2T k-1 (x)-T k-2 (x), where T0=1 and T1=x.
[0108] The obtained graph convolution kernel is applied to each node of the graph G to capture the first-order neighboring information in the graph. The graph convolution network consists of a layer of mixed dilated convolution layer and a layer of Add-Norm. In addition, in order to improve the generalization ability of the model, a feedforward neural network module is added after the graph convolution module. The feedforward neural network layer of the spatial feature extraction submodule can be expressed as:
[0109] FFN(x m)=max(0,x m W1+b1)W2+b2 (8)
[0110] Among them, x m ∈R N×T is the input matrix.
[0111] (3.3) The variant Transformer in the temporal feature extraction submodule is used to effectively capture the temporal dependencies at different time scales in the time series.
[0112] In order to effectively capture the temporal dependencies at different time scales in time series data, a variant Transformer network is proposed to model in the time dimension, which mainly consists of two parts: a position and time embedding module and a multi-head attention module.
[0113] First, use the relative position embedding method on the input sequence to generate a position matrix D p , and integrate it into the node feature, embed the time as the node feature in a similar way to the relative position encoding, and encode the absolute time of the sampling. Encode the day, hour, and minute as D d , D h and D t , and then summed as the final absolute time embedding D τ , which is expressed as follows:
[0114] D τ =D d +D h +D t (9)
[0115] The encoding X of time series data and the relative position encoding D p and absolute time embedding D τ The sum of these three codes gives a matrix X containing position information. τ , the expression is as follows:
[0116] X τ =X+D p +D τ (10)
[0117] The output of the position and time embedding modules is used as the input of the multi-head attention module. In the multi-head attention module, all the information of a time slice space is combined into a word vector to learn the correlation between different time slices; the input feature matrix is input in the form of T×N×C and mapped to a learnable potential subspace through a feedforward neural network. The multi-head attention mechanism divides the input into three homologous parts, namely Query, Key, and Value. And they are linearly transformed, and the expression is as follows:
[0118] Query = X τ W Query ,Key=X τ W Key ,Value=X τ W Value (11)
[0119] in, Linear transformation, and in the self-attention mechanism,
[0120] Input the three homologous matrices into the scaled dot product attention module to obtain the self-attention matrix, which is expressed as follows:
[0121]
[0122] The above operation is repeated multiple times, and only one self-attention operation is performed each time. The parameter W is different each time. The entire multi-head attention module is expressed as:
[0123]
[0124] O=MultiH(Query,Key,Value)=Concat(h1,…,h n )W (14)
[0125] Among them, O is the multi-head attention output matrix, n is the number of attention heads, and h i Represents the result of each attention operation.
[0126] (3.4) By introducing the gated fusion mechanism module, the model's ability to learn the spatiotemporal integration of data is enhanced. In the fusion of the spatiotemporal module, the input of the first layer is the output of the previous layer (H (0) =X), and then superimposed one by one. Input matrix H (l) Enter the spatial feature extraction submodule, the temporal feature extraction submodule and the two Linear layers respectively, then perform dot multiplication of the output results from the spatial and temporal feature extraction submodules with the weight matrix respectively, and finally sum the two to get the output H (l+1) , the calculation formula of this step is as follows:
[0127] H (l+1) =z⊙X ξ +(1-z)⊙(X τ ) T (2)
[0128] z=σ(Linear(H(l))+Linear((H (l) ) T )) (3)
[0129] Among them, z represents the ratio of the two Linear layers in the control gate fusion mechanism module.
[0130] (3.5) To address the degradation problem of deep neural networks, for each submodule, an identity mapping is added between the input and output of each network layer, that is, no changes are made to the original input, and only the output is summed. The expression is as follows:
[0131] H(x)=F(x)+x (4)
[0132] Among them, x represents the input of the residual block, H(x) represents the output of the residual block, and F(x) represents the added identity mapping.
[0133] Step 5: Figure 2 As shown in the figure, a derivative-free optimization algorithm is introduced into the MSSTGTN model to dynamically adjust its hyperparameters, and the time and shape distortion loss (DILATE) function is introduced as an additional loss function of the prediction model. The multi-objective Bayesian algorithm is used to establish the optimization objective function that minimizes the time and shape distortion loss (DILATE), and the hyperparameters of the training model and the weights of the time and shape distortion loss (DILATE) function are optimized.
[0134] (5.1) Assume that the training sample Train = {(X i ,Y i )|i=1,2,..,N}, where X i =[X i1 ,X i2 ,...,X ip ] T ∈R p represents the input data set of the MSSTGTN model, including geographical potential dependency sequences, adjacent sequences, periodic repetitive sequences, historical meteorological sequences, etc. i =[Y i1 ,Y i2 ,...,Y iq ] T ∈R q is the target dataset to be predicted. Then the traditional Euclidean loss function (MSE) is expressed as follows:
[0135]
[0136] in, is the predicted value of the target dataset. The time and shape distortion loss (DILATE) function is expressed as:
[0137]
[0138] Among them, γ is the smoothing parameter, is the regularized path, α∈[0,1] is the parameter to control the balance, is the Euclidean distance matrix, and Ω is the loss matrix. The optimal model of multi-objective MSSTGTN considering reliability and accuracy requirements can be expressed as:
[0139]
[0140] Where, L MSE and L DILATE represents the objective function of the multi-objective MSSTGTN prediction model; λ is the decision variable consisting of the hyperparameters of the multi-objective MSSTGTN model; S is the feasible domain of the multi-objective optimization problem.
[0141] (5.2) Initialize the algorithm parameters. Set the number of sample points n, the maximum number of iterations K, the proxy model GPR(x), and the acquisition function UCB(x|D); the proxy model uses an efficient Gaussian process regression model (GPs), assuming that the observed function value y l Produced in the following form:
[0142]
[0143] Furthermore, the Gaussian likelihood function can be obtained as follows:
[0144]
[0145] Among them, f(x) obeys the following distribution:
[0146] f(x)~GP(m(x),k θ (x,x')) (20)
[0147] In the formula, m(x) is the mean function, k θ (x,x') is the kernel function, and θ is the hyperparameter of the kernel function.
[0148] The acquisition function is based on the posterior distribution P θ (f(·)|D). When GPs is selected as the proxy model, its posterior distribution is still a Gaussian distribution:
[0149] P θ (f(x 1:q )|D)=N(μ θ (x 1:q ),∑ θ (x 1:q )) (twenty one)
[0150] Then the acquisition function UCB(x|D) is expressed as follows:
[0151]
[0152] Among them, γ θ (x j ) = f(x j ) - μ θ (x j ), where μ θ (x j ) is the posterior mean of the subsequent points.
[0153] (5.3) Initialize the sample points. Generate a set X init = {x1, x2,..., x n} of n sample points using Latin hypercube sampling in the feasible region S.
[0154] (5.4) Calculate the fitness values. Calculate the fitness values for X init = {x1, x2,..., x n} to obtain f(X init ), initialize the evaluation point set D0 = {X init , f(X init )}, and let t = n, D t--1 = D0.
[0155] (5.5) Construct the surrogate model. Construct the surrogate model GPR(x) based on the currently obtained evaluation point set.
[0156] (5.6) Update the evaluation point. Based on the surrogate model GPR(x), maximize the acquisition function UCB(x|D t-1 ) to obtain the next evaluation point:
[0157] x t = argmin UCB(x|D t-1 ) (23)
[0158] (5.7) Update the fitness value. Calculate the fitness value f(x t ) of the evaluation point xt and add it to the current evaluation point set:
[0159] D t = D t-1 ∪ {x t , f(x t )} (24)
[0160] (5.8) Output the optimal solution. Obtain the current optimal Pareto solution set through the non-dominated sorting algorithm. If t < N, jump to step (5.5); otherwise, stop the iteration and output the Pareto optimal solution set of the optimization problem.
[0161] Step 6: Predict the wind power by passing the extracted features through the fully connected prediction output module to obtain the prediction result.
[0162] After step 4, the final hidden representation H is obtained (l+1) ; This final hidden representation is predicted through a two-layer fully connected feedforward neural network module.
[0163] The present invention also provides a device, including a memory and a processor, wherein: the memory is used to store a computer program that can be run on the processor; the processor is used to execute the steps of the above-mentioned offshore wind power prediction method based on a multi-scale space-time graph transformation network when running the computer program.
[0164] The present invention also provides a storage medium having a computer program stored thereon, and when the computer program is executed by at least one processor, the steps of the offshore wind power prediction method based on the multi-scale space-time graph transformation network are implemented.
Claims
1. A method for offshore wind power prediction based on a multi-scale spatiotemporal graph transformation network, characterized in that: The following steps are involved: (1) Collect historical data from multiple offshore wind farms and perform small sample enhancement on the historical data to obtain high-resolution historical data; (2) constructing a multi-scale spatiotemporal graph transformation network model MSSTGTN, wherein the MSSTGTN model includes a multi-time scale autocorrelation feature extraction module, a spatiotemporal feature extraction module, and a prediction output module; (3) Using the multi-time scale autocorrelation feature extraction module, convolution operators with different prediction time lengths are constructed for the data-enhanced high-resolution historical data to adaptively extract autocorrelation features of different time scales in the high-resolution historical data; (4) Extracting complex spatiotemporal features through a hybrid dilated graph convolutional network and a variant Transformer network in the spatiotemporal feature extraction module; And introduce the gated fusion mechanism module to enhance the MSSTGTN model's ability to learn the spatiotemporal integration of data; (5) A derivative-free optimization algorithm is introduced into the MSSTGTN model to dynamically adjust the model hyperparameters. The time and shape distortion loss function is introduced as an additional loss function of the MSSTGTN model. The multi-objective Bayesian algorithm is used to establish the optimization objective function that minimizes the time and shape distortion loss function, and optimize the hyperparameters of the MSSTGTN model and the weights of the time and shape distortion loss function. (6) The extracted autocorrelation features and spatiotemporal features are output through a prediction output module to predict wind power and obtain a prediction result; The historical data in step (1) includes historical wind power data, numerical weather forecast system data, geographic potential dependency data sequence, adjacent data sequence, periodic repetitive data sequence and historical meteorological element data sequence; The implementation process of step (3) is as follows: The one-dimensional convolution operator of the multi-time scale autocorrelation feature extraction module is used to adaptively extract the autocorrelation features of wind speed data at different time scales as the input features of the subsequent spatiotemporal feature extraction module. The mathematical formula of the one-dimensional convolution operator is described as follows: Where F represents the activation function, represents the input high-resolution historical data vector, represents the deviation of the feature map, is the weight of the kth convolution kernel, L is the length of the convolution operator, is the element of high-resolution historical data determined by L and step size S; The step (4) comprises the following steps: (41) The spatiotemporal feature extraction module includes four spatiotemporal convolution blocks, which respectively extract features from the geographic potential dependency data sequence, the neighboring data sequence, the periodic repetitive data sequence, and the historical meteorological element data sequence. Each spatiotemporal convolution block contains a spatial feature extraction submodule, a temporal feature extraction submodule, and a gated fusion mechanism module. (42) The hybrid dilated graph convolutional network in the spatial feature extraction submodule is used to adaptively capture the spatial dependencies between wind turbines in the region; (43) The variant Transformer network in the temporal feature extraction submodule is used to effectively capture the temporal dependencies at different time scales in the time series; (44) In the gated fusion mechanism module of the spatiotemporal feature extraction module, the input of the first layer is the output of the previous layer, and then it is superimposed in sequence; the input matrix H (l) Enter the spatial feature extraction submodule, the temporal feature extraction submodule and the two Linear layers respectively, and then perform dot multiplication of the output results from the spatial and temporal feature extraction submodules with the weight matrix respectively, and sum the results of the two dot multiplications to obtain the output H (l+1) : H (l+1) =z⊙X ξ +(1-z)⊙(X τ ) T (2) z=σ(Linear(H (l) )+Linear((H (l) ) T )) (3) Among them, z represents the ratio of the two Linear layers in the gated fusion mechanism module; (45) For each submodule, an identity mapping is added between the input and output of each network layer, that is, no change is made to the original input, and only the output is summed. The expression of the residual block output is as follows: H(x)=F(x)+x (4) Where x represents the input of the residual block, H(x) represents the output of the residual block, and F(x) represents the added identity mapping; The specific steps of the spatial feature extraction submodule in step (42) are as follows: (421) The location information between wind turbines in the region is abstracted into a graph G = (V, E, A), where V and E represent the nodes of wind turbines and the connections between nodes, respectively, and A is the adjacency matrix with Euclidean distances between wind turbines. The specific calculation formula of the elements in the matrix is as follows: Among them, v i and v j represents any two nodes i and j in the region, and (0,1) represents the association value A between nodes i and j. i,j The size of is in the range of 0 to 1; (422) With respect to the input data in the graph G at time t, the signal of the entire graph is represented by x∈R N×C , and the convolution kernel is defined as g θ (L), g θ (L) The formula for convolution in the Fourier domain is: g θ (L)*x=Ug θ (U T x) (6) Among them, θ is the parameter of the model, U is the eigenvector of the normalized Laplace matrix, and U T x represents the Fourier transform of x; through the convolution kernel g θ Extract the information of the 0 to (K-1) order neighborhood of each node in the graph; the final convolution formula is expressed as: in, is the recursive formula T k (x) = 2T k-1 (x)-T k-2 (x), where T0 = 1, T1 = x; (423) The obtained graph convolution kernel is applied to each node of the graph G to capture the first-order neighboring information in the graph; the hybrid dilated graph convolution network is composed of a hybrid dilated convolution layer and a layer of Add-Norm. A feedforward neural network layer is added after the hybrid dilated graph convolution network. The feedforward neural network layer of the spatial feature extraction submodule is expressed as: FFN(x m )=max(0,x m W1+b1)W2+b2 (8) Among them, x m ∈R N×T is the input matrix; The step (43) comprises the following steps: (431) Modeling in the time dimension, the variant Transformer network consists of two parts: a position and time embedding module and a multi-head attention module; (432) Use the relative position embedding method on the input sequence to generate a position matrix D p , and integrate it into the node feature, embed the time as the node feature in a similar way to the relative position encoding, and encode the absolute time of the sampling; encode the day, hour and minute as D d , D h and D t , and then summed as the final absolute time embedding D τ : D τ =D d +D h +D t (9) (433) The code X of the time series data and the relative position code D p and absolute time embedding D τ The sum of these three codes gives a matrix X containing position information. τ : X τ =X+D p +D τ (10) (434) The output of the position and time embedding modules is used as the input of the multi-head attention module. In the multi-head attention module, all the information of a time slice space is combined into a word vector to learn the correlation between different time slices. The input feature matrix is input in the form of T×N×C and mapped to a learnable latent subspace through a feedforward neural network. The multi-head attention mechanism divides the input into three homologous parts, namely query, key, and value, and performs linear transformation on them: Query=X τ W Query ,Key=X τ W Key ,Value=X τ W Value (11) in, are all weight matrices, and in the self-attention mechanism, (435) Input the three homologous matrices into the scaled dot product attention module to obtain the self-attention matrix: (436) Repeat (434) to (435), performing only one self-attention operation each time. The parameter W is different each time. The entire multi-head attention module is expressed as: O=MultiH(Query,Key,Value)=Concat(h1,…,h n )W (14) Among them, O is the multi-head attention output matrix, n is the number of attention heads, and hi represents the result of each attention operation.
2. The offshore wind power prediction method based on a multi-scale spatiotemporal graph transformation network according to claim 1 is characterized in that: The implementation process of step (5) is as follows: (51) Training sample Train = {(X i ,Y i )|i=1,2,..,N}, where X i =[X i1 ,X i2 ,...,X ip ] T ∈R p represents the input dataset of the MSSTGTN model, Y i =[Y i1 ,Y i2 ,...,Y iq ] T ∈R q To predict the true value of the wind power data set; the time and shape distortion loss function DILATE is expressed as: in, is the predicted value of the wind power data set, γ is the smoothing parameter, is the regularized path, α∈[0,1] is the parameter to control the balance, is the Euclidean distance matrix, Ω is the loss matrix; the multi-objective MSSTGTN model considering reliability and accuracy requirements is expressed as: Where, L MSE and L DILATE represents the objective function of the multi-objective MSSTGTN model; λ is the decision variable consisting of the hyperparameters of the multi-objective MSSTGTN model; S is the feasible domain of the multi-objective optimization problem; (52) Initialize algorithm parameters: set the number of sample points n, the maximum number of iterations K, the proxy model GPR(x), and the acquisition function UCB(x|D); the proxy model uses the efficient Gaussian process regression model GPs, and the observed function value y l Produced in the following form: The Gaussian likelihood function is as follows: Among them, f(x) obeys the following distribution: f(x):GP(m(x),k θ (x,x')) (20) In the formula, m(x) is the mean function, k θ (x,x') is the kernel function, and θ is the hyperparameter of the kernel function; The acquisition function is based on the posterior distribution P θ (f(·)|D) is used to construct the posterior distribution of GPs as the proxy model: P θ (f(x 1:q )|D)=N(μ θ (x 1:q ),∑ θ (x 1:q )) (21) Then the acquisition function UCB(x|D) is expressed as follows: Among them, γ θ (x j )=f(x j )-μ θ (x j ), μ θ (x j ) is the posterior mean of the subsequent points; (53) Initialize sample points: Generate a set X of n sample points using Latin hypercube sampling in the feasible domain S. init ={x1,x2,...,x n }; (54) Calculate the fitness value: for X init ={x1,x2,...,x n }Calculate the fitness value to get f(X init ), initialize the evaluation point set D0 = {X init ,f(X init )}, let t = n, D t-1 =D0; (55) Construct the proxy model GPR(x) based on the currently obtained evaluation point set; (56) Update the evaluation point: Based on the proxy model GPR(x), maximize the acquisition function UCB(x|D t-1 ), get the next evaluation point: x t =argminUCB(x|D t-1 ) (23) (57) Update fitness value: Calculate evaluation point x t The fitness value f(x t ) and adds it to the current set of evaluation points: D t =D t-1 ∪{x t ,f(x t )} (24) (58) Output the optimal solution: obtain the current Pareto optimal solution set through the non-dominated sorting algorithm. If t<N, jump to step (55); otherwise, stop iterating and output the Pareto optimal solution set of the optimization problem; use the optimal solution set to dynamically adjust the hyperparameters of the MSSTGTN model.
3. The offshore wind power prediction method based on a multi-scale spatiotemporal graph transformation network according to claim 1 is characterized in that: The prediction output module described in step (6) is a two-layer fully connected feedforward neural network.
4. An electronic device, characterized in that: comprising a memory and a processor, wherein: A memory for storing computer programs that can be run on the processor; A processor is used to execute the steps of the offshore wind power prediction method based on a multi-scale space-time graph transformation network as described in any one of claims 1 to 3 when running the computer program.
5. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by at least one processor, implements the steps of the offshore wind power prediction method based on a multi-scale spatiotemporal graph transformation network as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Multi-wind-power-plant wind speed simulation method and system considering space-time correlation
CN114564838A
Traffic prediction method based on multi-scale space-time fusion graph network
CN115240425A
Multi-wind-power-plant short-term power prediction method considering time evolution and space correlation
CN115293415A
Traffic flow prediction method based on multi-scale spatial feature mining
CN116070778A
Traffic speed prediction method based on multi-spatial scale space-time Transform
CN116311921A
