A multi-point wind speed spatio-temporal prediction method and system

By constructing a multi-point spatiotemporal wind speed prediction system in engineering projects, and combining the physical information neural network of Transformer and Navier-Stokes equations, the problem of ignoring spatial correlation and physical mechanisms in wind speed prediction is solved, realizing short-term accurate prediction of wind speed and early warning of strong winds, thus ensuring the safe operation of engineering projects.

CN119168112BActive Publication Date: 2025-11-28CENT SOUTH UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410996725.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2025-11-28
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

Existing wind speed prediction methods ignore the spatial correlation of wind speed and the physical mechanisms of wind speed changes, and cannot effectively address the wind protection needs of large-scale engineering projects.

Method used

A multi-point spatiotemporal wind speed prediction method is adopted. By determining multiple measuring points in a local area of ​​the target project, geographical and meteorological parameters are obtained, a Transformer-based physical information neural network model is constructed, and wind speed is predicted by combining the Navier-Stokes equations. The wind speed data and spatial location information of multiple measuring points are considered, and the self-attention mechanism and physical information neural network are used for training and prediction.

Benefits of technology

It enables accurate short-term wind speed prediction, provides more comprehensive information for strong wind warnings, ensures the safe and efficient operation of engineering projects, and is applicable to fields such as high-speed railways, highways, wind farms, and photovoltaic power plants. It can also be extended to marine engineering and agricultural production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168112B_ABST
    Figure CN119168112B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of regional wind speed prediction, and discloses a multi-point wind speed space-time prediction method and system, which comprises the following steps: collecting geographical parameters, wind power parameters and meteorological parameters of multiple measuring points to obtain monitoring data sequences of the measuring points; determining the spatial array layout of the measuring points, and extracting the monitoring data sequences of the measuring points and corresponding spatial position information for pretreatment to obtain wind speed data sequences; extracting the pretreated wind speed data sequences of the measuring points as samples, training a physical information neural network based on a Transformer and an N-S equation, capturing long-term dependence in the wind speed data sequences by means of a Transformer model of a self-attention mechanism, learning the physical law of wind speed change according to the N-S equation, and obtaining a wind speed prediction model; and predicting the wind speed data sequences by using the multi-point wind speed space-time prediction model to obtain a predicted wind speed result; the application solves the problems that the existing wind speed prediction method ignores the spatial correlation of wind speed and does not completely consider the physical mechanism of wind speed change.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of regional wind speed prediction, and in particular to a multi-point wind speed space-time prediction method and system. BACKGROUND

[0002] With the attention of the state to infrastructure construction, the scale of engineering construction is expanding year by year, and the construction of large engineering projects in the fields of expressways, high-speed railways, wind farms and photovoltaic farms is increasing. However, due to the large size of large engineering projects, they are easily threatened by strong winds. Among them, the increase in train speed has increased the importance of strong side wind factors, and strong winds have caused train derailment, rollover and other serious traffic safety accidents; as an important factor for wind farm operation, extreme strong winds have caused damage to wind power equipment and power grid fluctuations, which cannot be ignored; similarly, strong wind environment has a greater impact on the normal and stable operation of photovoltaic supports and components in photovoltaic farms. Therefore, it is necessary to establish a perfect strong wind monitoring and early warning system to monitor and predict local regional wind speed data in real time, realize the timely acquisition of wind speed information, provide decision-making basis for the dispatch center, and take corresponding control and response measures in advance to the greatest extent to ensure the safe and efficient operation of engineering projects. At present, the traditional wind speed prediction method is often based on wind speed data at a single location for prediction, ignoring the wind speed correlation and spatial distribution characteristics between multiple measuring points. At the same time, the prediction process rarely considers other factors besides wind speed prediction data, and only based on wind speed statistical model or empirical formula for prediction. It can be seen that the existing wind speed prediction method has the problems of ignoring the spatial correlation of wind speed and not fully considering the physical mechanism of wind speed change. SUMMARY

[0003] The present application provides a multi-point wind speed space-time prediction method and system to solve the problem of ignoring the spatial correlation of wind speed and not fully considering the physical mechanism of wind speed change in the existing wind speed prediction method.

[0004] In order to achieve the above purpose, the present application realizes the technical scheme as follows:

[0005] In the first aspect, the present application provides a multi-point wind speed space-time prediction method, comprising:

[0006] Determine N measuring points in the local area of the target engineering project, obtain the geographic parameters, wind parameters and meteorological parameters of each measuring point, and determine the monitoring data sequence of the measuring point based on the geographic parameters, wind parameters and meteorological parameters, wherein N is an integer greater than 1;

[0007] Determine the spatial position information of the measuring point based on the spatial array layout of the measuring point, and pre-process the monitoring data sequence and spatial position information of the measuring point to obtain the wind speed data sequence of the measuring point, and construct a training sample based on the wind speed data sequence of all measuring points;

[0008] A wind speed prediction model is constructed by constructing a physical information neural network model based on a Transformer and constructing an N-S equation learning wind speed variation rules, and embedding the N-S equation into the physical information neural network model based on the Transformer to obtain the wind speed prediction model.

[0009] The wind speed prediction model is trained using training samples to obtain a trained wind speed prediction model, and a wind speed data sequence of a measurement point is input into the trained wind speed prediction model to obtain a predicted wind speed result of the measurement point.

[0010] Optionally, the geographic parameters include a longitude parameter and a latitude parameter, the wind force parameters include a wind speed parameter and a wind direction parameter, and the meteorological parameters include a temperature parameter, a density parameter, and a pressure parameter.

