Wave prediction method and system based on long short-term memory neural network

Through the wave prediction method based on LSTM, the problem of complex prediction and low accuracy of traditional physical models is solved, and fast response and high-precision real-time wave prediction are achieved.

CN119557641APending Publication Date: 2025-03-04YANGTZE RIVER DELTA RES INST OF NPU TAICANG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411608925.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

Traditional physical models are used for wave prediction processes that are complex, have long calculation time and insufficient prediction accuracy, making it difficult to meet the real-time prediction needs of fast response.

Method used

The wave prediction method based on long and short-term memory neural network (LSTM) is adopted to collect and preprocess wave data, and the LSTM network model is constructed, and the model is optimized through training and verification processes to improve prediction accuracy.

Benefits of technology

Real-time wave prediction with fast response is realized, which significantly improves prediction accuracy, can accurately predict various extreme sea conditions, and can easily achieve training and prediction of a variety of sea conditions data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557641A_ABST
    Figure CN119557641A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of ocean prediction, is used for performing short-term prediction on wave height information of waves, and particularly relates to a wave prediction method based on a long short-term memory neural network, which comprises the following steps: S1, collecting wave data; s2, carrying out data preprocessing on the collected wave data; s3, constructing an LSTM (Long Short Term Memory) network model; s4, the LSTM network model is trained; and S5, performing prediction effect evaluation on the trained LSTM network model. The method is suitable for performing short-term prediction on wave height information of waves, the training process covers wide extreme sea condition data, so that various extreme sea conditions can be accurately predicted, the decision coefficient of each group of experiments on the wave height data is up to 0.99, the prediction precision is remarkably improved, training and prediction of various sea condition data can be simply and conveniently realized, and the operation is convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of ocean information prediction, and specifically is a wave prediction method based on long short-term memory neural network. Background Art

[0002] In the field of traditional wave prediction, experts and scholars have long relied on physical model prediction methods, such as the Nearshore Wave Simulation (SWAN) method developed by Booij et al. and the wave model established by the International Wave Model Development Group (WAMDI). Physical models are based on the physical principles and equations of ocean dynamics and predict the effective wave height of waves through simulation calculations. One of the commonly used physical models is the numerical simulation model, which uses a model with high spatial resolution to simulate physical quantities such as ocean currents and waves, thereby predicting future changes in waves.

[0003] However, this type of method has a complex prediction process, a long calculation time, and insufficient prediction accuracy, and is not suitable for real-time prediction work that requires a quick response. Summary of the invention

[0004] The purpose of the present invention is to provide a wave prediction method and system based on long short-term memory neural network, which can meet the needs of real-time prediction work with fast response.

[0005] The purpose of the present invention can be achieved through the following technical solutions:

[0006] A wave prediction method based on long short-term memory neural network comprises the following steps:

[0007] Step 1: Collect wave data: collect wave height and wave crest period data;

[0008] Step 2: preprocess the collected wave data: normalize the collected wave data;

[0009] Step 3: Construct an LSTM network model: The LSTM model includes an input layer, an output layer, and a plurality of LSTM layers connected between the input layer and the output layer;

[0010] Step 4: Train the LSTM network model: For the same sea condition, input data with different sequence lengths, select the optimal sequence length of the input data based on the prediction results, and use the optimal sequence length of the input data to predict different sea conditions in turn;

[0011] Step 5: Evaluate the prediction effect of the trained LSTM network model: Verify the prediction effect by calculating the determination coefficient, mean square error, and average error of the samples to obtain the trained LSTM network model.

[0012] Furthermore, in the above-mentioned wave prediction method based on long short-term memory neural network, in the step 2, the collected wave data is normalized to the interval [0,1], and the normalization formula is as follows:

[0013]

[0014] Among them, x N is the normalized eigenvalue, x is the input data value, min(x) is the minimum value of the data, and max(x) is the maximum value of the data.

