An effective wave height early warning method based on empirical mode decomposition and deep learning
By combining empirical mode decomposition and Transformer encoder, the problems of high computational resource consumption and slow speed of existing effective wave height prediction methods are solved, enabling accurate classification and real-time early warning of wave levels, thus ensuring the safety of marine equipment and personnel.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2026-03-06
AI Technical Summary
In the field of wave energy harvesting, existing effective wave height prediction methods suffer from high computational resource consumption, long computation time, slow model training and inference speed, and insufficient research on time series classification tasks, making it difficult to achieve accurate classification of wave levels and real-time early warning.
The original time series was preprocessed using the empirical mode decomposition method, features were extracted using a Transformer encoder, and classification was performed using a multilayer perceptron to achieve hierarchical classification of the effective wave height.
It improved the training and inference speed of the model, reduced computational overhead, and enabled accurate classification and real-time early warning of significant wave levels, thus ensuring the safety of maritime equipment and personnel.
Smart Images

Figure CN116484271B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an effective wave height early warning method based on empirical mode decomposition and deep learning. Background Technology
[0002] Ocean waves are an important renewable energy source. Their power flow intensity below the water surface ranges from 0.1-0.3 kW / m² to 2-3 kW / m², which is 6 levels higher than that of surface wind energy. Furthermore, ocean wave energy is more reliable than wind energy. Although ocean wave power generation technology is not yet fully mature, it has broad application prospects in the future energy sector. Significant wave heights (SWHs) are one of the important factors in the marine environment. Real-time capture and early prediction of SWHs are crucial for the effective utilization of ocean wave energy. For ocean power generation devices, there is a certain range of SWHs that can be used to harvest energy. When SWHs are too low or too high, the power generation device should be shut down to reduce wear and tear on the mechanical components. Accurate prediction of SWHs is of great significance for ocean wave energy harvesting.
[0003] Significant wave heights (SWHs) are a crucial factor in the marine environment. For ocean power generation systems, the SWHs available for energy harvesting fall within a certain range. When SWHs are too low or too high, the power generation system should be shut down to minimize wear and tear on the mechanical components. Accurately predicting SWH levels helps wave power generation systems adjust and respond promptly to different wave levels, minimizing the possibility of equipment damage. Real-time acquisition and prediction of SWH levels are of paramount importance for wave energy harvesting.
[0004] Significant wave height refers to the actual wave height value statistically analyzed according to certain rules. Since ocean waves are actually random combinations of waves with different heights, periods, and directions of travel, the height of a single wave is not representative. Therefore, in any wave group consisting of n waves, the wave heights are arranged from largest to smallest, and the first n / 3 waves are identified as significant waves. The height and period of the significant waves are then equal to the average height and average period of these n / 3 waves.
[0005] Empirical Mode Decomposition (EMD) decomposes signals based on the time-scale characteristics of the data itself, without requiring any pre-defined basis functions. Theoretically, EMD can be applied to the decomposition of any type of signal, thus offering significant advantages in processing non-stationary and nonlinear data. It is suitable for analyzing nonlinear and non-stationary signal sequences and boasts a high signal-to-noise ratio. The purpose of EMD decomposition of a data signal is to obtain its intrinsic mode functions. An intrinsic mode function must satisfy the following two conditions: (1) The number of local extrema and zero-crossings must be equal or differ by at most one over the entire time range; (2) At any given time point, the average of the envelopes of the local maxima (upper envelope) and the envelopes of the local minima (lower envelope) must be zero.
[0006] Chinese patent application CN115659828A discloses a wave height prediction model and device. This method employs a theological learning approach with an encoder-decoder structure. The encoder encodes the features of wave height-related ocean multi-element time series, outputting high-dimensional ocean multi-element features; the decoder concatenates the obtained high-dimensional features with a zero matrix as input, outputting the predicted wave height. This method uses dilated convolution and self-attention mechanisms to capture the long-term correlation of wave height time series, achieving temporal prediction of significant wave height. However, this patent treats wave height time series prediction as a regression problem in machine learning, while the field of ocean energy harvesting focuses more on predicting significant wave height levels. Therefore, this method has certain limitations for the field of ocean energy harvesting.
[0007] Existing methods for predicting significant wave height can be mainly divided into three categories: numerical simulation methods, recurrent neural network (RNN) methods, and convolutional neural network (CNN) methods. Numerical simulation methods, represented by third-generation wave models, can extrapolate future wave trends from ocean dynamics theory. However, this extrapolation process requires solving complex Navier-Stokes equations, which relies on massive historical datasets and computational power. This results in high computational resource consumption and long processing times. For example, predicting the significant wave height two hours in advance might take significantly longer than two hours using numerical simulation methods. Therefore, numerical simulation methods are primarily tools to help researchers understand wave changes and have limited practical application value. With the rise of deep learning in recent years, researchers have found that recurrent neural network structures, used in natural language processing for processing text sequences, are also well-suited for time series forecasting tasks such as weather forecasting. Many researchers have already applied RNN models to predict significant wave height, achieving significant improvements in both speed and accuracy compared to numerical simulation methods. However, recurrent neural networks, represented by LSTM, have an inherent dependency in their network structure. The input of the current neuron depends on the output of the previous neuron, which prevents the model from being parallelized in training and inference, thus limiting the speed of model training and inference. Therefore, it still has significant limitations for wave height prediction tasks with high timeliness requirements.
[0008] For wave energy harvesting missions, predicting an accurate significant wave height is not particularly meaningful; the greater focus is on classifying wave levels, that is, determining a range of wave heights. The task of predicting significant wave height then shifts from a regression problem to a classification problem, specifically a time series classification problem. Currently, research on the time series classification of significant wave height is relatively scarce, with limited related studies both domestically and internationally.
[0009] Existing methods for applying Empirical Mode Decomposition (EMD) typically involve first performing mode decomposition on the time series, inputting each mode into different model branches for prediction, and then merging the prediction results from each mode to obtain the final prediction result. For time series classification tasks, this approach of predicting each mode separately, merging the predictions to obtain the final classification sequence is cumbersome and unnecessary. It also makes the model more complex, increases computational overhead, and reduces model inference speed. Summary of the Invention
[0010] To address the problems of existing technologies, this invention proposes an efficient wave height prediction method based on mode decomposition and deep learning. This method employs modal empirical mode decomposition (EMD) to preprocess and decompose the original time series into various modes. A Transformer-structured encoder is used to extract features from each mode. The Transformer-structured neural network can capture global features of the time series data in parallel, accelerating model training and inference while still effectively extracting features from the time series data. Finally, a multilayer perceptron is used to classify the extracted high-semantic features to obtain the final result.
[0011] This invention can be achieved through the following technical solutions:
[0012] An efficient wave height prediction method based on mode decomposition and deep learning includes the following steps:
[0013] E. Obtain sea surface wave height data;
[0014] F. Preprocessing sea surface wave height data;
[0015] G. Create a dataset based on the wave height threshold, input time series length, and prediction time length parameters;
[0016] H. Effective wave height warnings can be obtained by training based on the dataset.
[0017] Furthermore, step B) includes missing value completion. If there are missing valid wave height data, linear interpolation is used to complete these missing data. The missing data is completed using the SciPy library of Python.
[0018] Further, step C) includes:
[0019] 1) Dataset partitioning: The complete dataset sequence is divided into training and test sets according to time sequence, with the first 75% of the time series used as the model training set and the last 25% used as the model test set;
[0020] 2) Dataset Construction: The original time series of length L is divided into datasets according to a window size w. h Divided into Lw h +1 time series data, for each data point of length w h time series Its classification labels are determined by the prediction time L h Effective wave height high threshold A d Effective wave height low threshold A s Three parameters determine, if Greater than A d If , then the label of the time series is 1; if The effective wave height at time A is less than A s If the label of the time series is 0, then the label of the time series is 0; while between A d and A s Time series data between these points are discarded and not used as training data for the model, based on the window size w. h Predicted time L h Effective wave height high threshold A d Effective wave height low threshold A s The four parameters respectively construct the original time series L into four datasets that can be used by the model: high-level significant wave height training set, low-level significant wave height training set, high-level significant wave height test set, and low-level significant wave height test set;
[0021] 3) Dataset balancing: To avoid the impact of the imbalance in the number of samples between high-level and low-level significant wave heights on model training and testing, upsampling / downsampling methods are used to process the low-level significant wave height data to keep the number of data between high-level and low-level significant wave heights balanced.
[0022] 4) Data mixing and shuffling: After obtaining the training set and test set according to step 3), the high-level significant wave height training set and the low-level significant wave height training set are mixed and shuffled to obtain the final training set; the high-level significant wave height test set and the low-level significant wave height test set are mixed and shuffled to obtain the final test set.
[0023] Further, step D) includes:
[0024] 1) Model input and output: The model input is the historical time series of significant wave heights.
[0025] Its output is The probability p1 of a high level of effective wave height and
[0026] The probability p2 is the effective wave height at a low level;
[0027] 2) Empirical Mode Decomposition: For the effective wave height time series Empirical mode decomposition is performed to obtain multiple intrinsic mode functions; then the preprocessed effective wave height time series and intrinsic mode functions are superimposed on the channel and input into the next stage of the model;
[0028] 3) Feature extraction using the Transformer encoder: The Transformer encoder module accepts the original time series data and the intrinsic mode function after empirical mode decomposition as feature inputs. For the feature vector input to the Transformer encoder, it is first encoded by multi-head self-attention. The self-attention calculation formula is as follows:
[0029]
[0030] Where Q, K, and V represent the queries, keys, and values matrices, respectively. k The dimension of the keys matrix is represented by the feature vector after multi-head attention processing. Then, the feature vector is further processed by one-dimensional convolution, batch normalization, random dropout module and residual connection operation to obtain high-level semantic time series features.
[0031] 4) Feature Classifier: This module accepts the time series of high-level semantics extracted by the Transformer encoder as feature input. First, it uses global average pooling to reduce the dimension of the feature matrix. Then, it further processes and learns the features through a densely connected forward propagation network. It also uses random dropout to enhance the generalization of the model. Finally, it uses a two-layer fully connected network to obtain the final prediction result.
[0032] 5) Model training:
[0033] 6) Model inference: After the model training is completed, the effective wave height time series is input, and the classification probability of the effective wave height at future times can be obtained through model inference. Furthermore, the model inference results can be used to provide real-time early warning for marine energy harvesting devices, ensuring the safety of marine equipment and personnel.
[0034] Further, in step 4): the deep learning model uses two Transformer encoders, each Transformer encoder uses 6 attention modules, each attention module has a hidden layer size of 6, the number of input and output channels of the one-dimensional convolution inside each Transformer encoder is 256, the convolution kernel size is 1, and the random dropout rate is 0.1; the classifier uses a two-layer forward propagation network, each layer has 128 neurons, the random dropout rate is set to 0.4, and the activation function in the entire model is a linear rectified function.
[0035] Further, in step 5): the optimizer used for model training is Adam, the batch size is set to 32, and the initial learning rate is set to 0.001; a cosine dissipation learning adjustment strategy is used, and the loss function is the categorical cross-entropy loss (CCE), expressed as follows:
[0036]
[0037] In the formula, C represents the number of categories, C = 2; t c This represents the true classification of the time series; p c The model predicts that the time series is of class c probability.
[0038] By adopting the above technical solution, the present invention has the following beneficial effects:
[0039] (1) The empirical mode decomposition method and Transformer encoder feature extraction method proposed in this invention are not only applicable to the early warning of effective wave height, but also applicable to the classification and early warning tasks of other time series data;
[0040] (2) The original time series is preprocessed using the Empirical Mode Decomposition (EMD) method, which decomposes the original complex time series into multiple regular IMFs, thus eliminating the long-term trend fluctuations of each component. The frequencies of each IMF are different. Low-frequency IMFs can help the model grasp the long-term trend of the time series, while high-frequency IMFs can help the model learn local random terms that have a greater impact on prediction accuracy.
[0041] (3) Using a Transformer encoder based on self-attention mechanism to extract features from time series data, compared with numerical patterns and recurrent neural networks, can not only effectively reduce the long-range dependency problem and error accumulation problem in point-by-point iterative multi-step prediction, but also make full use of GPU to accelerate the model, thereby improving the accuracy and the model inference speed.
[0042] (4) In response to the problem of energy harvesting using effective wave height, a time series classification model was innovatively used to classify the levels of SWH, which not only reduced the difficulty of the task, but also simplified the model design to a certain extent. Attached Figure Description
[0043] Figure 1 This is a flowchart of the present invention;
[0044] Figure 2 This is a flowchart of the data preprocessing process of the present invention;
[0045] Figure 3 This is a structural diagram of the Transformer encoder of the present invention;
[0046] Figure 4 This is a structural diagram of the model of the present invention;
[0047] Figure 5 A comparison chart of experimental results for different encoders;
[0048] Figure 6 This is a comparative experimental image showing the presence and absence of EMD characteristics. Detailed Implementation
[0049] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification.
[0050] refer to Figure 1 As shown, an effective wave height prediction method based on mode decomposition and deep learning according to the present invention includes the following steps:
[0051] (1) Data Acquisition
[0052] Sea surface wave height data was obtained. The sea surface wave height data used in this invention comes from the Coastal Data Information Program (cdip, homepage https: / / cdip.ucsd.edu / ), and its data range is from 1975 to the present, with a time resolution of 30 minutes.
[0053] (2) Data preprocessing and dataset partitioning (2.1) Missing value completion
[0054] The obtained valid wave height data has some missing parts, so necessary data quality control is required. For these missing data, this invention uses a linear interpolation method to complete the interpolation and completion of missing data with the help of Python's SciPy library.
[0055] (2.2) Data partitioning
[0056] The complete dataset sequence is divided into training and test sets according to time sequence. The first 75% of the time series is used to build the model training set, and the last 25% is used to build the model test set.
[0057] (2.3) Dataset Construction
[0058] The original time series of length L is processed according to the window size w. h Divided into Lw h +1 time series data. For each time series data of length w h time series Its classification labels are determined by the prediction time L h Effective wave height high threshold A d Effective wave height low threshold A s Three parameters determine this. If Greater than A d If , then the label of the time series is 1; if The effective wave height at time A is less than A s If the label of the time series is 0, then the label of the time series is 0; while between A d and A s Time series data between these points will be discarded and will not be used as training data for the model.
[0059] Based on window size w h Predicted time L h Effective wave height high threshold A d Effective wave height low threshold A s The four parameters will respectively construct the original time series L into four datasets that can be used by the model: high-level effective wave height training set, low-level effective wave height training set, high-level effective wave height test set, and low-level effective wave height test set.
[0060] (2.4) Dataset Balancing
[0061] To avoid the impact of the imbalance in the number of samples between high-level and low-level significant wave heights on model training and testing, upsampling / downsampling methods are used to process the low-level significant wave height data, so that the number of data between high-level and low-level significant wave heights is balanced.
[0062] (2.5) Data mixing and shuffling
[0063] After obtaining the training and test sets through the above operations, the high-level significant wave height training set and the low-level significant wave height training set are mixed and shuffled to obtain the final training set; the high-level significant wave height test set and the low-level significant wave height test set are mixed and shuffled to obtain the final test set. The flowchart of data preprocessing is as follows. Figure 2 As shown.
[0064] (3) Effective wave height prediction model
[0065] (3.1) Model Input and Output
[0066] The model's input is a historical time series of significant wave heights. Its output is The probability p1 of a high level of effective wave height and p2 represents the probability of a low-level effective wave height.
[0067] (3.2) Empirical Mode Decomposition
[0068] For the effective wave height time series Empirical mode decomposition is performed to obtain multiple intrinsic mode functions (IMFs). The preprocessed effective wave height time series and IMFs are then superimposed on the channel and input into the next stage of the model.
[0069] Compared to the original time series, IMFs are more regular, partly because the aforementioned features can force the elimination of long-term trend fluctuations in each component, making IMFs more stable. Furthermore, during the decomposition process, as the frequency gradually decreases from high to low, localized, subtle random terms that significantly impact prediction accuracy are extracted from the original time series data, which also greatly improves the performance of time series classification.
[0070] (3.3) Transformer encoder
[0071] The Transformer encoder module accepts raw time-series data and IMFs (Information Models) derived from Empirical Mode Decomposition (EMD) as feature inputs. The feature vectors input to the Transformer encoder are first encoded using multi-head self-attention, calculated as follows:
[0072]
[0073] Where Q, K, and V represent the queries, keys, and values matrices, respectively. k This represents the dimension of the keys matrix.
[0074] Multi-head attention mechanisms can capture features of the input time series through matrix operations, overcoming the long-range dependency problem of recurrent neural networks. The feature vectors processed by multi-head attention can then be further processed through one-dimensional convolution, batch normalization, random dropout, and residual connection operations to obtain higher-level semantic time series features. The structure of the Transformer encoder is as follows: Figure 3 As shown.
[0075] (3.4) Feature Classifier
[0076] The feature classifier module accepts the time series of high-level semantics extracted by the Transformer encoder as feature input. To reduce the dimensionality of the feature matrix, this invention uses global average pooling to reduce the dimensionality of the feature matrix. Then, a densely connected forward propagation network is used to further process and learn the features. Random dropout is used to enhance the model's generalization ability. Finally, a two-layer fully connected network is used to obtain the final prediction result. The overall structure diagram of the model is shown below. Figure 4 As shown.
[0077] (4) Model Training
[0078] This invention is implemented using the Python language and the Keras framework, and performs GPU parallel training and testing on two RTX3070 graphics cards with 8GB of video memory.
[0079] The deep learning model employs two Transformer encoders, each using a 6-head self-attention module, with each attention module having 6 hidden layers. The one-dimensional convolutions within each Transformer encoder have 256 input and output channels, a kernel size of 1, and a random dropout rate of 0.1. The classifier uses a two-layer forward propagation network with 128 neurons per layer and a random dropout rate of 0.4. The entire model uses Rectified Linear Unit (ReLU) activation functions.
[0080] The optimizer used for model training is Adam, with a batch size of 32 and an initial learning rate of 0.001. A cosine dissipation learning adjustment strategy is used, and the loss function is the categorical cross-entropy loss (CCE), expressed as follows:
[0081]
[0082] In the formula, C represents the number of categories, and in this invention, C = 2; t c This represents the true classification of the time series; p c The model predicts that the time series is of class c probability.
[0083] (5) Model Reasoning
[0084] After the model training is completed, the significant wave height time series is input, and the classification probability of the significant wave height at future times can be obtained through model inference. Furthermore, the model inference results can be used to provide real-time early warning for marine energy harvesting devices, ensuring the safety of marine equipment and personnel.
[0085] (6) Experimental Results
[0086] This method uses a Transformer encoder to extract features from the time series of significant wave heights. Experimental results for different encoders are as follows: Experimental results show that the Transformer encoder performs best (e.g., ...). Figure 5 As shown in the figure, the second most common feature extraction method is the Long Short-Term Memory (LSTM) network. These experimental results demonstrate the feature extraction capabilities of the Transformer encoder.
[0087] This method uses EMD features to enhance the predictive power of the model, such as... Figure 6 The experiment shown is a comparison between having and not having the EMD feature. The experimental results demonstrate that the EMD feature can effectively enhance the model's ability to predict significant wave height.
[0088] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for significant wave height prediction based on modal decomposition and deep learning, characterized in that, It comprises the following steps: A. Obtain sea surface wave height data; B. Preprocess the sea surface wave height data; C. According to the wave height threshold, the input time series length, the prediction time length parameter, make the data set; D. According to the data set, the effective wave height early warning is obtained by training; The step D) comprises: 1) Model input and output: The input to the model is a historical time series of significant wave heights The output is The probability pi of a high level significant wave height and The probability p2 of a low level significant wave height; 2) Empirical Mode Decomposition: on the significant wave height time series Empirical Mode Decomposition is performed to obtain a plurality of intrinsic mode functions; the pre-processed significant wave height time series and the intrinsic mode functions are superimposed on the channel and input to the next stage of the model; 3) Feature extraction using Transformer encoder: the Transformer encoder module accepts the original time series data and the intrinsic mode function after empirical mode decomposition as feature input. For the feature vector input into the Transformer encoder, first, it is encoded by multi-head self-attention. The self-attention calculation formula is as follows: where Q, K, V represent three matrices of queries, keys, and values, d k represent the dimension of the keys matrix; the feature vector after multi-head attention processing is further processed by one-dimensional convolution, batch normalization, random dropout module, and residual connection operation to obtain time series features of high-level semantics; 4) Feature classifier: this module accepts the high-level semantic time series extracted by the Transformer encoder as feature input. First, the dimension of the feature matrix is reduced by using global average pooling operation; then the feature is further processed and learned by using the dense connected forward propagation network; the generalization of the model is enhanced by using random dropout; finally, two layers of fully connected network are used to obtain the final prediction result; 5) Model training: 6) Model inference: after the model training is completed, the effective wave height time series is input, and the classification probability of the future time effective wave height can be obtained by model inference. According to the model inference result, the offshore energy collection device is warned in real time, and the safety of offshore equipment and personnel is ensured.
2. The method of claim 1, wherein, The step B) comprises missing value completion. The obtained effective wave height data has missing values. For these missing data, linear interpolation method is used for completion, and SciPy library of Python is used to complete the interpolation of missing data.
3. The method of claim 1, wherein, The step C) comprises: 1) Data set division: the complete data set sequence is divided into training set and test set according to time sequence, wherein the first 75% of time series is used as model training set, and the last 25% is used as model test set; 2) Dataset Construction: The original time series of length L is divided into datasets of window size w. h Divided into Lw h +1 time series data, for each data point of length w h time series Its classification labels are determined by the prediction time L h Effective wave height high threshold A d Effective wave height low threshold A s Three parameters determine, if Greater than A d If , then the label of the time series is 1; if The effective wave height at time A is less than A s If the label of the time series is 0, then the label of the time series is 0; while between A d and A s Time series data between these points are discarded and not used as training data for the model, based on the window size w. h Predicted time L h Effective wave height high threshold A d Effective wave height low threshold A s The four parameters respectively construct the original time series L into four datasets that can be used by the model: high-level significant wave height training set, low-level significant wave height training set, high-level significant wave height test set, and low-level significant wave height test set; 3) Data set equalization: in order to avoid the influence of uneven sample quantity between high level effective wave height and low level effective wave height on model training and testing, upsampling / downsampling method is used to process low level effective wave height data, so that the data quantity between high level and low level effective wave height is balanced; 4) Data mixing and shuffling: after obtaining the training set and test set according to the operation of the step 3), the high level effective wave height training set and the low level effective wave height training set are mixed and shuffled to obtain the final training set; the high level effective wave height test set and the low level effective wave height test set are mixed and shuffled to obtain the final test set.
4. The method of claim 1, wherein: In the step 4), the deep learning model adopts two Transformer encoders, each of which uses 6 attention modules, the size of the hidden layer of each attention module is 6, the input and output channel numbers of one-dimensional convolution inside each Transformer encoder are both 256, the convolution kernel size is 1, and the random dropout rate used is 0.1; a double-layer forward propagation network is used in the classifier, the number of neurons of each layer is 128, the random dropout rate is set to 0.4, and the activation function in the whole model uses a linear rectifier function.
5. The method of claim 1, wherein: In the step 5), the optimizer used for model training is Adam, the batch size is set to 32, the initial learning rate is set to 0.001, the cosine decay learning adjustment strategy is used, and the loss function is a multi-classification cross-entropy loss (Categorical Cross-Entropy CCE) expressed as follows: In the formula, C represents the number of classifications, C = 2. t c a true classification representing the time series; p c a probability that the model predicts the time series is of class c.
Citation Information
Patent Citations
Wave height prediction model and device
CN115659828A
Sea wave height prediction method and system based on deep learning model
CN114445634A