[0011] Optionally, the monitoring data sequence and the spatial position information of the measurement point are preprocessed to obtain the wind speed data sequence of the measurement point, including:

[0012] The monitoring data sequence and the spatial position information are subjected to data cleaning, missing value filling, and dimensionless linear normalization processing to obtain the wind speed data sequence, wherein the dimensionless linear normalization processing includes:

[0013] The monitoring data sequence and the spatial position information are subjected to standardization processing, and are mapped to the [0, 1] interval through a dimensionless linear normalization expression, wherein the dimensionless linear normalization expression satisfies the following relationship:

[0014]

[0015] In the formula, x' represents the data after dimensionless linear normalization, x represents an input value of the data to be subjected to dimensionless linear normalization processing, x max represents a maximum value of the data input value, and x min represents a minimum value of the data input value.

[0016] Optionally, the physical information neural network model based on the Transformer includes position encoding, a feedforward fully connected network, a multi-head attention layer, and residual and layer normalization.

[0017] Optionally, the position encoding includes:

[0018] Relative position encoding is added to the input data, and a relative position vector is assigned to the relative distance between each pair of elements in the input data sequence, wherein the expression for adding the relative position encoding and assigning the relative position vector satisfies the following relationship:

[0019]

[0020] In the formula, pos represents a data position index, i represents a dimension index in a position vector, d is a dimension of each position vector, PE is a position embedding matrix, each row of the matrix corresponds to a position, and the position is represented by a vector with a length of d, and the dimensions correspond to different calculation modes according to parity.

[0021] Optionally, the feedforward full connection network comprises:

[0022] The feedforward full connection network is composed of two linear transformations and a nonlinear activation function. After the input vector obtained after the position encoding processing is subjected to the first linear transformation, a new vector is obtained, and then the new vector is subjected to a ReLU activation function for nonlinear conversion. The output vector after the nonlinear conversion is mapped to the same dimension as the input vector in the second linear transformation. The expression of the linear transformation is as follows:

[0023] FFN(x1) = max(0, x1W i +b i )W2 + b2.

[0024] In the formula, FFN(x1) represents the output of the feedforward full connection network, max(·) represents taking the maximum value, x1 represents input data, W i is the i th hidden layer weight matrix, and b i is the i th hidden layer bias vector.

[0025] The ReLU activation function is:

[0026] f(x1) = max(0, x1).

[0027] In the formula, f(x1) represents the output of the ReLU activation function, max(·) represents taking the maximum value, and x1 represents input data.

[0028] Optionally, the multi-head attention layer comprises:

[0029] The query matrix, the key matrix, and the value matrix are constructed.

[0030] The attention degree of each data element is obtained by calculating the similarity of the query matrix and the key matrix, and the attention degree is the weight of the value matrix in the finally calculated attention value. Then, the values of all data elements are weighted and summed to obtain the final attention value.

[0031] The query matrix, the key matrix, and the value matrix are all derived from the same input X, and the expressions satisfy the following relationship:

[0032] Q = W Q X.

[0033] K = W K X.

[0034] V = W V X;

[0035] In the formula, Q represents a query matrix, K represents a key matrix, V represents a value matrix, and the query matrix and the key matrix have the same dimension, and W Q ,W K ,W V are parameter matrices updated with training, and X represents an input;

[0036] The input matrix obtains the query matrix, the key matrix, and the value matrix through the conversion matrix, and is evenly divided according to the number of multi-attention mechanism heads, and the expression is as follows:

[0037] (Q1, K1, V1), (Q2, K2, V2), …, (Q n ,K n ,V n );

[0038] n = D k / h;

[0039] In the formula, n represents the matrix dimension allocated to each attention head, (Q n ,K n ,V n ) is the query, key, and value matrix of the nth attention head, D k is the dimension of the query matrix and the key matrix, which determines the number of features that each attention head can process, and h represents the number of attention heads;

[0040] h groups of attentions are calculated using the query matrix, the key matrix, and the value matrix, and the model can extract different relationships between the query matrix, the key matrix, and the value matrix, respectively, and focus on the representation subspace information from different positions, and the expression is as follows:

[0041]

[0042] Among them, Attention represents the attention value, softmax(·) represents the normalized exponential function, H i represents the output of the ith attention head, are projection matrices, represents the dimension of the projection matrix, V represents the value matrix, d k represents the dimension of the key matrix and the query matrix, K τ represents the transpose of the key matrix;

[0043] Each head will use different projection matrices for parameter updating;

[0044] Then, different attention value output results are spliced, and a fully connected layer is used for linear transformation to obtain the final result:

[0045] MultiHead(Q, K, V) = Concat(H1,...,H k )W O R;

[0046] where MultiHead(·) represents the output of multi-head attention, Concat(·) represents the concatenation operation, H K represents the output of the Kth attention head, W O represents the weight matrix of the full connection layer, represents the dimension of the full connection layer weight matrix.

[0047] Optionally, the residual and layer normalization include:

[0048] performing residual operation on the input data of each sub-layer, and then performing layer normalization processing, wherein the expression of the residual operation satisfies the following relationship:

[0049] H(x1) = F(x) + x1;

[0050] where x1 represents the input data, F(x) represents a series of operations before the residual, and H(x1) is the final output of the residual block model.

[0051] Optionally, the N-S equation for learning the variation law of wind speed is constructed, the N-S equation is embedded into the physical information neural network model based on the Transformer to obtain a wind speed prediction model, including:

[0052] constructing the N-S equation for incompressible gas, wherein the N-S equation satisfies the following relationship:

[0053]

[0054] where t represents a time variable, u and v respectively represent horizontal and vertical velocity components of the gas, p represents a pressure variable, p represents a density, μ represents a viscosity, F represents other external forces, x and y respectively represent spatial coordinate variables and positions of the gas flow, represents the partial derivative of a certain variable;

[0055] In the application of natural wind, the viscosity parameter in the N-S equation is ignored, and the main external force is the barometric gradient force and the Coriolis force, at this time, the N-S equation is simplified, and the simplified N-S equation satisfies the following relationship:

[0056]

[0057] where f represents the Coriolis coefficient, and f = 2Ωsinφ, Ω represents the earth rotation angular velocity, φ represents the earth latitude value, t represents the time variable, u, v respectively represent the horizontal and vertical velocity components of the gas, p represents the pressure variable, ρ represents the density, x, y respectively represent the spatial coordinate variable and the position of the gas flow, represents the partial derivative of a variable;

[0058] At the same time, the natural wind is a fluid, and the fluid follows the continuity equation, which satisfies the following relationship:

[0059]

[0060] where t represents the time variable, u, v respectively represent the horizontal and vertical velocity components of the gas, ρ represents the density, x, y respectively represent the spatial coordinate variable and the position of the gas flow, represents the partial derivative of a variable;

[0061] Substituting the continuity equation into the simplified N-S equation, the residual of the N-S equation is obtained, which satisfies the following relationship:

[0062]

[0063] where e1, e2, e3 respectively represent the residuals of the N-S equation on the horizontal velocity component u, the vertical velocity component v and the continuity equation, t represents the time variable, u, v respectively represent the horizontal and vertical velocity components of the gas, f represents the Coriolis coefficient, p represents the pressure variable, x, y respectively represent the spatial coordinate variable and the position of the gas flow, represents the partial derivative of a variable;

[0064] The residual of the N-S equation is embedded into the physical information neural network model based on the Transformer to obtain the loss function of the wind speed prediction model, wherein the loss function satisfies the following relationship:

[0065] L = αL e + βL i

[0066]

[0067] where L is the loss function of the wind speed prediction model, L e and L i respectively represent the loss function components corresponding to the equation partial differential structure and the real data condition, N represents the number of training data, represents the residual of the ith equation at the nth data point, represents the predicted value of the nth data point, u n = (u n , vn ) represent the true data weight coefficients alpha and beta of the nth data point for balancing the two component parts of the loss function.

[0068] In a second aspect, the embodiments of the present application provide a multi-point wind speed spatio-temporal prediction system, characterized in that it comprises a processor, a memory;

[0069] The memory is used to store a computer program.

[0070] The processor is used to execute the program stored on the memory, so as to realize the method steps of any one of the first aspect.

[0071] Advantages:

[0072] The multi-point wind speed spatio-temporal prediction method provided by the application adopts a wind speed short-term prediction model to perform short-term prediction on wind speed, obtains monitoring data sequences of each measuring point by collecting and processing geographical parameters, wind power parameters and meteorological parameters of multiple measuring points in real time, and obtains wind speed data sequences of corresponding measuring points after preprocessing, aiming to realize comprehensive prediction of multiple points and not only focus on data of a single measuring point. Considering wind speed data of multiple measuring points and combining their spatial position information, comprehensive prediction of wind speed of multiple points can be realized, and more comprehensive basis for regional gale warning is provided. By extracting the wind speed data sequence of the measuring point as a sample, the physical information neural network based on the Transformer and the N-S equation is trained and predicted, and the prediction result can be obtained. The wind speed short-term prediction model adopts the Transformer model with the aid of the self-attention mechanism and the physical information neural network model based on the N-S equation, and the prediction of the two models is mixed. Considering multiple meteorological parameters related to wind speed, the long-term dependence in the wind speed data sequence can be better captured, the learning of the physical equation, the N-S equation and the capture of the physical law of wind speed change can be realized, and real-time and accurate prediction of short-term wind speed can be realized. The method and system of the application are not only suitable for gale warning in local areas such as high-speed railways, highways, wind power plants and photovoltaic power plants, but also can be expanded to other fields according to actual needs, such as marine engineering and agricultural production. The corresponding control and response measures can be taken in advance to protect the safety of personnel and property and ensure the safe and efficient operation of the engineering project. BRIEF DESCRIPTION OF DRAWINGS

[0073] Figure 1 is a flowchart of the multi-point wind speed spatio-temporal prediction method of the preferred embodiment of the application;

[0074] Figure 2 is a structure diagram of the multi-head self-attention mechanism of the preferred embodiment of the application, wherein (a) is an attention mechanism diagram, and (b) is a multi-head attention mechanism diagram;

[0075] Figure 3is a structural schematic diagram of a Transformer unit of a preferred embodiment of the present application;

[0076] Figure 4 is a structural schematic diagram of a PINN network unit based on the N-S equation of a preferred embodiment of the present application;

[0077] Figure 5 is a prediction result diagram of one sample of a physical information neural network prediction model based on the Transformer and the N-S equation of a preferred embodiment of the present application;

[0078] Figure 6 is a prediction index calculation result diagram of one sample of a physical information neural network prediction model based on the Transformer and the N-S equation of a preferred embodiment of the present application. DETAILED DESCRIPTION