[0015] Furthermore, in the above-mentioned wave prediction method based on long short-term memory neural network, each of the LSTM layers includes a plurality of LSTM units, and the LSTM units are cyclically connected.

[0016] Furthermore, in the above-mentioned wave prediction method based on long short-term memory neural network, the LSTM unit includes an input gate i t , output gate o t and forget gate f t , the output of the previous unit is y t-1 , the current cell state is called c t ; The operation process of the LSTM unit is as follows: First, the network receives the input information x t , and create the candidate value z through formula (2) t ; Then according to formula (3), the candidate value z t AND input gate i t Multiply, determine the part of the input information sent to c t ; Then according to formula (4), the forget gate f t Decide to delete the previous unit state c t-1 According to formula (5), we can get the current unit state c t Finally, the output of the output gate is obtained by equation (6), and it is combined with the current unit state according to equation (7) to obtain the final output y of this unit t ;

[0017] z t =g(W c [x t ,y t-1 ]+b c ) (2)

[0018] i t =σ(W i [x t ,y t-1 ]+b i ) (3)

[0019] f t =σ(Wf [x t ,y t-1 ]+b f ) (4)

[0020] c t =i t z t +c t-1 f t (5)

[0021] o t =σ(W o [x t ,y t-1 ]+b o ) (6)

[0022] y t =g(c t ) t (7)

[0023] Among them, W and b refer to different weights and bias vectors respectively, σ refers to the sigmoid activation function, and g refers to the tanh activation function.

[0024] Furthermore, in the above-mentioned wave prediction method based on long short-term memory neural network, the calculation formulas of the determination coefficient, mean square error and average error of the samples are respectively:

[0025]

[0026] in, Represents the average value of the original data.

[0027] A wave prediction system based on a long short-term memory neural network, characterized in that it includes a program module corresponding to the steps of any of the above technical solutions, and executes the steps of the above wave prediction method based on a long short-term memory neural network when running.

[0028] A computer-readable storage medium stores a computer program, wherein the computer program is configured to implement the steps of the wave prediction method based on long short-term memory neural network described in any of the above technical solutions when called by a processor.

[0029] The present invention has the following beneficial effects:

[0030] The training process of the present invention covers a wide range of extreme sea condition data, and can therefore accurately predict various extreme sea conditions; the determination coefficient of each set of experiments on wave height data is as high as 0.99, which significantly improves the prediction accuracy; the method can easily realize the training and prediction of a variety of sea condition data, and is easy to operate. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 It is a flow chart of a wave prediction method based on a long short-term memory neural network in a specific embodiment of the present invention;

[0033] Figure 2 It is a schematic diagram of wave data in a specific embodiment of the present invention.

[0034] Figure 3 It is a structural diagram of an LSTM network model in a specific embodiment of the present invention.

[0035] Figure 4 Schematic diagram of the structure of an LSTM unit in a specific embodiment of the present invention.

[0036] Figure 5 It is a schematic diagram of prediction results of inputting data of different sequence lengths in a specific embodiment of the present invention.

[0037] Figure 6 It is a schematic diagram of the prediction results of different sea conditions when the optimal sequence length data is input in a specific embodiment of the present invention. DETAILED DESCRIPTION

[0038] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than 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.

[0039] Combination Figures 1 to 6 As shown, the present invention provides a wave prediction method based on long short-term memory neural network, such as Figure 1 As shown, the following steps are included:

[0040] Step 1: Collect wave data: The data uses wave height data collected from a pool experiment conducted by the COAST laboratory at the University of Plymouth, UK, such as Figure 2 As shown in the figure, these data include data of extreme sea conditions and typical sea conditions at the EMEC site over a fifty-year period, and the influence of the JONSWAP spectrum on waves is taken into account. The higher the shape factor (γ), the sharper the waves, and vice versa. A total of four data under different sea conditions are collected, as shown in Table 1:

