An offshore wind field inversion method based on improved CNN-LSTM network
Through the improved CNN-LSTM network, combined with the convolutional neural network and the long short-term memory network, the problem of high computational resources for dynamic downscaling and dependence on historical data for statistical downscaling in offshore wind field inversion is solved, and efficient and accurate wind field inversion is achieved. Field data processing and generalization capabilities are suitable for applications in multiple sea areas and rapid response.
Patent Information
- Application Number
- CN202411195439.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-08-29
AI Technical Summary
Among the existing offshore wind field inversion methods, dynamic downscaling technology has high computational resource requirements and slow processing speed, while statistical downscaling technology is highly dependent on historical data and has limited generalization capabilities.
Using the improved CNN-LSTM network, by collecting and preprocessing a variety of historical data sets, combined with the convolutional neural network and the long short-term memory network, multi-channel input and temporal feature processing are performed, and a forget gate, input gate, and output gate are designed. LSTM layer, and introduces an attention mechanism to optimize the model structure to improve the processing accuracy and speed of wind field data.
It realizes automatic learning and extraction of wind field characteristics, reduces dependence on computing resources, improves processing speed and accuracy, enhances the generalization ability of the model, can process spatiotemporal data more accurately, and is applicable to wind field data in multiple sea areas. Weather forecast and disaster warning system suitable for rapid response.
Smart Images