[0079] The technical solutions of the present application will be described clearly and completely below. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0080] Unless otherwise defined, the technical terms or scientific terms used in the present application shall have the usual meanings understood by those skilled in the art to which the present application belongs. The terms "first", "second" and the like used in the present application do not represent any order, number or importance, but are only used to distinguish different components. Similarly, the terms "one" or "a" and the like do not represent a quantity limitation, but represent the existence of at least one. The terms "connected" or "connected" and the like are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "up", "down", "left", "right" and the like are only used to represent relative positional relationships, and when the absolute positions of the described objects change, the relative positional relationships also change accordingly.

[0081] Embodiment 1

[0082] Please refer to Figures 1-6 The embodiment of the present application provides a multi-point wind speed space-time prediction method, comprising:

[0083] Determine N measuring points in a local area of a target engineering project, obtain geographical parameters, wind parameters and meteorological parameters of each measuring point, and determine a monitoring data sequence of the measuring point based on the geographical parameters, the wind parameters and the meteorological parameters, wherein N is an integer greater than 1;

[0084] The spatial position information of the measuring point is determined based on the spatial array layout, and the wind speed data sequence of the measuring point is obtained by preprocessing the monitoring data sequence and the spatial position information of the measuring point; and the training sample is constructed based on the wind speed data sequences of all the measuring points.

[0085] The physical information neural network model based on the Transformer is constructed, and the N-S equation learning the wind speed variation rule is constructed, and the N-S equation is embedded into the physical information neural network model based on the Transformer to obtain the wind speed prediction model.

[0086] The wind speed prediction model is trained by using the training sample to obtain the trained wind speed prediction model, and the wind speed data sequence of the measuring point is input into the trained wind speed prediction model to obtain the predicted wind speed result of the measuring point.

[0087] In the above embodiment, a group of sequences is divided into a plurality of small sequences, part of the preprocessed measuring point wind speed data sequence is extracted as a sample, and a physical information neural network speed prediction model based on the Transformer and the N-S equation is trained; the wind speed prediction model is used to predict the remaining wind speed data in the measuring point wind speed data sequence except the sample to obtain the short-time predicted wind speed size and wind direction; the spatial position relative information of each measuring point is coded into the time sequence through the position coding, and the long-term dependence relationship in the wind speed data sequence is captured by means of the Transformer model of the self-attention mechanism to improve the global information perception ability. In the prediction, the N-S equation is embedded into the prediction of the time sequence as the physical information, so that in the wind speed prediction process, not only the influence of the historical wind speed size is considered, but also other meteorological factors related to the physical information, including temperature, humidity and air pressure, are considered, the physical law of wind speed variation is learned, and accurate prediction of wind speed and wind direction is realized. The LSTM deep neural network is used to train the prediction model to perform short-time prediction of wind speed.

[0088] Optionally, the geographic parameter includes a longitude parameter and a latitude parameter, the wind force parameter includes a wind speed parameter and a wind direction parameter, and the meteorological parameter includes a temperature parameter, a density parameter and an air pressure parameter.

[0089] Optionally, the wind speed data sequence of the measuring point is obtained by preprocessing the monitoring data sequence and the spatial position information of the measuring point, including:

[0090] The monitoring data sequence and the spatial position information are subjected to data cleaning, missing value filling and dimensionless linear normalization processing to obtain the wind speed data sequence, wherein the dimensionless linear normalization processing includes:

[0091] The monitoring data sequence and the spatial position information are subjected to standardization processing, and are mapped to the [0, 1] interval through a dimensionless linear normalization expression, wherein the dimensionless linear normalization expression satisfies the following relationship:

[0092]

[0093] In the formula, x' represents the data after dimensionless linear normalization, x represents the input value of the data to be processed by dimensionless linear normalization, x max represents the maximum value of the data input value, x min represents the minimum value of the data input value.

[0094] Optionally, the physical information neural network model based on the Transformer includes: position encoding, feedforward full connection network, multi-head attention layer, and residual and layer normalization.

[0095] Optionally, the position encoding includes:

[0096] The relative position encoding is added to the input data, and a relative position vector is assigned to the relative distance between each pair of elements in the input data sequence, wherein the expression of adding the relative position encoding and assigning the relative position vector satisfies the following relationship:

[0097]

[0098] In the formula, pos represents the data position index, i represents the dimension index in the position vector, d is the dimension of each position vector, PE is the position embedding matrix, each row of the matrix corresponds to a position, which is represented by a vector with a length of d, and the dimensions are calculated according to different calculation modes according to parity.

[0099] Optionally, the feedforward full connection network includes:

[0100] The feedforward full connection network is composed of two linear transformations and a nonlinear activation function. The input vector obtained after position encoding processing is converted into a new vector through the first linear transformation, and then is nonlinearly converted through a ReLU activation function. The output vector after nonlinear conversion is mapped to the same dimension as the input vector in the second linear transformation, wherein the expression of linear transformation is as follows:

[0101] FFN(x1)=max(0,x1W i +b i )W2+b2;

[0102] In the formula, FFN(x1) represents the output of the feedforward full connection network, max(·) represents the maximum value, x1 represents the input data, W i is the i-th hidden layer weight matrix, and b i is the i-th hidden layer bias vector.

[0103] The ReLU activation function is:

[0104] f(x1) = max(0, x1);

[0105] In the formula, f(x1) represents the output of the ReLU activation function, max(·) represents taking the maximum value, and x1 represents input data;

[0106] Optionally, the multi-head attention layer comprises:

[0107] The query matrix, the key matrix, and the value matrix are constructed;