[0041] Table 1: Wave data for different sea conditions

[0042]

[0043] Step 2: Preprocess the collected wave data: Normalize the collected wave data to the interval [0,1]. The normalization formula is as follows:

[0044]

[0045] Among them, x N is the normalized eigenvalue, x is the input data value, min(x) is the minimum value of the data, and max(x) is the maximum value of the data. Normalization is often used to preprocess data. It is conducive to the convergence of neural network training because when all inputs have the same magnitude, errors caused by different parameter ranges can be avoided. In addition, 20,000 data, about 150 seconds, are selected from the data set and divided into training set and test set in a ratio of 8:2 for model training and reconstruction.

[0046] Step 4: Build LSTM network model: Figure 3 As shown in the figure, the LSTM model includes an input layer, an output layer, and several LSTM layers connected between the input layer and the output layer. The output of the previous unit is used as the input of the next unit, and the output of the previous layer is used as the input of the next layer, and finally the output is obtained, as shown in Figure 4 As shown, the LSTM unit includes an input gate i t , output gate o t and forget gate f t , the output of the previous unit is y t-1 , the current cell state is called c t ; The operation process of the LSTM unit is as follows: First, the network receives the input information x t , and create the candidate value z through formula (2) t ; Then according to formula (3), the candidate value z t AND input gate i t Multiply, determine the part of the input information sent to c t ; Then according to formula (4), the forget gate f t Decide to delete the previous unit state c t-1 According to formula (5), we can get the current unit state c t Finally, the output of the output gate is obtained by equation (6), and it is combined with the current unit state according to equation (7) to obtain the final output y of this unit t ;

[0047] z t =g(Wc [x t ,y t-1 ]+b c ) (2)

[0048] i t =σ(W i [x t ,y t-1 ]+b i ) (3)

[0049] f t =σ(W f [x t ,y t-1 ]+b f ) (4)

[0050] c t =i t z t +c t-1 f t (5)

[0051] o t =σ(W o [x t ,y t-1 ]+b o ) (6)

[0052] y t =g(c t ) t (7)

[0053] Among them, W and b refer to different weights and bias vectors respectively, σ refers to the sigmoid activation function, g refers to the tanh activation function, and several LSTM layers consisting of 50 LSTM units are used as hidden layers, which are fully connected to the input layer and output layer through fully connected layers. The Adam optimizer is selected and the initial learning rate is set to 0.005. In order to avoid overfitting, the factor of reducing the learning rate is set to 0.1 and the number of iterations is set to 100 in the model.

[0054] Step 4: Train the LSTM network model: Figure 5 As shown in Figure 1, for sea condition #1, the input sequence length is set to 15, 30, 45, and 60 data respectively, and the wave is predicted for one minute. The optimal sequence length of the input data is selected to be 15 data, as shown in Figure 1. Figure 6 As shown, the optimal sequence length of the input data is used to predict the four sea conditions #1 to #4 in turn.

[0055] Step 5: Evaluate the prediction effect of the trained LSTM network model: Verify the prediction effect by calculating the determination coefficient, mean square error and average error of the sample, and obtain the trained LSTM network model. The determination coefficient R 2 The calculation formulas for RMSE, mean square error and MAE are:

[0056]

[0057] in, represents the average value of the original data. The prediction results are shown in Tables 2 and 3.

[0058] Table 2: Prediction results of LSTM network model for different input sequence lengths

[0059] Input length <![CDATA[R 2 ]]> R_MSE(m) NLAE(m) 15 0.9979 0.000573 0.000681 30 0.9948 0.000902 0.001400 45 0.9956 0.000834 0.000961 60 0.9939 0.000979 0.001349

[0060] Table 3: Prediction results of LSTM network model for different sea conditions

[0061] No. <![CDATA[R 2 ]]> ILMSE(m) MAE(m) #1 0.9979 0.000573 0.000681 #2 0.9962 0.000764 0.000735 #3 0.9984 0.002205 0.003485 #4 0.9990 0.001664 0.002404