Figure CN118690669B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of meteorological models, and in particular to an offshore wind field inversion method based on an improved CNN-LSTM network. Background Art
[0002] In the field of meteorology, offshore wind field refined inversion technology is crucial to improving the accuracy of wind resource assessment and the reliability of weather forecasts, because it can provide more detailed analysis of regional climate characteristics and extreme weather events. The realization of this technology mainly relies on downscaling, which is an important method to convert large-scale, low-resolution meteorological grid data into small-scale, high-resolution data. In offshore wind field inversion, since there are few ocean observation data to meet business needs, numerical prediction models are usually used to obtain their grid information, and then downscaling technology is used to generate high-resolution wind field grids.
[0003] Traditional offshore wind field inversion methods mainly rely on the following technologies: Dynamic downscaling is based on a low-resolution global climate model (GSM), nested with a high-resolution regional climate model (RCM), using the global model to provide boundary conditions for the regional model, and generating regional high-resolution meteorological grid data. Statistical downscaling relies on historical meteorological data to establish a statistical relationship between large-scale meteorological parameters and small-scale meteorological parameters to achieve downscaling, thereby predicting regional climate characteristics. This method is simpler, but lacks an in-depth description of the physical process.
[0004] In recent years, with the advancement of artificial intelligence technology, especially the application of convolutional neural networks (CNN), new possibilities have been provided for the refined inversion of wind farms. CNN can automatically learn and extract spatial features from a large amount of meteorological data, thereby improving the prediction of local details of wind farms. Based on this, this paper proposes an offshore wind farm inversion method based on an improved CNN-LSTM network, aiming to improve the processing accuracy and speed of offshore wind farm data. Summary of the invention
[0005] The purpose of the present invention is to provide an offshore wind field inversion method based on an improved CNN-LSTM network to solve the following technical problems:
[0006] The wind field inversion technology based on dynamic downscaling requires high computing resources and has slow processing speed; the wind field inversion technology based on statistical downscaling is highly dependent on historical data and has limited generalization ability.
[0007] The purpose of the present invention can be achieved through the following technical solutions:
[0008] An offshore wind field inversion method based on an improved CNN-LSTM network collects historical data sets of different resolutions, including the following steps:
[0009] S1. Collect historical forecast data sets, generate FC data sets after preprocessing, collect historical observation data sets, historical satellite sea temperature data sets, and historical wave data sets, generate OB data sets after preprocessing, collect historical reanalysis data sets, generate DA-RE data sets after preprocessing, as label values for model training;
[0010] S2. Clean and standardize the preprocessed historical data set, and divide the historical data set into a training set and a validation set. Fuse the FC data set in the training set with the historical satellite sea temperature data set and the historical wave data set, input the multi-channel CNN model, and after processing by the convolution layer, activation function, pooling layer, and fully connected layer, output the downscaled high-resolution meteorological features and integrate them.
[0011] S3. The output of the CNN model is integrated with the OB data set as the input of the LSTM model, and the time series feature input is constructed to adapt to the LSTM processing format. The LSTM layer including the forget gate, input gate, and output gate is designed to process high-dimensional input data. The constructed LSTM network includes an input layer, two LSTM layers, an attention mechanism layer, a third LSTM layer, and the final fully connected output layer for wind speed prediction. The root mean square error between the model output and the label value DA-RE data set is used as the loss function;
[0012] S4. According to the constructed CNN-LSTM model, continue to train with the training set, pass information to the input layer layer by layer based on the back propagation algorithm, calculate the gradient of the parameters of each layer, update and adjust the model parameters to minimize the loss function; finally, use the validation set to evaluate the model performance and further adjust the model parameters.
[0013] As a further solution of the present invention: the preprocessing process of the historical forecast data set is:
[0014] The linear interpolation method is used to improve the time resolution. By connecting the straight line between two known time data points, the value of the middle point is estimated. Assume that t1 and t2 are two known time points, and the corresponding forecast data values are v1 and v2 respectively. For any time point t between t1 and t2, its data value v is calculated by the following linear interpolation formula:
[0015] ;
[0016] Among them, t1, t2 and t are the start time, end time and interpolation time respectively, v1 and v2 are the data values at time points t1 and t2, and the FC data set is obtained.
[0017] As a further solution of the present invention: the preprocessing process of the historical observation data set is:
[0018] For observation data at discrete points, an empty array with the same horizontal resolution as the FC dataset is created. By calculating the longitude and latitude distance between the station and the nearest grid point, the observation data is filled into the corresponding nearest grid point, while the grid points not involved remain empty;
[0019] For the sea temperature data and ocean wave data, the Kriging interpolation method is used to interpolate these data to the same grid locations as the FC dataset;
[0020] Kriging interpolation uses the variogram to quantify the relationship between the distance and similarity of sample points, and uses this as a weight to estimate unknown points; the variogram γ(h) is used to describe the spatial autocorrelation of sample values at distance h; its calculation formula is:
[0021] ;
[0022] Among them, N(h) is the number of sample pairs with distance h, Z(x i ) and Z(x i +h) is the distance h at x i and x i + sample value of h;
[0023] Using the variation function, the weight λ is determined by the following linear system: i :
[0024] ;
[0025] And it satisfies the unbiasedness condition:
[0026] ;
[0027] All processed observation data are unified into the OB data set.
[0028] As a further solution of the present invention: the preprocessing process of the historical reanalysis data set is:
[0029] The WRF preprocessing system is used for downscaling. Then, the three-dimensional variational assimilation technology 3D-Var in the WRFDA assimilation system is used to assimilate the historical observation data and reanalysis data before preprocessing. The objective function J(x) of 3D-Var is defined as:
[0030] ;
[0031] Where x is the analysis field, i.e. the result after assimilation, x bis the background field, y is the observation data, H(x) is the observation operator, which converts the model space to the observation space, B is the background error covariance matrix, and R is the observation error covariance matrix; the DA-RE dataset generated after assimilation only contains U and V wind speed data as label values for model training.
[0032] As a further solution of the present invention: the process of data cleaning and standardization of the historical data set is:
[0033] Statistical methods are used to detect and remove outliers in the data set, and the 3σ criterion is used to identify and remove values that exceed 3 times the standard deviation range; the formula is as follows:
[0034] ;
[0035] Among them, x i represents the data point, μ represents the mean of the data, and σ represents the standard deviation of the data;
[0036] To process missing values in the data set, directly delete the records with missing values; for time series data, use linear interpolation to fill missing values. The linear interpolation formula is as follows:
[0037] ;
[0038] Among them, t is the missing value time point, t1 and t2 are the two previous and next time points, and x(t1) and x(t2) are the corresponding values;
[0039] The cleaned data is standardized to adapt the data to the input requirements of the neural network. The z-score method is used for standardization. The formula is as follows:
[0040] ;
[0041] Among them, z is the standardized value, x is the original value, μ is the mean, and σ is the standard deviation.
[0042] As a further solution of the present invention: the specific training process of the CNN model is:
[0043] The multi-channel input data is fused with the historical satellite sea temperature dataset and the historical ocean wave dataset using the FC dataset, and the input data is processed into a four-dimensional array format (N, H, W, C);
[0044] Design the convolution kernel size and step size, the number and depth of convolution layers, build the model convolution layer, extract the key features in the meteorological data, and the convolution calculation formula is:
[0045] ;
[0046] Among them, K is the convolution kernel, b is the bias term, σ is the activation function, and F ij It is the feature map obtained after convolution;
[0047] Select ReLU as the activation function to perform nonlinear mapping on the output of the convolutional layer to enhance the model's expressiveness and training efficiency. The ReLU formula is:
[0048] ;
[0049] The feature dimension of the model is reduced through the pooling layer. The maximum pooling method is used to further enhance the feature extraction effect by selecting the maximum value in the convolution result. A 2×2 maximum pooling layer is added after each convolution layer. The maximum pooling formula is as follows:
[0050] ;
[0051] Among them, P ij is the feature map after pooling, F i+m,j+n It is the feature value output by the convolution layer;
[0052] Fully connected layer: Flatten the feature maps of the datasets processed by the pooling layer, including the FC dataset, the historical satellite sea temperature dataset, and the historical wave dataset. Linearly combine the flattened feature vectors through linear transformation W·P and bias b, and then apply the softmax activation function to perform nonlinear mapping on the output, and finally generate high-resolution output for the regression task. The formula is as follows:
[0053] ;
[0054] Among them, W and b are the weights and biases of the fully connected layer, P is the flattened output feature of the pooling layer, and y is the final output result.
[0055] As a further solution of the present invention: the specific training process of the LSTM model is:
[0056] The output of the CNN model is a wind farm data grid, where each grid point contains wind speed and wind direction elements. The wind farm data grid is supplemented with the OB data set and organized at hourly intervals to form a three-dimensional data array, which includes time steps (T), grid points (N), and features of each grid point (F). The data within 24 time steps are integrated into a complete input sequence.
[0057] Each LSTM layer is configured with 512 hidden units to process high-dimensional input data. Each LSTM unit contains an input gate, a forget gate, and an output gate:
[0058] The formula of the LSTM model is as follows:
[0059] ;
[0060] ;
[0061] ;
[0062] ;
[0063] ;
[0064] ;
[0065] in, It's the Gate of Forgetfulness. is the input gate, is a candidate memory, is a memory unit, is the output gate, is the hidden state, W and b are weight and bias parameters, σ is the sigmoid activation function, and tanh is the hyperbolic tangent activation function;
[0066] The input layer is used to receive the downscaled output from the CNN model, where each time step includes 200×200 grid data and each grid point has 6 features; it is recorded once every hour and accumulated for 24 hours to generate a three-dimensional array of (24,40000,6) to input into the LSTM model;
[0067] The first LSTM layer contains 512 hidden units, processes 24 time steps of input, each time step has 40,000 grid points, each grid point has 6 features, returns the complete sequence data, and provides the next layer with basic data and residual connection input; the residual connection is used to add the output of the first LSTM layer directly to the input of the second LSTM layer;
[0068] The second layer of LSTM is also configured with 512 hidden units, receiving the output from the first layer enhanced by residual connections, keeping the number of time steps and grid points unchanged, and the number of features becomes 300, i.e. (24,40000,300);
[0069] The attention mechanism layer is used to process the output of the second layer LSTM. It calculates the attention weight of each time step through a fully connected layer and a softmax function. This layer uses the "W_attention" 512×1 weight matrix and 1×1 bias to calculate the weighted importance of each time step and output a weighted average context vector with a dimension of 24×512;
[0070] The third LSTM layer is used to process the context vector from the attention mechanism layer. It is also configured with 512 units and only returns the output of the last time step.
[0071] The output layer is a fully connected layer, which contains 40,000 units. Each unit corresponds to the wind forecast of a grid point. The linear activation function is used for regression prediction. The output of the output layer is the predicted value of the wind speed of all 40,000 grid points at a certain moment in the future, forming a 40,000-dimensional vector.
[0072] As a further solution of the present invention: the model parameters of the CNN-LSTM model are specifically:
[0073] The Adam optimizer was used, and the initial learning rate was set to 0.001. The batch size was set to 32 to balance the training time and model performance. The number of training rounds was initially set to 100, and the number of training rounds was adjusted according to the performance of the validation set. The root mean square error between the model output and the label value DA-RE dataset was calculated as the model loss function.
[0074] As a further solution of the present invention: the specific process of model training through the training set is:
[0075] In each iteration of the model, the model calculates the predicted output through forward propagation, and calculates the gradient of the loss function with respect to each parameter through the back propagation algorithm, and updates the parameters using the Adam optimizer. The formula is:
[0076] ;
[0077] Among them, θ represents the model parameters, η is the learning rate, and m t and v t are the first-order and second-order moment estimates, and ε is the zero-proof constant;
[0078] Using the root mean square error as the loss function, the formula is:
[0079] ;
[0080] Where n is the number of samples, is the predicted value of the model, is the actual value;
[0081] By evaluating the model performance on the validation set, adjusting the learning rate, batch size, number and size of network layers, and adjusting them through multiple iterations;
[0082] If the loss function does not decrease significantly after 10 consecutive training cycles, the training will be terminated early. After each training cycle, the validation set is used to evaluate the performance of the model and the accuracy, recall rate and F1 score of the model prediction to ensure that the model performance meets the preset requirements.
[0083] Beneficial effects of the present invention:
[0084] (1) The CNN-LSTM hybrid model of the present invention can automatically learn and extract wind field features, reducing the reliance on expensive computing resources, thereby reducing computing costs and improving processing speed;
[0085] (2) The present invention can process spatiotemporal data more accurately through the CNN-LSTM hybrid model. Compared with the traditional dynamic downscaling method, statistical downscaling method and single CNN model, it has obvious advantages in the spatial feature extraction of wind field data and the dynamic changes of time series;
[0086] (3) The present invention improves the CNN-LSTM structure by introducing residual connections and attention mechanisms, which can more accurately capture the complex dynamic characteristics of wind fields changing over time. This makes the model not only adaptable to data in specific areas, but also able to process wind field data in other sea areas, showing strong generalization ability;
[0087] (4) The present invention ensures high quality and consistency of data by fusing multi-source meteorological data and using advanced interpolation and data assimilation techniques;
[0088] (5) The technology of the present invention has a fast processing speed and can provide real-time feedback of wind field output, which is very suitable for weather forecasting and disaster warning systems that require rapid response. It can also be widely used in wind power generation, navigation, marine fisheries and other fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The present invention will be further described below in conjunction with the accompanying drawings.
[0090] Figure 1 It is a schematic diagram of the data preprocessing process of the present invention;
[0091] Figure 2 It is a structural schematic diagram of the model training of the present invention;
[0092] Figure 3 It is a schematic diagram of the overall process of the present invention. DETAILED DESCRIPTION
[0093] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0094] See also Figure 1-Figure 3As shown, the present invention is an offshore wind field inversion method based on an improved CNN-LSTM network, which aims to improve the processing accuracy and speed of offshore wind field data. Through this model, low-resolution meteorological wind field grid data is downscaled to high-resolution precise grids, thereby achieving the purpose of refinement. This technical solution covers the entire process from data collection to model training and application, and introduces innovative technical improvements in each key step. The following are the detailed implementation steps of the present invention:
[0095] 1. Data Collection
[0096] 1. Historical forecast data set: collects historical forecast data provided by the European Centre for Medium-Range Weather Forecasts (ECMWF). The time resolution of this data set is 3 hours and the spatial resolution is 0.25°×0.25°. Taking the offshore waters of Zhejiang Province as an example, by applying to ECMWF, the historical forecast data for this sea area from 2013 to 2022 can be obtained.
[0097] 2. Historical observation data set: Use the hourly data of coastal meteorological regional stations and island meteorological stations obtained by China's meteorological and marine-related agencies and other government departments. Taking the offshore waters of Zhejiang Province as an example, the hourly average wind data from 2013 to 2022 can be obtained from 300 meteorological regional stations along the coast and islands of Zhejiang Province. And the monitoring elements of wind force, wind direction, sea temperature, waves, etc. of 35 buoy stations in the offshore waters of Zhejiang Province.
[0098] 3. Historical reanalysis data set: Use the ERA5 historical reanalysis data set from the European Centre for Medium-Range Weather Forecasts (ECMWF), which has a temporal resolution of 1 hour and a spatial resolution of 0.1°×0.1°. For example, through ECMWF, you can download the u and v component data of 10-meter wind in the coastal waters of Zhejiang Province from 2013 to 2022.
[0099] 4. Other data sets (historical satellite sea temperature data set, historical ocean wave data set, etc.): The sea temperature data from the Chinese Fengyun-4 series satellites are used, with a temporal resolution of 15 minutes and a spatial resolution of 4 km. Ocean wave data can be obtained from the GFS analysis field of the National Oceanic and Atmospheric Forecasting Center (NOAA) of the United States, with a temporal resolution of 3 hours and a spatial resolution of 0.25° (about 25 km).
[0100] 2. Data Preprocessing
[0101] 1. For historical forecast datasets: In order to ensure the accuracy of the model and the consistency of the input data, the EC historical forecast dataset needs to be temporally interpolated to adjust its time resolution from 3 hours to 1 hour. This processing step is crucial because it ensures the consistency of data from different sources in time scale, allowing for more accurate model training and prediction. The following is a detailed introduction to the interpolation process:
[0102] The linear interpolation method is used to estimate the value of the middle point by connecting the straight line between two known data points. Let t1 and t2 be two known time points, and the corresponding forecast data values are v1 and v2 respectively. For any time point t between t1 and t2, its data value v can be calculated by the following linear interpolation formula:
[0103] ;
[0104] Among them, t1, t2 and t are the start time, end time and interpolation time respectively, v1 and v2 are the data values at time points t1 and t2, and the FC data set is obtained.
[0105] After interpolation, the dataset with adjusted temporal resolution is called FC (ForecastCorrected) dataset. The FC dataset contains hourly temperature, air pressure, wind speed, wind direction and other meteorological parameters. These data will be directly used as model input to improve the temporal resolution of the model and the precision of the prediction.
[0106] 2. For historical observation datasets: For observation data from discrete points such as buoys, islands, and weather stations, first create an empty array with the same horizontal resolution as the FC dataset. By calculating the longitude and latitude distance between the station and the nearest grid point, fill the observation data into the corresponding nearest grid point, while the uninvolved grid points remain empty to maintain the original accuracy and location information of the data. For sea temperature data and wave data, use the Kriging interpolation method to interpolate these data to the same grid point location as the FC dataset. Kriging interpolation is an efficient spatial interpolation technique that can evaluate the spatial correlation between data points at different locations based on the variation function, thereby performing accurate interpolation. The following is the detailed process of Kriging interpolation:
[0107] Kriging interpolation assumes that points that are close to each other have higher similarity, and uses the variation function to quantify the relationship between the distance between sample points and their similarity, which is used as a weight to estimate unknown points.
[0108] Variogram formula:
[0109] The variogram γ(h) is used to describe the spatial autocorrelation of sample values at distance h. Its calculation formula is usually:
[0110] ;
[0111] Among them, N(h) is the number of sample pairs with distance h, Z(x i ) and Z(x i +h) is the distance h at x i and x i + sample value of h.
[0112] Then, using the variogram function, we solve the following linear system to determine the weight λ i :
[0113] ;
[0114] In addition, the unbiasedness condition needs to be met:
[0115] ;
[0116] All the observation data after the above processing are unified into the OB (ObserveCorrected) dataset. The OB dataset includes three types of data: station observation data, satellite sea temperature data, and wave data, all of which are processed into a unified 0.25°×0.25° spatial resolution and 1 hour temporal resolution.
[0117] 3. For historical reanalysis data sets: The initial spatial resolution of the reanalysis data is about 25 km, and the WRF preprocessing system (WPS, WRF Preprocessing System) is used for downscaling. The WRF preprocessing system can reduce the resolution of the reanalysis data to 1 km through a multi-step processing chain, including terrain processing, static data interpolation and dynamic adaptation, thus meeting the high-resolution requirements. Then, the three-dimensional variational assimilation technology (3D-Var) in the WRFDA assimilation system is used to assimilate the historical observation data and reanalysis data before preprocessing. Three-dimensional variational assimilation technology is a method that combines observational data with the background field (forecast field) of a numerical model to obtain the optimal initial field. It can minimize the error between the observational data and the model background field, integrate the observational data into the reanalysis data, and generate assimilated reanalysis data with a resolution of 1 km. The objective function J(x) of 3D-Var is defined as:
[0118] ;
[0119] Where x is the analysis field, that is, the result after assimilation.
[0120] x b It is the background scene.
[0121] y is the observed data.
[0122] H(x) is the observation operator, which transforms the model space into the observation space.
[0123] B is the background error covariance matrix.
[0124] R is the observation error covariance matrix.
[0125] The DA-RE dataset generated after assimilation only contains U and V wind speed data as label values for model training.
[0126] 3. Data Cleaning and Standardization
[0127] The preprocessed data is cleaned to remove outliers, missing values and their corresponding time data. The cleaned data set is standardized for neural network processing. The specific steps are as follows:
[0128] 1. Data cleaning
[0129] Outlier processing: Use statistical methods to detect and remove outliers in the data set, and use the 3σ criterion to identify and remove values that exceed 3 times the standard deviation. The formula is as follows:
[0130] ;
[0131] Among them, x i represents the data point, μ represents the mean of the data, and σ represents the standard deviation of the data.
[0132] Missing value processing: Process missing values in the data set and directly delete records with missing values; for time series data, use linear interpolation to fill in missing values. The linear interpolation formula is as follows:
[0133] ;
[0134] Among them, t is the time point of missing value, t1 and t2 are the two time points before and after, and x(t1) and x(t2) are the corresponding values.
[0135] 2. Standardization method: Standardize the cleaned data to make it suitable for the input requirements of the neural network. Use the z-score method for standardization, the formula is as follows:
[0136] ;
[0137] Among them, z is the standardized value, x is the original value, μ is the mean, and σ is the standard deviation.
[0138] 3. Dataset Division
[0139] Training set: 70% of the data set is divided into training sets for model training.
[0140] Validation set: 30% of the dataset is divided into validation set for model hyperparameter tuning and validation.
[0141] 4. CNN downscaling model
[0142] This step uses the convolutional neural network (CNN) method, mainly based on the FC dataset, and integrates the sea temperature and wave datasets as the multi-channel input of the model. The specific process is:
[0143] 1. Model input: The multi-channel input data is mainly based on the FC dataset, which is integrated with the sea temperature dataset and the wave dataset. In order for the multi-channel input data to be recognized by the convolutional neural network (CNN), it is necessary to process the data into a four-dimensional array format (N, H, W, C).
[0144] 2. Convolution layer design: Design the convolution kernel size and step size, the number and depth of convolution layers, build the model convolution layer, extract the key features in the meteorological data, and the convolution calculation formula is:
[0145] ;
[0146] Among them, K is the convolution kernel, b is the bias term, σ is the activation function, and F ij It is the feature map obtained after convolution;
[0147] 3. Activation function selection: Select ReLU (RectifiedLinearUnit) as the activation function to perform nonlinear mapping on the output of the convolution layer to enhance the model's expressiveness and training efficiency. The ReLU formula is: .
[0148] 4. Pooling layer design: The pooling layer reduces the feature dimension of the model, improves the model's abstraction ability, reduces the number of parameters and the amount of calculation, and retains important meteorological feature information. The maximum pooling method is used to further enhance the feature extraction effect by selecting the maximum value in the convolution result. A 2×2 maximum pooling layer is added after each convolution layer. The maximum pooling formula is as follows:
[0149] ;
[0150] Among them, P ij is the feature map after pooling, F i+m,j+n The feature value output by the convolutional layer. Through the maximum pooling operation, it is ensured that the features of multi-channel input data (including FC dataset, sea temperature data and wave data) can be effectively extracted and utilized, laying the foundation for the subsequent fully connected layer to generate accurate downscaled output.
[0151] 5. Fully connected layer design: The main purpose of the fully connected layer is to summarize the features after convolution-activation-pooling and generate high-resolution output after downscaling. First, the dataset processed by the pooling layer, including the feature map output by the FC dataset, sea temperature data, and wave data, is flattened, and the flattened feature vectors are linearly combined through linear transformation W·P and bias b, and then the softmax activation function is applied to perform nonlinear mapping on the output, and finally a high-resolution output of the regression task is generated. The formula is as follows:
[0152] ;
[0153] Among them, W and b are the weights and biases of the fully connected layer, P is the output feature of the pooling layer after flattening, and y is the final output result. Through this design, the features of multi-channel input data (including FC dataset, sea temperature data and wave data) are effectively integrated.
[0154] 5. LSTM feature transfer model
[0155] Based on the downscaling of CNN, the long short-term memory network (LSTM) is introduced to process time series features and capture the dynamic characteristics of wind farm data changing over time. The following are the steps of the LSTM feature transfer model:
[0156] 1. Use the downscaled output grid of CNN as the input of LSTM model
[0157] The output of the CNN model is a grid of wind field data, with each grid point containing elements such as wind speed and wind direction. We supplement this data with the OB dataset and organize it at hourly intervals to form a three-dimensional data array, which includes the time step (T), grid point (N), and the features of each grid point (F).
[0158] 2. Constructing time series feature input
[0159] The purpose of constructing the time series feature input is to convert the grid data output by CNN into a format suitable for LSTM processing. We integrate the data within 24 hours (i.e. 24 time steps) into a complete input sequence to capture the periodic changes of the wind field within a day.
[0160] 3. Design LSTM layer
[0161] Each LSTM layer is configured with 512 hidden units to process high-dimensional input data, taking into account the complexity and dynamics of meteorological data. In order to capture long-term dependencies and improve processing efficiency, each LSTM unit contains the following structure:
[0162] Input gate: adjusts the amount of new input information;
[0163] Forget gate: determines how much previous information to retain;
[0164] Output gate: controls how much information is output to the next layer or output layer.
[0165] The formula of the LSTM model is as follows:
[0166] ;
[0167] ;
[0168] ;
[0169] ;
[0170] ;
[0171] ;
[0172] in, It's the Gate of Forgetfulness. is the input gate, is a candidate memory, is a memory unit, is the output gate, is the hidden state, W and b are weight and bias parameters, σ is the sigmoid activation function, and tanh is the hyperbolic tangent activation function.
[0173] 4. Build LSTM network
[0174] Input layer: Receives the downscaled output from CNN, where each time step includes 200×200 grid data and each grid point has 6 features. These data are recorded every 1 hour and accumulated for 24 hours to form a (24,40000,6) three-dimensional array input to the LSTM network.
[0175] The first LSTM layer: contains 512 hidden units, processes 24 time steps of input, each time step has 40,000 grid points, each grid point has 6 features, returns the complete sequence data, and provides basic data and residual connection input for the next layer.
[0176] Residual connection: The output of the first layer is directly added to the input of the second layer to enhance the information flow and prevent the gradient vanishing problem.
[0177] The second LSTM layer is also configured with 512 hidden units, receiving the output from the first layer (enhanced by residual connections), keeping the number of time steps and grid points unchanged, but the number of features becomes 300, i.e. (24,40000,300).
[0178] Attention mechanism layer: Processes the output of the second LSTM layer, and calculates the attention weight of each time step through a fully connected layer and a softmax function. This layer uses the "W_attention" 512×1 weight matrix and 1×1 bias to calculate the weighted importance of each time step and output a weighted average context vector with a dimension of 24×512.
[0179] The third LSTM layer processes the context vector from the attention mechanism layer. It is also configured with 512 units, but only returns the output of the last time step to provide the necessary features for the final prediction task.
[0180] Output layer: It is a fully connected layer, containing 40,000 units, each unit corresponds to the wind forecast of a grid point. Considering that the wind factor is a continuous variable, a linear activation function is used for regression prediction. The output of this layer is the predicted value of the wind speed of all 40,000 grid points at a certain moment in the future, forming a 40,000-dimensional vector.
[0181] 5. Model parameter setting
[0182] Learning rate: The Adam optimizer is used and the initial learning rate is set to 0.001.
[0183] Batch size: Set to 32 to balance training time and model performance.
[0184] Training rounds: Initially set to 100 rounds, whether to increase or decrease the training rounds depends on the performance on the validation set.
[0185] Loss function: The root mean square error (RMSE) is used to calculate the difference between the model output and the label value DA-RE dataset.
[0186] 6. Model training and tuning
[0187] According to the constructed CNN-LSTM model, the training set is used for training, the model parameters are optimized based on the back propagation algorithm, information is passed to the input layer layer by layer, the gradient of each layer parameter is calculated, and the model parameters are updated and adjusted to minimize the loss function. Then the validation set is used to evaluate the model performance and further adjust the model to improve the effect. The specific technical details are as follows:
[0188] 1. Back propagation and parameter update: In each iteration, the model calculates the predicted output through forward propagation, and calculates the gradient of the loss function with respect to each parameter through the back propagation algorithm, and updates the parameters using the Adam optimizer. The formula is:
[0189] ;
[0190] Among them, θ represents the model parameters, η is the learning rate, and m t and v t are the first and second moment estimates and ε is a small constant to prevent division by zero.
[0191] 2. Loss function: Use root mean square error (RMSE) as the loss function, the formula is:
[0192] ;
[0193] Where n is the number of samples, is the predicted value of the model, is the actual value.
[0194] 3. Hyperparameter tuning: By evaluating the model performance on the validation set, adjust hyperparameters such as learning rate, batch size, number and size of network layers, and adjust them through multiple iterations to ensure the generalization ability of the model.
[0195] 4. Early stopping method: If the loss does not decrease significantly after 10 consecutive training cycles, the training is terminated early.
[0196] 5. Model performance evaluation: After each training cycle, the validation set is used to evaluate the performance of the model, and the model prediction accuracy, recall rate, F1 score and other indicators are evaluated to achieve the best performance.
[0197] Through this rigorous training and tuning process, the CNN-LSTM model can effectively process complex spatiotemporal data and improve its ability to invert changes in offshore wind fields.
[0198] 7. Integrated Application
[0199] The trained model is applied to actual business, and the current numerical model and real-time data are input into the model to achieve real-time inversion of offshore wind farms. This invention aims to improve the accuracy and practicality of offshore wind farm data through advanced deep learning technology, and has important practical application value for meteorological forecasting and related research fields. The main application areas are:
[0200] 1. Improve the accuracy of weather forecasts: The high-precision wind field data provided by the model can directly improve the accuracy of storm and extreme weather forecasts, which is crucial for disaster prevention and emergency management.
[0201] 2. Environmental monitoring and research: Refined wind field data provides valuable information for studying climate change, helping researchers better understand changes in the climate system.
[0202] 3. Public safety and emergency response: It helps governments and rescue agencies develop more effective evacuation plans and emergency measures.
[0203] 4. Wind power station optimization: Optimize the layout of wind turbines in offshore or coastal areas to improve power generation efficiency.
[0204] 5. Maritime navigation and safety: Helps ships plan safer routes, avoid bad weather, and save time and costs.
[0205] 6. Nuclear power plant safety: Help nuclear power plant managers adjust safety measures in a timely manner, such as optimizing the operation of the cooling system and assessing the risk diffusion path after an accident, to ensure nuclear safety and protection of the surrounding environment.
[0206] Disadvantages of the existing wind field inversion technology based on dynamic downscaling:
[0207] High computing resource requirements: Dynamical downscaling relies on complex physical models, which results in extremely high computing resource requirements, including large amounts of processor time and memory.
[0208] Slow processing speed: Due to the need to simulate detailed physical processes, the processing time of dynamic downscaling methods is usually long and the efficiency is low. This disadvantage is particularly obvious for meteorological elements such as offshore wind farms that require real-time inversion, which greatly limits its use in applications that require fast response.
[0209] Model setup and maintenance are complex: Setting up and maintaining high-resolution regional climate models requires professional meteorological technical knowledge and has a high threshold for use.
[0210] The disadvantages of Huang's existing technology based on statistical downscaling wind field inversion technology are:
[0211] Highly dependent on historical data: The accuracy of statistical downscaling is highly dependent on the amount and quality of available historical data. Its accuracy and reliability will be greatly reduced in areas where data are scarce or of poor quality, especially in offshore areas.
[0212] Limited generalization: Such approaches are often based on climate patterns in a specific region and are difficult to generalize to other regions or maintain accuracy when climate conditions change significantly.
[0213] The present invention introduces an improved CNN-LSTM technology, adds residual connections and attention mechanisms, so that the model can more effectively focus on important features in the data, especially when dealing with complex and dynamically changing meteorological conditions, and can achieve limited inversion of wind farm data. This method improves the precision of offshore wind farm data processing and the accuracy of prediction.
[0214] The present invention adopts a multi-source data integration strategy. By integrating multiple data sets such as sea temperature, waves, satellite and ground observation stations, and historical reanalysis data, the characteristic factors of offshore wind fields are fully captured, the input data range of the model is expanded, multi-dimensional meteorological information is provided, and the model's adaptability to real-time environmental changes is enhanced. By integrating these multi-source data, the model can correct the prediction results in real time while maintaining high accuracy, thereby improving the reliability of the output data. In addition, sea temperature and wave data are less used in offshore wind field research. The present invention incorporates ocean data into the model as an auxiliary input, and innovatively optimizes the refined inversion method of offshore wind fields.
[0215] The present invention significantly improves the ability of data preprocessing and data cleaning. Through data assimilation technology, adaptive filtering, constant value detection mechanism, and automated cleaning algorithm, the quality and consistency of input data are ensured to ensure that data sets from different sources can be effectively integrated and unified to the same spatial and temporal scales. Through these methods, not only the accuracy of data processing is improved, but also the stability of the model in complex environments is enhanced.
[0216] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. An offshore wind field inversion method based on an improved CNN-LSTM network collects historical data sets of different resolutions, characterized in that: The following steps are involved: S1. Collect historical forecast data sets, generate FC data sets after preprocessing, collect historical observation data sets, historical satellite sea temperature data sets, and historical wave data sets, generate OB data sets after preprocessing, collect historical reanalysis data sets, generate DA-RE data sets after preprocessing, as label values for model training; S2. Clean and standardize the preprocessed historical data set, and divide the historical data set into a training set and a validation set. Fuse the FC data set in the training set with the historical satellite sea temperature data set and the historical wave data set, input the multi-channel CNN model, and after processing by the convolution layer, activation function, pooling layer, and fully connected layer, output the downscaled high-resolution meteorological features and integrate them. S3. The output of the CNN model is integrated with the OB data set as the input of the LSTM model, and the time series feature input is constructed to adapt to the LSTM processing format. The LSTM layer including the forget gate, input gate, and output gate is designed to process high-dimensional input data. The constructed LSTM network includes an input layer, two LSTM layers, an attention mechanism layer, a third LSTM layer, and the final fully connected output layer for wind speed prediction. The root mean square error between the model output and the label value DA-RE data set is used as the loss function; S4. According to the constructed CNN-LSTM model, continue to train with the training set, pass information to the input layer layer by layer based on the back propagation algorithm, calculate the gradient of the parameters of each layer, update and adjust the model parameters to minimize the loss function; finally, use the validation set to evaluate the model performance and further adjust the model parameters.
2. According to claim 1, a method for offshore wind field inversion based on an improved CNN-LSTM network is characterized in that: The preprocessing process of the historical forecast data set is: The linear interpolation method is used to improve the time resolution. By connecting the straight line between two known time data points, the value of the middle point is estimated. Assume that t1 and t2 are two known time points, and the corresponding forecast data values are v1 and v2 respectively. For any time point t between t1 and t2, its data value v is calculated by the following linear interpolation formula: ; Among them, t1, t2 and t are the start time, end time and interpolation time respectively, v1 and v2 are the data values at time points t1 and t2, and the FC data set is obtained.
3. The offshore wind field inversion method based on the improved CNN-LSTM network according to claim 1 is characterized in that: The preprocessing process of the historical observation data set is: For observation data at discrete points, an empty array with the same horizontal resolution as the FC dataset is created. By calculating the longitude and latitude distance between the station and the nearest grid point, the observation data is filled into the corresponding nearest grid point, while the grid points not involved remain empty; For the sea temperature data and ocean wave data, the Kriging interpolation method is used to interpolate these data to the same grid locations as the FC dataset; Kriging interpolation uses the variogram to quantify the relationship between the distance and similarity of sample points, and uses this as a weight to estimate unknown points; the variogram γ(h) is used to describe the spatial autocorrelation of sample values at distance h; its calculation formula is: ; Among them, N(h) is the number of sample pairs with distance h, Z(x i ) and Z(x i +h) is the distance h between xi and x i + sample value of h; Using the variation function, the weight λ is determined by the following linear system: i : ; And it satisfies the unbiasedness condition: ; All processed observation data are unified into the OB data set.
4. The offshore wind field inversion method based on the improved CNN-LSTM network according to claim 1 is characterized in that: The preprocessing process of the historical reanalysis data set is as follows: The WRF preprocessing system is used for downscaling. Then, the three-dimensional variational assimilation technology 3D-Var in the WRFDA assimilation system is used to assimilate the historical observation data and reanalysis data before preprocessing. The objective function J(x) of 3D-Var is defined as: ; Where x is the analysis field, i.e. the result after assimilation, x b is the background field, y is the observation data, H(x) is the observation operator, which converts the model space to the observation space, B is the background error covariance matrix, and R is the observation error covariance matrix; the DA-RE dataset generated after assimilation only contains U and V wind speed data as label values for model training.
5. The offshore wind field inversion method based on the improved CNN-LSTM network according to claim 1 is characterized in that: The process of data cleaning and standardization of historical data sets is as follows: Statistical methods are used to detect and remove outliers in the data set, and the 3σ criterion is used to identify and remove values that exceed 3 times the standard deviation range; the formula is as follows: ; Among them, x i represents the data point, μ represents the mean of the data, and σ represents the standard deviation of the data; To process missing values in the data set, directly delete the records with missing values; for time series data, use linear interpolation to fill missing values. The linear interpolation formula is as follows: ; Among them, t is the missing value time point, t1 and t2 are the two previous and next time points, and x(t1) and x(t2) are the corresponding values; The cleaned data is standardized to adapt the data to the input requirements of the neural network. The z-score method is used for standardization. The formula is as follows: ; Among them, z is the standardized value, x is the original value, μ is the mean, and σ is the standard deviation.
6. The offshore wind field inversion method based on the improved CNN-LSTM network according to claim 1 is characterized in that: The specific training process of the CNN model is: The multi-channel input data is fused with the historical satellite sea temperature dataset and the historical ocean wave dataset using the FC dataset, and the input data is processed into a four-dimensional array format (N, H, W, C); Design the convolution kernel size and step size, the number and depth of convolution layers, build the model convolution layer, extract the key features in the meteorological data, and the convolution calculation formula is: ; Among them, K is the convolution kernel, b is the bias term, σ is the activation function, and F ij It is the feature map obtained after convolution; Select ReLU as the activation function to perform nonlinear mapping on the output of the convolutional layer to enhance the model's expressiveness and training efficiency. The ReLU formula is: ; The feature dimension of the model is reduced through the pooling layer. The maximum pooling method is used to further enhance the feature extraction effect by selecting the maximum value in the convolution result. A 2×2 maximum pooling layer is added after each convolution layer. The maximum pooling formula is as follows: ; Among them, P ij is the feature map after pooling, F i+m,j+n It is the feature value output by the convolution layer; Fully connected layer: Flatten the feature maps of the datasets processed by the pooling layer, including the FC dataset, the historical satellite sea temperature dataset, and the historical wave dataset. Linearly combine the flattened feature vectors through linear transformation W·P and bias b, and then apply the softmax activation function to perform nonlinear mapping on the output, and finally generate high-resolution output for the regression task. The formula is as follows: ; Among them, W and b are the weights and biases of the fully connected layer, P is the flattened output feature of the pooling layer, and y is the final output result.
7. The offshore wind field inversion method based on the improved CNN-LSTM network according to claim 1 is characterized in that: The specific training process of the LSTM model is: The output of the CNN model is a wind farm data grid, where each grid point contains wind speed and wind direction elements. The wind farm data grid is supplemented with the OB data set and organized at hourly intervals to form a three-dimensional data array, which includes time steps (T), grid points (N), and features of each grid point (F). The data within 24 time steps are integrated into a complete input sequence. Each LSTM layer is configured with 512 hidden units to process high-dimensional input data. Each LSTM unit contains an input gate, a forget gate, and an output gate: The formula of the LSTM model is as follows: ; ; ; ; ; ; in, It's the Gate of Forgetfulness. is the input gate, is a candidate memory, is a memory unit, is the output gate, is the hidden state, W and b are weight and bias parameters, σ is the sigmoid activation function, and tanh is the hyperbolic tangent activation function; The input layer is used to receive the downscaled output from the CNN model, where each time step includes 200×200 grid data and each grid point has 6 features; it is recorded once every hour and accumulated for 24 hours to generate a three-dimensional array of (24,40000,6) to input into the LSTM model; The first LSTM layer contains 512 hidden units, processes 24 time steps of input, each time step has 40,000 grid points, each grid point has 6 features, returns the complete sequence data, and provides the next layer with basic data and residual connection input; the residual connection is used to add the output of the first LSTM layer directly to the input of the second LSTM layer; The second layer of LSTM is also configured with 512 hidden units, receiving the output from the first layer enhanced by residual connections, keeping the number of time steps and grid points unchanged, and the number of features becomes 300, i.e. (24, 40000, 300); The attention mechanism layer is used to process the output of the second layer LSTM. It calculates the attention weight of each time step through a fully connected layer and a softmax function. This layer uses the "W_attention" 512×1 weight matrix and 1×1 bias to calculate the weighted importance of each time step and output a weighted average context vector with a dimension of 24×512. The third LSTM layer is used to process the context vector from the attention mechanism layer. It is also configured with 512 units and only returns the output of the last time step. The output layer is a fully connected layer, which contains 40,000 units. Each unit corresponds to the wind forecast of a grid point. The linear activation function is used for regression prediction. The output of the output layer is the predicted value of the wind speed of all 40,000 grid points at a certain moment in the future, forming a 40,000-dimensional vector.
8. The offshore wind field inversion method based on the improved CNN-LSTM network according to claim 1 is characterized in that: The model parameters of the CNN-LSTM model are as follows: The Adam optimizer was used, and the initial learning rate was set to 0.
001. The batch size was set to 32 to balance the training time and model performance. The number of training rounds was initially set to 100, and the number of training rounds was adjusted according to the performance of the validation set. The root mean square error between the model output and the label value DA-RE dataset was calculated as the model loss function.
9. The offshore wind field inversion method based on the improved CNN-LSTM network according to claim 1, characterized in that: The specific process of model training through the training set is: In each iteration of the model, the model calculates the predicted output through forward propagation, and calculates the gradient of the loss function with respect to each parameter through the back propagation algorithm, and updates the parameters using the Adam optimizer. The formula is: ; Among them, θ represents the model parameters, η is the learning rate, and m t and v t are the first-order and second-order moment estimates, and ε is the zero-proof constant; Using the root mean square error as the loss function, the formula is: ; Where n is the number of samples, is the model's predicted value, is the actual value; By evaluating the model performance on the validation set, adjusting the learning rate, batch size, number and size of network layers, and adjusting them through multiple iterations; If the loss function does not decrease significantly after 10 consecutive training cycles, the training will be terminated early. After each training cycle, the validation set is used to evaluate the performance of the model and the accuracy, recall rate and F1 score of the model prediction to ensure that the model performance meets the preset requirements.