[0108] The attention degree of each data element is obtained by calculating the similarity of the query matrix and the key matrix, and the attention degree is the weight of the value matrix in the finally calculated attention value, and then the values of all data elements are weighted and summed to obtain the final attention value;

[0109] The query matrix, the key matrix, and the value matrix are all derived from the same input X, and their expressions satisfy the following relationship:

[0110] Q = W Q X;

[0111] K = W K X;

[0112] V = W V X;

[0113] In the formula, Q represents the query matrix, K represents the key matrix, and V represents the value matrix, and the query matrix and the key matrix have the same dimension, W Q ,W K ,W V are parameter matrices updated with training, and X represents the input;

[0114] The input matrix obtains the query matrix, the key matrix, and the value matrix through the conversion matrix and is evenly divided according to the number of multi-attention mechanism heads, and the expression is as follows:

[0115] (Q1, K1, V1), (Q2, K2, V2), …, (Q n ,K n ,V n );

[0116] n = D k / h;

[0117] In the formula, n represents the matrix dimension allocated to each attention head, (Q n ,K n ,V n ) is the query, key, and value matrix of the nth attention head, D k is the dimension of the query matrix and the key matrix, which determines the number of features that each attention head can process, and h represents the number of attention heads.

[0118] The h groups of attention are calculated using the query matrix, the key matrix, and the value matrix. The model can extract different relationships between the query matrix, the key matrix, and the value matrix, and pay attention to the representation subspace information from different positions. The expression is as follows:

[0119]

[0120] where Attention represents the attention value, softmax(·) represents a normalized exponential function, H i represents the output of the i-th attention head, are projection matrices, represents the dimension of the projection matrix, V represents the value matrix, d k represents the dimension of the key matrix and the query matrix, K τ represents the transpose of the key matrix.

[0121] Each head uses different projection matrices for parameter updating.

[0122] Next, the different attention value output results are spliced, and then a fully connected layer is used for linear transformation to obtain the final result:

[0123] MultiHead(Q,K,V)=Concat(H1,...,H k )W O R;

[0124] In the formula, MultiHead(·) represents the output of multi-head attention, Concat(·) represents the splicing operation, H K represents the output of the K-th attention head, W O represents the weight matrix of the fully connected layer, represents the dimension of the fully connected layer weight matrix.

[0125] Optionally, the residual and layer normalization include:

[0126] The residual operation is performed on the input data of each sub-layer, and then the layer normalization processing is performed. The expression of the residual operation satisfies the following relationship:

[0127] H(x1)=F(x)+x1;

[0128] where x1 represents the input data, F(x) represents a series of operations before the residual, and H(x1) is the final output of the residual block model.

[0129] Optionally, the N-S equation for learning the wind speed variation law is constructed, the N-S equation is embedded into the physical information neural network model based on the Transformer to obtain the wind speed prediction model, including:

[0130] The N-S equation for incompressible gas is constructed, wherein the N-S equation satisfies the following relationship:

[0131]

[0132] In the formula, t represents a time variable, u and v respectively represent horizontal and vertical velocity components of the gas, p represents a pressure variable, p represents a density, mu represents a viscosity, F represents other external forces, x and y respectively represent spatial coordinate variables and positions of gas flow, represents the partial derivative of a variable;

[0133] In the application of natural wind, the viscosity parameter in the N-S equation is ignored, and the main external force is the barometric gradient force and the Coriolis force, at this time, the N-S equation is simplified, and the simplified N-S equation satisfies the following relationship:

[0134]

[0135] In the formula, f represents the Coriolis coefficient, and f = 2 Omega sin phi, Omega represents the earth rotation angular velocity, phi represents the earth latitude value, t represents the time variable, u and v respectively represent the horizontal and vertical velocity components of the gas, p represents the pressure variable, p represents the density, x and y respectively represent the spatial coordinate variables and the positions of the gas flow, represents the partial derivative of a variable;

[0136] At the same time, the natural wind is a fluid, and the fluid follows the continuity equation, and the continuity equation satisfies the following relationship:

[0137]

[0138] In the formula, t represents a time variable, u and v respectively represent horizontal and vertical velocity components of the gas, p represents a density, x and y respectively represent spatial coordinate variables and positions of gas flow, represents the partial derivative of a variable;

[0139] Substitute the continuity equation into the simplified N-S equation to obtain the residual of the N-S equation, and the residual satisfies the following relationship:

[0140]

[0141] In the formula, e1, e2, e3 respectively represent the residual of the N-S equation on the horizontal velocity component u, the vertical velocity component v and the continuity equation, t represents the time variable, u, v respectively represent the horizontal and vertical velocity components of the gas, f represents the Coriolis coefficient, p represents the pressure variable, x, y respectively represent the spatial coordinate variable and the position of the gas flow, represents the partial derivative of a certain variable;

[0142] The residual of the N-S equation is embedded into the physical information neural network model based on the Transformer to obtain the loss function of the wind speed prediction model, wherein the loss function satisfies the following relationship:

[0143] L = aL e + bL i

[0144]

[0145] In the formula, L is the loss function of the wind speed prediction model, L e and L i respectively represent the loss function components corresponding to the equation partial differential structure and the true data condition, N represents the number of training data, represents the residual of the ith equation at the nth data point, represents the predicted value of the nth data point, u n = (u n , v n ) represents the true data weight coefficient a and b of the nth data point. and b are used to balance the two components of the loss function.

[0146] Embodiment 2