[0062] Among them, the mean square error RMSE and the average error MAE are used to measure the deviation between the predicted value and the measured value of the wave parameters. The smaller the value, the higher the accuracy of the prediction model. 2 It is used to measure the goodness of fit of the predicted values ​​of wave parameters to the measured values. The value range is [0,1]. The closer the value is to 1, the better the prediction effect of the model.

[0063] In summary, the training process of the present invention covers a wide range of extreme sea condition data, and can therefore accurately predict various extreme sea conditions; the determination coefficient of each group of experiments on wave height data is as high as 0.99, which significantly improves the prediction accuracy; this method can easily realize the training and prediction of a variety of sea condition data, and is easy to operate.

[0064] The above contents are merely examples and explanations of the structure of the present invention. The technicians in this technical field may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the structure of the invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.

[0065] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0066] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A wave prediction method based on long short-term memory neural network, characterized in that: The following steps are involved: Step 1: Collect wave data: collect wave height and wave crest period data; Step 2: preprocess the collected wave data: normalize the collected wave data; Step 3: Construct an LSTM network model: The LSTM model includes an input layer, an output layer, and a plurality of LSTM layers connected between the input layer and the output layer; Step 4: Train the LSTM network model: For the same sea condition, input data with different sequence lengths, select the optimal sequence length of the input data based on the prediction results, and use the optimal sequence length of the input data to predict different sea conditions in turn; Step 5: Evaluate the prediction effect of the trained LSTM network model: Verify the prediction effect by calculating the determination coefficient, mean square error, and average error of the samples to obtain the trained LSTM network model.

2. A wave prediction method based on long short-term memory neural network according to claim 1, characterized in that: In the step 2, the collected wave data is normalized to the interval [0,1], and the normalization formula is as follows: Among them, x N is the normalized eigenvalue, x is the input data value, min(x) is the minimum value of the data, and max(x) is the maximum value of the data.

3. A wave prediction method based on long short-term memory neural network according to claim 1, characterized in that: Each of the LSTM layers includes a plurality of LSTM units, and the LSTM units are cyclically connected.

4. A wave prediction method based on long short-term memory neural network according to claim 3, characterized in that: The LSTM unit includes an input gate i t , output gate o t and forget gate f t , the output of the previous unit is y t-1 , the current cell state is called c t ; The operation process of the LSTM unit is as follows: First, the network receives the input information x t , and create the candidate value z through formula (2) t ; Then according to formula (3), the candidate value z t AND input gate i t Multiply, determine the part of the input information sent to c t ; Then according to formula (4), the forget gate f t Decide to delete the previous unit state c t-1 According to formula (5), we can get the current unit state c t Finally, the output of the output gate is obtained by equation (6), and it is combined with the current unit state according to equation (7) to obtain the final output y of this unit t ; z t = g(W c [x t ,y t-1 ]+ b c ) (2) i t = σ(W i [x t ,y t-1 ]+ b i ) (3) f t = σ(W f [x t ,y t-1 ]+ b f ) (4) c t = i t z t + c t-1 f t (5) the t = σ(W o [x] t ,y t-1 ]+ b o ) (6) y t =g(c t )o t (7) Among them, W and b refer to different weights and bias vectors respectively, σ refers to the sigmoid activation function, and g refers to the tanh activation function.

5. A wave prediction method based on long short-term memory neural network according to claim 1, characterized in that: The calculation formulas for the coefficient of determination, mean square error and average error of the sample are: in, Represents the average value of the original data.

6. A wave prediction system based on long short-term memory neural network, characterized in that: The invention comprises a program module corresponding to the steps of any one of claims 1 to 5, and executes the steps of the wave prediction method based on long short-term memory neural network when running.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the wave prediction method based on long short-term memory neural network described in any one of claims 1 to 5 when called by a processor.