[0147] Referring to Figure 1 , the embodiment of the present application provides a multi-point wind speed space-time prediction method, and the specific steps are as follows:

[0148] (1) A plurality of measuring points are determined for the local area of the target engineering project, the wind speed of the measuring points is monitored and collected in real time, the geographic parameters (including longitude parameters and latitude parameters), the wind power parameters (including wind speed parameters and wind direction parameters) and the meteorological parameters (including temperature, density and air pressure) of each measuring point are obtained, and the monitoring wind speed sequence x is obtained after sorting;

[0149] Based on the above geographic parameters, wind power parameters and meteorological parameters, the monitoring data sequence of each measuring point is calculated and obtained.

[0150] (2) According to the spatial array layout of multiple measuring points, the monitoring wind speed sequence x and the spatial position information corresponding to the measuring points are preprocessed, and the parameters including wind speed, wind direction cosine and meteorological parameters are included, data cleaning, missing value filling and dimensionless linear normalization are carried out. The standardized method is used to standardize the indicators with different dimensions and orders of magnitude of the parameter data of the measuring points, map the data to the [0, 1] interval, and the expression of dimensionless linear normalization of data is as follows:

[0151]

[0152] Wherein, x max and x min are the maximum and minimum values of the data input value respectively.

[0153] (3) Through the way of unordered random selection, part of the wind speed data sequence of the measuring points is extracted as the training sample, and the physical information neural network model based on Transformer and N-S equation is used for training.

[0154] As an important functional component of the Transformer model, the multi-head attention mechanism learns different dependency relationships between different positions in the sequence through different attention heads, is suitable for wind speed prediction with strong nonlinearity, and can consider multiple related variables (including wind direction, air pressure, temperature, etc.) at the same time, learn their interaction and relationship, and the structural diagram of the mechanism can be seen Figure 2 .

[0155] The attention mechanism calculates the similarity between the query (Query) and the key (Key) to obtain the attention degree of each data element, that is, the weight of the value (Value) in the finally calculated attention (Attention) value, and then the values of all data elements are weighted and summed to obtain the final attention value. Wherein Q (Query), K (Key), V (Value) matrix are derived from the same input The expression is as follows:

[0156] Q=W Q X

[0157] K=W K X

[0158] V=W V X

[0159] Wherein Q and K matrix have the same dimension, W Q , W K , W V are parameter matrices updated with training.

[0160] The input matrix obtains Q, K, V via the conversion matrix, and is evenly divided according to the number h of multi-attention mechanism heads, and the expression is as follows:

[0161] (Q1,K1,V1),(Q2,K2,V2),…,(Q n ,K n ,V n )

[0162] n=D k / h

[0163] The h groups of attention are calculated using Q, K, and V, and the model can extract different relationships between Q, K, and V respectively, and pay attention to the representation subspace information from different positions, and the expression is as follows:

[0164]

[0165] Among them, are projection matrices, and each head uses different projection matrices for parameter update.

[0166] Next, the different Attention output results are spliced, and then a fully connected layer is used for linear transformation to obtain the final result:

[0167] MultiHead(Q,K,V)=Concat(H1,...,H k )W O R

[0168] Among them, After multiplying the parameter matrix, the final result can be obtained.

[0169] (4) The training process of the Transformer model includes position encoding, feedforward fully connected network, multi-head attention layer, residual operation and layer normalization, etc. It consists of an encoder and a decoder, and the structure of the basic module and the flow of information are shown in the following Figure 3 .

[0170] Position encoding: first, add relative position encoding to the input X, which gives each pair of elements in the sequence a relative position vector according to the relative distance between them, and the specific expression is as follows:

[0171]

[0172] Among them, pos represents the data position index, d is the dimension of each position vector, PE is the position embedding matrix, each row of the matrix corresponds to a position, which is represented by a vector with a length of d, and the dimension is calculated according to different calculation modes according to odd and even.

[0173] Feedforward fully connected network: then, through the feedforward fully connected network composed of two linear transformations and a nonlinear activation function, the input vector is mapped to a new vector through the first linear transformation, and is nonlinearly converted through a ReLU activation function, and finally the output vector is mapped to the same dimension as the input vector in the second linear transformation, the expression is as follows:

[0174] FFN(x)=max(0,xW i +b i )W2+b2

[0175] Where W i is the i-th hidden layer weight matrix, and b i is the i-th hidden layer bias vector.

[0176] The ReLU activation function is:

[0177] f(x)=max(0,x)

[0178] Multi-head attention layer: not described here.

[0179] Residual and layer normalization: finally, each sub-layer needs to go through the residual operation to avoid information loss and gradient disappearance and other problems, and the input data of different lengths is processed through layer normalization, and then output, the expression of the residual operation is as follows:

[0180] H(x)=F(x)+x

[0181] Where x represents the input data, F function represents a series of operations before the residual, and H(x) is the final output of the residual block model.

[0182] (5) The above method realizes the calculation and processing of the global information and multivariate data of the prediction model, and then the physical information neural network model method of N-S equation is used to realize the learning of the wind speed prediction model to N-S equation, and the physical information neural network model diagram is shown in Figure 4 . For incompressible natural wind, the viscosity term of N-S equation is usually ignored, and the main external force is the barometric gradient force and the Coriolis force, and the equation expression is as follows:

[0183]

[0184] Where t represents the time variable, u and v represent the horizontal and vertical velocity components of the gas respectively, p represents the pressure variable, p represents the density, f represents the Coriolis coefficient, f=2Ωsinφ, Ω represents the earth rotation angular velocity, equal to 7.29×10 -5 s -1 , and φ represents the earth latitude value.

[0185] At the same time, the fluid follows the continuity equation, that is:

[0186]

[0187] Therefore, the residual of the equation can be summarized as follows:

[0188]

[0189] Based on the above, the loss function of the entire wind speed training model is obtained, and the specific definition is as follows:

[0190] L = aL e + bL i

[0191]

[0192] Where, L e and L i respectively represent the loss function components corresponding to the partial differential structure of the equation and the true data condition, N represents the number of training data, represents the residual of the ith equation at the nth data point. represents the predicted value of the nth data point, u n = (u n , v n ) represents the true data weight coefficient of the nth data point. a and b are used to balance the two components of the loss function.

[0193] (6) Using the trained wind speed prediction model, the wind speed data sequence of multiple measuring points is predicted to obtain the predicted wind speed result of the target measuring point. Figure 5 The result graph of using the wind speed prediction model to predict one group of samples is shown.

[0194] (7) The mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE) and mean absolute percentage error (MAPE) are used to evaluate the prediction accuracy of the model, Figure 6 The prediction index calculation result graph of one sample of the prediction model is shown, and it can be seen that the overall index is less than 0.15, the effect is good, and the accuracy of the prediction method is also proved.

[0195] The embodiment of the application also provides a multi-point wind speed space-time prediction system, comprising a processor, a memory;

[0196] The memory is used to store computer programs;

[0197] The processor is used to execute the programs stored on the memory, and realizes any method steps in the multi-point wind speed space-time prediction method.

[0198] The multi-point wind speed space-time prediction system can realize each embodiment of the multi-point wind speed space-time prediction method and achieve the same beneficial effects, and thus, no further description is provided herein.

[0199] The preferred embodiments of the present application have been described in detail. It should be understood that those of ordinary skill in the art can make modifications and variations without departing from the concept of the present application. Therefore, the technical solutions obtained by logical analysis, reasoning or limited experiments based on the prior art according to the concept of the present application should be within the protection scope defined by the claims.

Claims

1. A method for spatiotemporal prediction of wind speed at multiple locations, characterized in that, include: N measuring points are determined in a local area of ​​the target project. Geographic parameters, wind parameters, and meteorological parameters of each measuring point are obtained. Based on the geographic parameters, wind parameters, and meteorological parameters, a monitoring data sequence for the measuring points is determined, where N is an integer greater than 1. The spatial location information of the measuring points is determined based on the spatial array layout of the measuring points, and the monitoring data sequence and the spatial location information of the measuring points are preprocessed to obtain the wind speed data sequence of the measuring points. Training samples are constructed based on the wind speed data sequences of all measuring points. A Transformer-based physical information neural network model is constructed, and an NS equation for learning the wind speed variation law is constructed. The NS equation is then embedded into the Transformer-based physical information neural network model to obtain a wind speed prediction model. The wind speed prediction model is trained using the training samples to obtain a trained wind speed prediction model, and the wind speed data sequence of the measuring point is input into the trained wind speed prediction model to obtain the predicted wind speed result of the measuring point. The step of constructing the NS equation to learn the wind speed variation law, and embedding the NS equation into a Transformer-based physical information neural network model to obtain a wind speed prediction model, includes: Construct the Navier-Stokes equations for incompressible gases, where the Navier-Stokes equations satisfy the following relationship: ; ; In the formula, t represents the time variable, u and v represent the horizontal and vertical velocity components of the gas, respectively, and p represents the pressure variable. Indicates density, Let F represent viscosity, F represent other external forces, and x and y represent spatial coordinate variables and the position of the gas flow, respectively. It represents the partial derivative with respect to a certain variable; In applications involving natural wind, the viscosity parameter in the Navier-Stokes equations is neglected, and the main external forces are the pressure gradient force and the Coriolis force. In this case, the Navier-Stokes equations are simplified, and the simplified Navier-Stokes equations satisfy the following relationship: ; ; In the formula, Represents the Coriolis coefficient, and , Represents the Earth's angular velocity of rotation. The value represents the Earth's latitude, t represents the time variable, u and v represent the horizontal and vertical velocity components of the gas, respectively, and p represents the pressure variable. Let represent density, x and y represent spatial coordinate variables and the position of gas flow, respectively, and ∂ represent the partial derivative with respect to a certain variable; Meanwhile, natural wind is a fluid, and fluids follow a continuity equation, which satisfies the following relationship: ; In the formula, t represents the time variable, and u and v represent the horizontal and vertical velocity components of the gas, respectively. Let x represent density, and y represent spatial coordinates and the position of the gas flow, respectively. It represents the partial derivative with respect to a certain variable; Substituting the continuity equation into the simplified Navier-Stokes equation, we obtain the residuals of the Navier-Stokes equation, which satisfy the following relationship: In the formula, , , Let represent the residuals of the Navier-Stokes equations on the horizontal velocity component u, the vertical velocity component v, and the continuity equation, respectively; t represents the time variable; and u and v represent the horizontal and vertical velocity components of the gas, respectively. denoted by Coriolis coefficient, p represents pressure variable, x and y represent spatial coordinate variables and gas flow position, respectively, and ∂ represents partial derivative with respect to a certain variable; The residuals of the Navier-Stokes equations are embedded into a Transformer-based physical information neural network model to obtain the loss function of the wind speed prediction model, where the loss function satisfies the following relationship: ; In the formula, L is the loss function of the wind speed prediction model, L e and L i These represent the partial differential structure of the equation and the loss function components corresponding to the real data conditions, respectively, where N represents the number of training data points. This represents the residual of the i-th equation at the n-th data point. This represents the predicted value of the nth data point. The weight coefficients α and β of the nth data point represent the two components used to balance the loss function.

2. The multi-point spatiotemporal prediction method for wind speed according to claim 1, characterized in that, The geographical parameters include longitude and latitude parameters; the wind parameters include wind speed and wind direction parameters; and the meteorological parameters include temperature, density, and air pressure parameters.

3. The multi-point spatiotemporal wind speed prediction method according to claim 1, characterized in that, The preprocessing of the monitoring data sequence and the spatial location information of the measuring point to obtain the wind speed data sequence of the measuring point includes: The monitoring data sequence and the spatial location information are subjected to data cleaning, missing value imputation, and dimensionless linear normalization to obtain the wind speed data sequence. The dimensionless linear normalization process includes: The monitoring data sequence and the spatial location information are standardized and mapped to the [0,1] interval using a dimensionless linear normalization expression, wherein the dimensionless linear normalization expression satisfies the following relationship: ; In the formula, This represents the data after dimensionless linear normalization. x This represents the input value of the data that needs to undergo dimensionless linear normalization. This indicates the maximum value of the input data. This represents the minimum value of the input data.

4. The multi-point spatiotemporal wind speed prediction method according to claim 1, characterized in that, The Transformer-based physical information neural network model includes: position encoding, feedforward fully connected network, multi-head attention layer, and residual and layer normalization.

5. The multi-point spatiotemporal prediction method for wind speed according to claim 4, characterized in that, The location encoding includes: Add relative position encoding to the input data, and assign a relative position vector to the relative distance between each pair of elements in the input data sequence. The expressions for adding relative position encoding and assigning relative position vectors satisfy the following relationship: ; ; In the formula, pos Indicates the data location index. i This represents the dimension index in the position vector. d It is the dimension of each position vector. PE This is a position embedding matrix, where each row of the matrix corresponds to a position, and this position is represented by a matrix of length 1. d The vector encoding representation has different calculation modes for the dimension according to the parity correspondence.

6. The multi-point spatiotemporal prediction method for wind speed according to claim 4, characterized in that, The feedforward fully connected network includes: The feedforward fully connected network consists of two linear transformations and a nonlinear activation function. The input vector, after positional encoding, is transformed into a new vector through the first linear transformation, and then nonlinearly transformed by a ReLU activation function. The output vector after the nonlinear transformation is mapped to the same dimension as the input vector in the second linear transformation. The expression for the linear transformation is as follows: ; In the formula, This represents the output of the feedforward fully connected network. This indicates taking the maximum value. Indicates input data, For the first i Hidden layer weight matrix, For the first i Hidden layer bias vector; The ReLU activation function is: ; In the formula, This represents the output of the ReLU activation function. This indicates taking the maximum value. This indicates the input data.

7. The multi-point spatiotemporal prediction method for wind speed according to claim 4, characterized in that, The multi-head attention layer includes: Construct the query matrix, key matrix, and value matrix; The attention level of each data element is obtained by calculating the similarity between the query matrix and the key matrix. The attention level is the weight of the value matrix in the final calculated attention value. Then, the values ​​of all data elements are weighted and summed to obtain the final attention value. The query matrix, key matrix, and value matrix all originate from the same input. Its expression satisfies the following relation: ; ; ; In the formula, Represents the query matrix. Represents the key matrix. This represents a value matrix, and the query matrix and key matrix have the same dimensions. These are all parameter matrices that are updated during training. Indicates input; The input matrix is ​​transformed into a query matrix, a key matrix, and a value matrix, which are then evenly divided according to the head number in a multi-attention mechanism, as shown in the following expression: ; ; In the formula, n This represents the matrix dimension assigned to each attention head. It is the first n A query, key, and value matrix for each attention head. The dimensions of the query matrix and key matrix determine the number of features that each attention head can process, where h represents the number of attention heads; Using the query matrix, key matrix, and value matrix, h groups of attention are calculated. The model can extract different relationships between the query matrix, key matrix, and value matrix, focusing on representation subspace information from different locations. The expression is as follows: ; ; in, Indicates the attention value. Represents the normalized exponential function, Indicates the first i The output of each attention head, All are projection matrices. Let V represent the dimension of the projection matrix, and V represent the value matrix. The dimensions of the key matrix and query matrix are represented. Represents the transpose of the key matrix; Each head will use a different projection matrix to update parameters; Next, the outputs with different attention values ​​are concatenated, and then a linear transformation is performed through a fully connected layer to obtain the final result: ; In the formula, This represents the output of multi-head attention. This indicates a splicing operation. This represents the output of the Kth attention head. This represents the weight matrix of the fully connected layer. , This represents the dimension of the weight matrix of the fully connected layer.

8. The multi-point spatiotemporal prediction method for wind speed according to claim 4, characterized in that, The residuals and layer normalization include: The input data of each sub-layer is subjected to residual operation, followed by layer normalization. The expression for the residual operation satisfies the following relationship: ; in, Indicates input data, This represents a series of operations preceding the residual. This is the final output of the residual block model.

9. A multi-point spatiotemporal wind speed prediction system, characterized in that, Including processor and memory; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Multi-fan wind speed space-time prediction method and system

    CN116894384A

  • Construction method of wind power plant short-time wind speed prediction model based on deep learning model

    CN117744755A