Ocean wave height prediction method, system, computer equipment, storage medium, terminal
The BP neural network is optimized by the chaotic particle swarm optimization algorithm, which solves the problems of high computational resource consumption and long running time in the traditional ocean wave height prediction method, and achieves highly accurate and fast wave height prediction, which is suitable for the field of ocean early warning.
Patent Information
- Application Number
- CN202110899892.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-06
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-08-06
AI Technical Summary
Traditional ocean wave height prediction methods require a large amount of computing resources, and the modeling algorithm takes a long time to run, making it difficult to quickly find the optimal solution. Especially in complex sea conditions, the prediction ability is limited.
The chaotic particle swarm optimization algorithm (CPSO) is used to optimize the BP neural network. A chaos model is established through feature selection and particle swarm behavioral characteristics to solve the premature convergence problem of the particle swarm. The initial weights and thresholds of the BP network are optimized to form a CPSO-BP model. For ocean wave height prediction.
Constructing a high-accuracy wave height prediction model in a short period of time reduces resource consumption and modeling time, improves the accuracy and speed of prediction, and is suitable for wave height prediction in the field of ocean early warning.
Smart Images

Figure CN113722980B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ocean wave height prediction, and in particular relates to an ocean wave height prediction method, system, computer equipment, storage medium and terminal. Background Art
[0002] Wave prediction is an important guarantee for marine engineering construction, maritime transportation, environmental protection and military operations. In terms of port construction, waves affect the shape of the coast, and are related to the design and construction of ports, waterways and various offshore buildings. Abnormal ocean fluctuations can cause immeasurable losses to coasts, ports and offshore buildings, but the causes of waves are complex and it is very difficult to predict the height of waves. The causes of waves are complex, and the appearance and generation of waves are highly random. In addition to wind and waves at sea, waves may also contact objects on the sea surface to generate new fluctuations, which further increases the difficulty of predicting ocean wave heights.
[0003] Traditional wave height prediction methods use physical models to model ocean waves. The establishment of traditional models is generally based on the Navier-Stokes equations. Traditional models include: using geometric models, numerical simulation of ocean wave spectra, and physical models to simulate ocean wave generation. These methods simulate the real environment in which ocean waves are generated through sufficient environmental data, and require a large amount of computing resources to model the ocean environment.
[0004] Different from the traditional physical model prediction method which consumes huge resources, the performance of computing equipment has been greatly improved in recent years, the computing power has been enhanced, and efficient algorithms such as deep learning have emerged. These algorithms can simulate an approximate wave height prediction model in a relatively short time. Coupled with reasonable parameters and sufficient actual data, it can not only increase the accuracy of the prediction, but also improve the speed of ocean wave height prediction. In recent years, the combination of ocean wave height prediction and artificial intelligence methods is becoming a major development direction in the field of ocean wave height.
[0005] The problems and defects of the prior art are:
[0006] (1) Traditional wave height prediction methods use physical models to model ocean waves and simulate the real environment in which ocean waves are generated through sufficient environmental data. This requires a large amount of computing resources to model the ocean environment, which consumes a huge amount of resources.
[0007] (2) The method of using statistical methods such as mean square error height field to complete wave modeling. Due to the complex causes of waves and the inability to comprehensively and accurately collect the diverse physical characteristics of the sea, these classic statistical methods cannot accurately simulate the wave motion at sea.
[0008] (3) In the method of using remote sensing observations to monitor ocean wave height, remote sensing satellites are expensive and lack high-performance prediction algorithms. Higher accuracy in data processing is required to improve the efficiency of ocean wave height prediction.
[0009] Traditional methods use a lot of computing resources to solve real-world problems with complex environments, and the modeling algorithm takes a long time to run, making it very difficult to quickly find the optimal solution. Since the amount of calculation for such models is too large, empirical models, geometric models, and physical models are difficult to obtain timely and accurate prediction results, and their prediction capabilities are limited for offshore areas with complex sea conditions. In large areas of sea with complex sea conditions, it is necessary to simulate every particle in the sea area. Numerical models will consume huge computing resources and take a lot of time to model and calculate. Summary of the invention
[0010] In view of the problems existing in the prior art, the present invention provides a method for predicting ocean wave height.
[0011] The present invention is implemented as follows: a method for predicting ocean wave height, the method comprising the following steps:
[0012] Select features with high correlation coefficients as input features for predicting wave height; establish a chaotic model according to the behavior characteristics of the particle swarm to solve the problem of premature convergence of the particle swarm; use CDW to optimize the BP model in the initialization phase; in the CPSO-BP model, the chaotic particle swarm optimization algorithm (CPSO) finds the optimal particles in the solution space to optimize the initial weights and thresholds of the BP network; use the parameters optimized by the CPSO algorithm as the initial weights and thresholds of the ELM network and pass them into the ELM network; use the CPSO-BP model or the CPSO-ELM model to predict wave height in the field of marine warning. Further, in step one, the feature selection includes:
[0013] When selecting input features, the correlation between each feature and the wave height is determined, the correlation coefficient between each input parameter and the wave height is analyzed, and the features with high correlation coefficients are selected as input features for predicting wave height; among them, the alternative neural network input features include five features: mean sea level MSL, 10-meter wind speed U component U10, 10-meter wind speed V component V10, mean wave direction MWD, and mean wave period MWP.
[0014] Pearson correlation coefficient r x,y The correlation between each variable and the wave height SWH is calculated, and the correlation is used as a reference to select the input features of the neural network; the Pearson correlation coefficient r x,y Used to quantitatively analyze the correlation between variables, r x,y ∈[-1, 1], when |r x,y | is close to 1, the correlation between the two is high, and when |rx,y | is close to 0, and the correlation between the two is low; r x,y The positive or negative value represents the positive or negative correlation between the two variables, which is calculated according to the following formula:
[0015]
[0016] Among them, |r x,y |>0.8, the two variables are highly correlated; when |r x,y |∈[0.3,0.5)), the two variables are lowly correlated; when |r x,y When |<0.3, the two variables are weakly correlated.
[0017] U10 and v10 are the wind speed components in terms of accuracy and latitude respectively. Their correlation is not suitable to be taken out separately as parameters for wave height prediction. Through feature fusion, the wind speed value UV at the observation point is calculated and used as the input of the network. Uv can be calculated by the following formula:
[0018]
[0019] The new feature Uv after feature fusion has the highest correlation with SWH, and unlike MWP, UV is not a posteriori and can be used as an input feature.
[0020] The P value is used to analyze the significance of each parameter. When the null hypothesis is established, the P value represents the probability of an extreme situation; the smaller the P value, the smaller the probability of an extreme situation, and the larger the P value, the greater the probability of an extreme situation. Therefore, the size of the P value represents the significance of each parameter. When the P value is less than 0.05, it means that the variable is significant; when the P value is less than 0.001, it means that the variable is highly significant; only when the significance is high and the correlation coefficient is high, it makes sense to use this parameter as an input feature. Good inputs have high correlation and the P value is generally less than 0.1. The smaller the P value, the more it can be considered that the two sets of data have a significant relationship. UV and MSL are highly correlated with SWH, so UV and MSL are selected as input features of the network for wave height.
[0021] Further, in step 2, the determination of the CPSO algorithm includes:
[0022] The particle swarm optimization algorithm is divided into two states: exploration state and development state. In the exploration state, the traditional particle swarm algorithm searches the problem space in a random way, but at this time the particles may mutate and fall into the local optimal solution; in the development state, the particle swarm aggregates to the optimal area. When using the particle swarm algorithm for solving, by introducing the chaos learning algorithm and establishing its chaos model according to its particle swarm behavior characteristics, the problem of premature convergence of the particle swarm is solved.
[0023] Initialize the position of the particle swarm, and the initial position of the i-th particle is expressed as:
[0024] X i =(X i,1 , X i,2 , ...X i,N ), i∈[1,m];
[0025] After the initial vector is generated, the chaotic algorithm is used to initialize the generated initial vector. Using the characteristics of the chaotic algorithm, for each X of the initial vector i Assign N initial values to generate chaotic variables The initial value can be mapped from the problem space to the chaos space by the following formula:
[0026]
[0027] Find the current optimal solution and the optimal solution in the entire particle swarm to determine the update rate. The solution with the highest current fitness is denoted as P i , the optimal solution in the entire particle swarm is denoted as P g .
[0028] The current optimal solution of the i-th particle is expressed as:
[0029] P i =(P i1 , P i2 , ...P iN ), i∈[1,m];
[0030] The global optimal solution is expressed as:
[0031]
[0032] PSO changes the speed of each particle in different rounds so that the solution tends to P i and P g The direction is updated to obtain the optimal solution.
[0033] The velocity of the i-th particle is updated by the following equation:
[0034]
[0035] Among them, c1 is the local acceleration coefficient, c2 is the overall acceleration coefficient, ω∈R, is called the inertia weight coefficient, r1 and r2 are random real numbers in the interval (0, 1); small values of c1 and large values of c2 can make the particles converge to the global optimal solution in the later stage of optimization; the local acceleration coefficient is calculated by the following formula:
[0036]
[0037] The overall acceleration factor is calculated by the following formula:
[0038]
[0039] Among them, c 1i and c 2i are the initial values of the acceleration coefficients c1 and c2, and c 1f and c 2f is the final value of the acceleration factor.
[0040] The adaptive inertia weight coefficient can be calculated by the following formula:
[0041]
[0042] Among them, ω max and ω min are the maximum and minimum values of the weight coefficient ω, respectively. As the evolution process progresses, ω gradually decreases; f is the fitness of the current particle, f av is the average fitness of the particle swarm as a whole, f min is the minimum fitness in the particle swarm.
[0043] The velocity of the i-th particle is updated by the following equation:
[0044]
[0045] Among them, X i is the position of particle i, V i represents the velocity of particle i, V i ∈(V min , V max ), V min and V max Within [0, 1]; λ∈R is called the limiting factor, which is used to adjust ω∈R and limit the rate; the calculation terminates when the maximum rounds are reached or converges to meet the fitness requirements.
[0046] Further, in step 3, the implementation of the CPSO-BP model includes:
[0047] (1) Determine the BP network model structure.
[0048] Through feature selection, the present invention selects UV and MSL as input feature values. Determine the number of network input nodes S i is 2, the number of hidden layer nodes is S o =1, and the number of hidden layer nodes S l Set to 5; the dimension N of each particle can be calculated by the following formula:
[0049] N=S i ×S l +Sl ×S o +S l +S o +q,q=1;
[0050] Among them, q is the fitness value of each particle, which is placed in the last dimension of each particle to form a 22-dimensional particle X i ; S i ×S l is the number of weights from the input layer to the hidden layer, S l is the number of thresholds of the hidden layer, and the dimension of the particles is N=22.
[0051] (2) Set the initial parameters of CPSO.
[0052] Set the limiting factor λ = 0.92 and the maximum value of the adaptive inertia weight factor ω max = 0.9 and the minimum value ω min =0.4, set the initial value of the acceleration factor c 1i =c 2i =0.5, set the final value of the acceleration factor c 1f =c 2f =2.5.
[0053] (3) According to the structure of the BP network model, the initial vector and chaotic vector in the CPSO algorithm are generated.
[0054] The weights from the input layer to the hidden layer and the threshold of the hidden layer are used as elements in the CPSO matrix. Each particle in the CPSO represents the initial parameters of the BP network. When the population X is initialized, the model randomly generates a particle population of size m of 2000. The i-th particle of the initial population is calculated by the following formula:
[0055] X i =(x i,1 , x i,2 ,...x i,m ), i=1, 2, ..., 22;
[0056] Then, for X i A small disturbance is added to each parameter in to generate the initial chaotic vector. The i-th initial chaotic vector is calculated by the following formula:
[0057]
[0058] (4) Each particle in the population is scored based on its fitness.
[0059] The fitness of each particle is the inverse of the mean square error. Each particle in the population is scored by the size of the fitness, and the score of each particle is set as the last item of the vector. The fitness is used together with the weight and threshold of the BP network model as the parameters of the particle to determine the structure of a particle. The fitness of the i-th particle is calculated by the following formula:
[0060]
[0061] Each particle is sorted according to the obtained fitness value, the top five particles are regarded as the winning particles, and the second five particles are regarded as temporary particles.
[0062] (5) Sort the particle swarm according to the fitness value, then optimize the particle swarm to generate a new particle swarm.
[0063] According to the fitness score, the top five particles are ranked as the winning particles, denoted as i = 1, 2, ..., 5, the next five particles after these five particles are used as temporary particles, denoted as Then, the ten selected winning particles and temporary particles are used as new centers and added to the random matrix 19 times to generate 19 new particles. It can be expressed as Randomly generate a 22-dimensional matrix Y = [y1 y2 ... y 22 ], where. Add them to matrix Y respectively, and normalize the new matrix after addition to the same interval as Y. The new matrix after addition can be calculated by the following formula:
[0064]
[0065] Among them, l manx Calculated by the following formula:
[0066] l max ={max||x i +y i |,i=1,2,...,22},n=1,2,...,19;
[0067] Each winning particle and temporary particle and the 19 Z generated later n A new particle group is formed. Thus, 5 new winning particle groups are generated, recorded as And 5 new temporary particle groups, denoted as
[0068] (6) Chaotic convergence and chaotic alienation operations.
[0069] The five winning particles and the five temporary particles are taken as the centers respectively, 10 new particle groups are generated, and the newly generated particles are reordered according to the fitness values.
[0070] Chaotic convergence: When the sub-groups are performing convergence operations, the population will generate a new sub-group with the individual with the highest score as the center. If there is a higher score than the new sub-group, the convergence operation will continue with the new winning individual as the center. Update the average value f of the fitness f of the calculated particles av and the minimum value f of fitness f min , update the weight coefficient ω.
[0071] Chaos alienation: Update the adaptive inertia weight coefficient ω, local acceleration coefficient c1 and overall acceleration coefficient c2, calculate the speed of the particle after chaos and the new position of the particle. Recalculate the particle coordinates and fitness f according to the new position of the particle. When a particle with a higher f value appears, use this particle to generate a new particle group, and eliminate particles with low fitness values until the particle group matures and all individuals converge.
[0072] If the alienated particle swarm has not converged yet, repeat this step until the network converges.
[0073] (7) The individual X with the highest fitness best =[x1 x2 ... x 22 ] as the input of BP neural network.
[0074] X best where x1, x2, ..., x 10 As the connection weight from the network input layer to the hidden layer, denoted as X best Medium 11 , x 12 , ..., x 15 As the connection weight from the neural hidden layer to the output layer, W2 = [x 11 , x 12 , ..., x 15 ] T ; X best Medium 16 , x 17 , ..., x 20 As the threshold of each node in the hidden layer, denoted as B1 = [x 16 , x 17 , ..., x 20 ] T X best Medium 21 As the threshold of each node in the output layer, denoted as B2 = [x 21 ] T. Set W = [W1, W2] T and B = [B1, B2] T They are used as the initial weights and thresholds of the BP network respectively to form the initial CPSO-BP model.
[0075] (8) Train the prediction model and perform simulation prediction.
[0076] Furthermore, in step 4, the optimization of the CPSO-BP model includes:
[0077] In the CPSO-BP model, CPSO searches for the optimal particles in the solution space to optimize the initial weights and thresholds of the BP network. CPSO discovers particles with higher fitness through convergence and alienation operations. Before performing the convergence operation, CPSO first sorts all particles according to the fitness value, and finds the optimal particles and temporary particles from the top-ranked particles. A new particle swarm is generated with the optimal particles and temporary particles as the center, and each newly generated particle swarm is sorted and convergence and alienation operations are performed. When the alienation process no longer produces particles with higher fitness values, that is, when the optimal particle is found, the particle swarm is no longer updated and the algorithm ends.
[0078] In the optimization process of CPSO, after selecting 5 winning particles and 5 temporary particles, 5 winning particle swarms and 5 temporary particle swarms are generated with them as the center. The fitness score of each particle swarm tends to a stable value after a certain number of changes, which means that the particle swarm has matured and the fitness score no longer changes. After each particle swarm undergoes convergence operations, the final score of each particle swarm is the fitness value of the particle with the highest score within it. After the optimal particle swarm is updated, it enters the alienation stage.
[0079] The fitness scores of subpopulation 2, subpopulation 3 and subpopulation 4 in the winning particle swarm are lower than those of subpopulation 1, subpopulation 2 and subpopulation 5 in the temporary particle swarm. Therefore, subpopulation 2, subpopulation 3 and subpopulation 4 in the winning particle swarm are replaced by subpopulation 1, subpopulation 2 and subpopulation 5 in the temporary particle swarm as the new winning particle swarms to enter the alienation stage. Then the three particle swarms replaced by the winning particle swarm are eliminated, and three new particle swarms are randomly generated in the temporary particle swarm to enter the alienation stage. After 4 convergence operations, the fitness score of the particle swarm no longer changes, indicating that all particle swarms are mature at this time and meet the algorithm stop condition. The CPSO algorithm optimization ends here. The value of the particle with the highest fitness value found by CPSO is passed into the BP neural network as the initial weight and threshold.
[0080] Further, in step 5, the implementation of the CPSO-ELM model includes:
[0081] The form of the CPSO-ELM model is similar to that of the CPSO-BP model. The CPSO algorithm strategy remains unchanged, and after the CPSO algorithm is finished running, the optimal solution found by the algorithm is passed to the ELM as its initial weight and threshold.
[0082] After determining the weights of each node from the input layer to the hidden layer and the threshold of the hidden layer, ELM can determine the weights of the neurons from the hidden layer to the output layer by itself; through feature selection, UV and MSL are selected as input feature values, and SWH is predicted by training the BP neural network; the number of input neurons S i is 2, the number of output layer nodes is S o is 1, and the number of hidden layer nodes S l Set to 5; the dimension N of each particle is calculated by the following formula:
[0083] N=S i ×S l +S l +q,q=1;
[0084] Among them, q is the fitness value of each particle, which is placed in the last dimension of each particle to form a 16-dimensional particle X i ; S i ×S l is the number of weights from the input layer to the hidden layer; S l is the threshold number of hidden layer neurons, and the dimension of particles is N=16.
[0085] The basic idea of the CPSO-ELM model is to pass the parameters optimized by the CPSO algorithm into the ELM network as the initial weights and thresholds of the ELM network, and optimize the prediction effect by optimizing the neural network parameters.
[0086] Another object of the present invention is to provide an ocean wave height prediction system using the ocean wave height prediction method, the ocean wave height prediction system comprising:
[0087] The feature selection module is used to select features with high correlation coefficients as input features for predicting wave height;
[0088] The CPSO algorithm determination module is used to establish a chaotic model according to the behavior characteristics of the particle swarm and solve the problem of premature convergence of the particle swarm;
[0089] CPSO-BP model implementation module, used to optimize the BP model in the initialization phase through CDW;
[0090] CPSO-BP model optimization module, in the CPSO-BP model, is used to optimize the initial weights and thresholds of the BP network by finding the optimal particles in the solution space through CPSO;
[0091] CPSO-ELM model implementation module, used to use the parameters optimized by the CPSO algorithm as the initial weights and thresholds of the ELM network and pass them into the ELM network;
[0092] The wave height prediction module is used to predict the wave height in the field of marine early warning using the CPSO-BP model.
[0093] Another object of the present invention is to provide a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0094] Features with high correlation coefficients are selected as input features for predicting wave height; a chaotic model is established according to the behavior characteristics of the particle swarm to solve the problem of premature convergence of the particle swarm; CDW optimizes the BP model in the initialization phase; in the CPSO-BP model, CPSO searches for the optimal particles in the solution space to optimize the initial weights and thresholds of the BP network; the parameters optimized by the CPSO algorithm are used as the initial weights and thresholds of the ELM network and passed into the ELM network; the CPSO-BP model is used to predict wave height in the field of marine warning.
[0095] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:
[0096] Features with high correlation coefficients are selected as input features for predicting wave height; a chaotic model is established according to the behavior characteristics of the particle swarm to solve the problem of premature convergence of the particle swarm; CDW optimizes the BP model in the initialization phase; in the CPSO-BP model, CPSO searches for the optimal particles in the solution space to optimize the initial weights and thresholds of the BP network; the parameters optimized by the CPSO algorithm are used as the initial weights and thresholds of the ELM network and passed into the ELM network; the CPSO-BP model is used to predict wave height in the field of marine warning.
[0097] Another object of the present invention is to provide an information data processing terminal, which is used to implement the ocean wave height prediction system.
[0098] Combining all the above technical solutions, the advantages and positive effects of the present invention are: the machine learning method can build a wave height prediction model in a relatively short time. Compared with the traditional wave height prediction physical model, the ocean wave height prediction method provided by the present invention uses a deep learning method to predict wave height, which has the advantages of high accuracy, low cost and fast operation speed; in the problem of wave height prediction in marine early warning, it is very suitable to use a deep learning method to predict wave height.
[0099] The present invention aims to build an accurate and efficient wave height prediction model by combining BP neural network and CPSO algorithm. Through the optimization ability of chaotic particle swarm optimization algorithm, the inherent deficiencies of neural network are compensated, and a more efficient model is obtained than the traditional physical method, which reduces the consumption of resources and modeling time while ensuring the prediction accuracy.
[0100] The present invention uses a BP neural network model (CPSO-BP) optimized based on a chaotic particle swarm optimization algorithm for ocean wave height prediction. An optimal particle is found by screening generation by generation, and the result of the CPSO algorithm is passed to the BP neural network. The calculation result of the CPSO algorithm is used as the initial weight and threshold of the BP neural network to form a CPSO-BP model. By using the trained CPSO-BP network to perform ocean wave height prediction tasks, the prediction performance of the network is improved.
[0101] The experiment of the present invention uses the wave height data recorded every 6 hours at 6 stations in the Bohai Sea and the Yellow Sea in 2020 by the Medium-Term Weather Forecast Center. By calculating and analyzing the correlation coefficient between each parameter of the wave height data and the wave height, the input features of the model were selected. The St-BP, CPSO-ELM, and CPSO-BP models were trained using the data from the first 11 months, and the data from the 12th month were used as a test set to evaluate the wave height prediction effects of the three models. By comparing the regression curves, prediction curves and various experimental indicators of the prediction results of the three models, the advantages of the CPSO-BP model in solving the wave height prediction problem in the field of marine early warning were analyzed from the perspectives of prediction accuracy, timeliness, robustness and generalization ability. The research on the ocean wave height prediction model of the CPSO-BP and CPSO-ELM models in the present invention has an important reference role and application value for future research on issues related to ocean wave height prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. 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 creative work.
[0103] Figure 1 It is a flow chart of the ocean wave height prediction method provided by an embodiment of the present invention.
[0104] Figure 2 is a structural block diagram of an ocean wave height prediction system provided by an embodiment of the present invention;
[0105] In the figure: 1. Feature selection module; 2. CPSO algorithm determination module; 3. CPSO-BP model implementation module; 4. CPSO-BP model optimization module; 5. CPSO-ELM model implementation module; 6. Wave height prediction module.
[0106] Figure 3 This is a diagram of the ELM topology provided by an embodiment of the present invention.
[0107] Figure 4 It is a BP neural network topology diagram provided by an embodiment of the present invention.
[0108] Figure 5 It is a histogram of the Pearson correlation coefficients between various features and wave heights provided in an embodiment of the present invention.
[0109] Figure 6 This is a graph of UV, U10, V10 and SWH for the 121°E, 40°N station in 2020 provided by an embodiment of the present invention.
[0110] Figure 7 It is a BP neural network structure diagram provided by an embodiment of the present invention.
[0111] Figure 8 It is a flow chart of the CPSO-BP model provided by an embodiment of the present invention.
[0112] Fig. 9 It is a schematic diagram of fitness scores of the convergence process of the winning particle group provided by an embodiment of the present invention.
[0113] Fig.10 It is a schematic diagram of fitness scores of a convergence process of a temporary particle swarm provided by an embodiment of the present invention.
[0114] Fig.11 It is a schematic diagram of fitness scores of the convergence process of the winning particle group after alienation provided by an embodiment of the present invention.
[0115] Fig.12 It is a schematic diagram of fitness scores of a convergence process of a temporary particle group after alienation provided by an embodiment of the present invention.
[0116] Fig.13 It is a CPSO-ELM model prediction flow chart provided by an embodiment of the present invention.
[0117] FIG. 14 is a distribution map of observation stations in the Bohai Sea and the Yellow Sea provided by an embodiment of the present invention.
[0118] Fig.15 This is the wave height distribution map of Bohai Sea stations in 2020 provided by an embodiment of the present invention.
[0119] Fig.16This is a wave height distribution map of the Yellow Sea stations in 2020 provided by an embodiment of the present invention.
[0120] Fig.17 It is a linear regression scatter distribution diagram of St-BP in the training and testing stages provided by an embodiment of the present invention.
[0121] Fig.18 It is a linear regression scatter distribution diagram of the CPSO-ELM in the training and testing phases provided by an embodiment of the present invention.
[0122] Fig.19 It is a linear regression scatter distribution diagram of the CPSO-BP in the training and testing stages provided by the embodiment of the present invention.
[0123] Fig. 20 It is a comparison chart of the actual wave height in the Bohai Sea area and the prediction curves of three models provided by an embodiment of the present invention.
[0124] Fig.21 It is a comparison chart of the actual wave height in the Yellow Sea and the prediction curves of three models provided by an embodiment of the present invention.
[0125] Fig. 22 It is a bar chart comparing the average values of four indicators of the Bohai prediction results provided by an embodiment of the present invention.
[0126] Fig.23 It is a bar chart comparing the average values of four indicators of the Yellow Sea prediction results provided by an embodiment of the present invention.
[0127] Fig.24 It is a histogram comparing the variances of four indicators of the prediction results provided by the embodiment of the present invention. DETAILED DESCRIPTION
[0128] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0129] Chaotic particle swarm optimization algorithm is widely used in optimization problems that require a lot of calculations. By converting a huge optimization problem in the solution space into an optimization process of a small number of particles in the problem domain, this will greatly simplify the optimization process and reduce the amount of calculation in the optimization process. The solutions generated by the chaos algorithm and the genetic algorithm may have higher diversity and evolutionary ability. In many studies involving particle swarm optimization, chaotic mapping has begun to be used as a method for system optimization. Chaotic algorithms are suitable for improving heuristic algorithms to solve the problem of ocean wave height prediction, and the algorithm has an extremely fast processing speed and can make fast and accurate predictions for large-scale sea areas with complex sea conditions. The chaotic particle swarm optimization algorithm is suitable for the optimization task of the initial parameters of artificial neural networks. The chaotic particle swarm optimization algorithm and the artificial neural network complement each other, and the characteristics of the two are consistent. The model that combines the advantages of the two is suitable as a prediction model for the ocean wave height prediction task in the field of marine warning.
[0130] The present invention constructs an accurate and efficient wave height prediction model by combining BP neural network with Chaotic Particle Swarm Optimization (CPSO) algorithm. The optimization ability of the chaotic particle swarm optimization algorithm is used to make up for the inherent deficiencies of the neural network and obtain a more efficient model than the traditional physical method, which reduces the consumption of resources and modeling time while ensuring the prediction accuracy.
[0131] In view of the problems existing in the prior art, the present invention provides a method, system, computer device, storage medium and terminal for predicting ocean wave height. The present invention is described in detail below with reference to the accompanying drawings.
[0132] like Figure 1 As shown, the ocean wave height prediction method provided by the embodiment of the present invention includes the following steps:
[0133] S101, feature selection: select features with high correlation coefficients as input features for predicting wave height;
[0134] S102, determination of CPSO algorithm: establish a chaotic model according to the behavior characteristics of the particle swarm to solve the problem of premature convergence of the particle swarm;
[0135] S103, implementation of CPSO-BP model: CDW optimizes the BP model in the initialization phase;
[0136] S104, Optimization of CPSO-BP model: In the CPSO-BP model, CPSO searches for the best particles in the solution space to optimize the initial weights and thresholds of the BP network;
[0137] S105, implementation of CPSO-ELM model: using the parameters optimized by CPSO algorithm as the initial weights and thresholds of ELM network and passing them into ELM network;
[0138] S106, wave height prediction: Use the CPSO-BP model or CPSO-ELM model to predict wave height in the field of marine warning.
[0139] like Figure 2 As shown, the ocean wave height prediction system provided by the embodiment of the present invention includes:
[0140] Feature selection module 1, used to select features with high correlation coefficients as input features for predicting wave height;
[0141] CPSO algorithm determines module 2, which is used to establish a chaotic model according to the behavior characteristics of the particle swarm and solve the problem of premature convergence of the particle swarm;
[0142] CPSO-BP model implementation module 3 is used to optimize the BP model in the initialization phase through CDW;
[0143] CPSO-BP model optimization module 4, in the CPSO-BP model, is used to optimize the initial weights and thresholds of the BP network by searching for the optimal particles in the solution space through CPSO;
[0144] CPSO-ELM model implementation module 5 is used to use the parameters optimized by the CPSO algorithm as the initial weights and thresholds of the ELM network and pass them into the ELM network;
[0145] The wave height prediction module 6 is used to predict the wave height in the field of marine early warning using the CPSO-BP model.
[0146] The technical solution of the present invention is further described below in conjunction with embodiments.
[0147] 1. Wave height prediction is related to marine early warning and the safe and timely implementation of offshore engineering. Traditional wave height prediction methods include physical models and empirical models. The physical model simulates the real sea conditions through mechanical analysis. The physical model can obtain relatively accurate prediction results, but due to the complexity of the marine environment, the physical model requires a large amount of computing resources in the modeling process, and the algorithm runs for a long time. The establishment of the empirical model does not require any physical parameters, and the model training speed is fast, but the prediction accuracy is low. In marine early warning, the accuracy and speed of wave height prediction are both crucial.
[0148] Different from traditional prediction methods, deep learning methods such as extreme learning machine (ELM) and back propagation neural network (BP) that have emerged in recent years can build wave height prediction models in a shorter time. These methods model the trend of wave height changes, use reasonable parameters and sufficient actual data, which can not only increase the accuracy of prediction, but also improve the speed of ocean wave height prediction, and are more suitable for wave height prediction problems in the field of ocean warning.
[0149] The BP neural network has a simple structure and fast model training speed. The error is reduced through the back propagation of the BP neural network. The trained model has high accuracy and is suitable for solving large-scale prediction problems with large data volumes. However, the BP neural network is prone to fall into the local optimal solution during the training process. In order to solve the problem that the BP neural network is prone to fall into the local optimal solution, the Chaotic Particle Swarm Optimization (CPSO) algorithm is introduced to optimize the BP neural network to form the CPSO-BP model. The global search capability of CPSO is used to optimize the model training effect, ensuring the model training speed and stability while improving the prediction accuracy of the network.
[0150] The present invention is as follows:
[0151] (1) BP neural network is selected as the model for ocean wave height prediction. The study compares the structural differences between BP neural network and ELM model, and points out the advantages of BP neural network in wave height prediction.
[0152] (2) The core algorithm of the CPSO-BP model is described. The structures of the two ocean wave height prediction models, CPSO-BP and CPSO-ELM, are described. The chaotic learning algorithm, PSO algorithm and BP neural network are described, as well as the combination of the three.
[0153] 2. Theoretical basis of CPSO-BP wave height prediction algorithm
[0154] As research deepens, various neural network models have emerged, among which the most representative are the extreme learning machine (ELM) and back propagation (BP) neural network models. ELM does not perform back propagation during training and has a faster training speed, but lacks in predictive performance.
[0155] The BP neural network optimizes the prediction performance of the model by adjusting parameters layer by layer to reduce the error. Compared with ELM, the BP neural network takes longer to train, but it has a better optimization effect on parameters and can obtain more accurate prediction results. The BP neural network is prone to fall into the local optimal solution during the training process. In order to solve the problem that the BP neural network is prone to fall into the local optimal solution, CPSO is introduced to optimize the BP neural network to form the CPSO-BP model. The global search capability of CPSO is used to optimize the model training effect, ensuring the model training speed and stability while improving the prediction accuracy of the network.
[0156] 31 Extreme Learning Machine Principle
[0157] ELM is a feedforward neural network with extremely fast network training speed. After determining the weights and thresholds of the input layer and hidden layer in the network, ELM can automatically calculate and update the threshold of the output layer and the weights of the nodes connected to it. Figure 3 Schematic diagram of the topological structure of ELM.
[0158] Assume there are N samples (X i , t i ), where X i =[x i1 x i2 ... x in ] T ∈R n , t i =[t i1 t i2 ... t im ] T ∈R M Then a network with only one hidden layer and L nodes in each hidden layer can be expressed by formula (7).
[0159]
[0160] Among them, g(x) is the activation function, β i is the output weight, W i =[w i,1 w i,2 ... w i,n ] T is the input weight, b i is the threshold of the i-th hidden layer neuron.
[0161] The error between the output and the target value is calculated by the following formula:
[0162]
[0163] ELM aims to make the ε value 0, that is, there is β i, W i and b i ,make:
[0164]
[0165] Convert the above formula into matrix representation:
[0166] Hβ=T (4)
[0167] Among them, H is the output of the hidden layer, T is the desired output, and β is the output weight.
[0168] H can be expressed as:
[0169]
[0170] β can be expressed as:
[0171]
[0172] T can be expressed as:
[0173]
[0174] In order to obtain the optimal network, we hope to get and So that:
[0175]
[0176] This is equivalent to the minimum loss function:
[0177]
[0178] In ELM, once W i and b i is determined, the output matrix is determined. And the output weights can also be determined, and the calculation formula is as follows:
[0179]
[0180] Among them, H + is the Moore-Penrose inverse of the matrix H.
[0181] ELM does not need to modify the weights and thresholds in the network through back propagation, and its training speed is faster than that of BP network. The weights and thresholds of ELM are no longer updated after being set. This is different from the strategy of BP neural network to continuously update the network weights and thresholds through back propagation. ELM does not perform back propagation, which reduces the amount of calculation and operation time, but the accuracy of network prediction cannot be guaranteed. ELM has a faster operation speed than traditional learning algorithms. The present invention will use CPSO to optimize ELM and BP neural network respectively to explore the optimization ability of CPSO algorithm.
[0182] 3.2 BP Neural Network Principle
[0183] BP neural network is a widely used classic neural network structure, which learns and trains the model by adjusting parameters through back propagation. BP neural network includes three structures: input layer, hidden layer and output layer. The input layer and output layer are single structures, and the structure of the hidden layer is not fixed.
[0184] 3.2.1 BP neural network structure
[0185] Each input neuron of the BP neural network is connected to each hidden layer neuron, each hidden layer neuron is connected to each output layer neuron, the route connecting each two neurons contains the weight of the neural network, and each hidden layer neuron and output layer neuron contains the threshold of the neural network. The weight is the weight of each item, and the threshold is the correction parameter of the deviation. The input neuron transmits the initial data to the neural network, and the input neuron does not contain the threshold. The BP network includes two major training steps: forward and reverse. During forward propagation, the data enters the input neuron, and after a series of nonlinear function operations including connection weights and thresholds, the result of the operation is transmitted by the output neuron. If the result does not meet the convergence condition, the reverse propagation is used to reduce the error. The loss value is calculated by the difference between the calculated result and the expected value, and the loss value is returned in the opposite direction of the BP neural network training direction. The weight and threshold of each path are recalculated to reduce the loss value to the ideal effect. When the error is small enough and meets the training requirements, the BP neural network training is stopped. The structure of the BP neural network is flexible and can simulate complex nonlinear functions. It works well in practical applications and is widely used.
[0186] Figure 4 is an n-dimensional BP neural network structure. Among them, x1, x2, ..., x n is the input data, w1, w2, ..., w n is the weight of each path.
[0187] The weights of BP neural network neurons and input data can be represented by matrices:
[0188]
[0189] After a neuron node receives all the inputs, it will analyze and map them through the activation function, using α to represent the weighted value of all input values with different weights.
[0190] α=∑ω i x i (12)
[0191] The threshold of each path in the BP neural network is represented by θ, and the activation function is y=f(α,θ).
[0192] like Figure 4 As shown, the value y of the output node of the BP neural network can be expressed as:
[0193]
[0194] The BP neural network itself has some structural problems: (1) The external network needs to update the weights and thresholds of the network through back propagation generation by generation. Multiple back propagation will greatly increase the training time of the network. This is particularly true when the network structure is complex. (2) If the initial values are too densely distributed in the solution space, the BP neural network may converge prematurely and fall into a local optimal solution. (3) It is sensitive to learning rate. The smaller the learning rate, the better the network convergence effect, but it will greatly increase the training time of the network.
[0195] 3.3 PSO Algorithm Principle
[0196] BP neural network is very sensitive to initial parameters. Good initial parameters can not only reduce the number of back propagation times of BP neural network, but also improve the prediction effect of BP neural network model. Particle swarm optimization (PSO) is a heuristic algorithm. PSO algorithm regards individuals in the real world as randomly distributed particles in the solution space. Each particle in the particle swarm moves towards the theoretical optimal value at different rates to find the global optimal solution. The present invention optimizes the initial parameters of BP neural network by improving the optimization ability of PSO through chaos learning algorithm. Each particle in the algorithm represents a set of initialization parameters of BP neural network, and each particle contains an initial weight, initial threshold and fitness value of BP network.
[0197] 3.31 Introduction to PSO Algorithm
[0198] The PSO algorithm uses a set of vectors with random positions for initialization. Particles search in an m-dimensional space. Each vector is called a particle. The particle swarm consists of N particles, and the initial position of the i-th particle is expressed as:
[0199] X i =(X i1,X i,2 , ...X i,N ), i∈[1,m] (14)
[0200] These particles are mapped to the solution space at a certain speed, and the optimal solution vector is found by continuously updating the rounds to reach the fitness set by the user. During the round (iter) update process, the algorithm refers to the current optimal solution and the optimal solution in the entire particle swarm to determine the update rate. The particle with the highest current fitness is recorded as P i , the optimal solution in the entire particle swarm is denoted as P g .
[0201] X i The fitness value fitness(X i ) is calculated by the following formula:
[0202]
[0203] The higher the fitness value, the better the particle optimization effect. i P i The ith child of .
[0204] The current optimal solution of the i-th particle is expressed as:
[0205] P i =(P i1 , P i2 , ...P iN ), i∈[1,m] (16)
[0206] The global optimal solution is expressed as:
[0207]
[0208] PSO changes the speed of each particle in different rounds to make the particles move closer to P. i and P g The direction is updated to obtain the optimal solution.
[0209] The velocity of the i-th particle is updated by the following equation:
[0210]
[0211] After the velocity is updated, the position of the i-th particle is updated with the velocity by the following equation:
[0212]
[0213] Among them, X i is the position of particle i, V i represents the velocity of particle i, Vi ∈(V min , V max ), V min and V max In [0, 1]; ω∈R, it is called the inertia weight coefficient, λ∈R is called the limiting factor, which is used to adjust ω∈R to limit the rate; r1 and r2 are random real numbers in the interval (0, 1). The calculation terminates when the maximum round is reached or converges to meet the fitness requirements.
[0214] The inertia weight coefficient ω is set by the following equation:
[0215] ω=ω max -[(ω max -ω min ) / iter max |×iter (20)
[0216] Among them, ω max is the initial weight, ω min is the final weight, as the weight decreases. max is the maximum number of iterations, and iter is the current iteration number.
[0217] 3.3.2 PSO Algorithm Process
[0218] The PSO algorithm consists of the following basic processes:
[0219] (1) Analyze the problem and encode the particles according to the problem.
[0220] (2) Generate the encoded particles to form a population, calculate the particle fitness, sort each particle according to the fitness value, and select the winning particle group and temporary particle group according to the score from high to low.
[0221] (3) The selected winning sub-group and temporary sub-group are used as new centers to generate a corresponding number of new particle groups. The generated new particle groups and the selected winning sub-groups constitute the new winning particle group and temporary particle group.
[0222] (4) Perform convergence operations on all particles in the entire population, and use the fitness value of the particle with the highest score in the population as the score of the entire population. When the population converges or exceeds the maximum number of iterations, the convergence operation will no longer be performed. Otherwise, the convergence and alienation operations will continue.
[0223] (5) After the convergence operation is completed, the alienation operation is performed in the particle swarm. If a particle swarm with a higher score appears in the new temporary particle swarm, the particles with a higher score in the previous winning particle swarm are replaced with the particles with a lower score, the replaced particles are discarded, and new particles are randomly generated to complete the temporary particle swarm. After the alienation is completed, if the end condition is not met, the process of convergence and alienation will continue.
[0224] (6) The algorithm ends and the globally optimal particle is found.
[0225] 3.4 Principle of Chaotic Learning Algorithm
[0226] The behavior of chaotic phenomena is complex and random, but it has certain internal laws. The idea of the chaos learning algorithm is to map an initial chaotic vector from the problem space to the solution space. For different initial values, the chaos learning algorithm will calculate different solutions. The chaos learning algorithm is not easy to converge prematurely, and has the characteristics of high speed, accuracy, and global asymptotic convergence. The use of the PSO algorithm to optimize the BP neural network has certain limitations. The initial particles of the PSO algorithm are too concentrated or particles that may have higher fitness are eliminated during the evolution process, which will cause the particle swarm to converge prematurely. In order to solve this problem, the present invention introduces a chaos learning algorithm to optimize the PSO algorithm. By adding a chaos learning algorithm to the initialization, convergence and alienation stages of the PSO algorithm, the PSO algorithm can be randomly distributed in the problem space in the initial stage, and more potential particles can be retained in the convergence and alienation stages to solve the problem of premature convergence.
[0227] For the following optimization problem:
[0228] minf(x) x i ∈[a i , b i ];i=1,2,3,...,n;x=(x1,x2,...,x m ) (twenty one)
[0229] where a i and b i is x i are the lower and upper bounds of , and m is the dimension of x.
[0230] Chaos mapping is optimized by the following model:
[0231] x n+1 =μx n (1-x n ), n=0, 1, 2,..., N; 0<x0<1 (22)
[0232] Where μ is the control parameter. Different values of μ will affect the stable solution x of the model when m tends to infinity. mThe value of μ is different, and the degree of chaos of the system is different. When μ = 4, the system is close to being completely random.
[0233] For x in the model m Assign N initial values to generate chaotic variables The initial value is mapped to the chaotic space using the following formula to generate chaotic variables:
[0234]
[0235] A small disturbance is added to the mutation process. A small disturbance is given to the evolved vector, which may make the generated vector get better results. When the generated vector cannot evolve in a better direction, the algorithm ends.
[0236] The particle swarm optimization algorithm is divided into two states: exploration state and development state. In the exploration state, the traditional particle swarm algorithm searches the problem space in a random way, but at this time the particles may mutate and fall into the local optimal solution; in the development state, the particle swarm aggregates to the optimal area.
[0237] The boundary between these two states is fuzzy. It is precisely because of the random characteristics of the heuristic algorithm that there is no clear boundary between the exploration state and the development state, which leads to the premature convergence of the particle swarm. This can be solved by introducing a chaotic learning algorithm.
[0238] Introducing chaos theory into the PSO algorithm, the present invention considers optimizing the particle parameters of the PSO algorithm from the initialization, convergence and mutation stages to optimize the overall effect of the algorithm. The specific approach is as follows:
[0239] Perform chaos initialization on the initial vector. In the PSO optimization algorithm, properly controlling the global search and local evolution by controlling the initial parameters is the key to efficiently finding the optimal solution. The performance of the PSO algorithm depends largely on the initial parameters. Optimize the PSO initial parameters through the chaos algorithm so that the initial parameters fully fill the entire problem space. The specific method is: after the PSO algorithm generates the initial vector, use the chaos algorithm to perform chaos initialization on the generated initial vector, and use the characteristics of the chaos algorithm to initialize each x of the initial vector. m Assign N initial values to generate chaotic variables
[0240] Chaos dynamic weight adjustment: During the evolution process, as the number of iterations increases, the weights in the chaos algorithm are dynamically adjusted to make the vector evolve toward the global optimal area faster and more accurately.
[0241] The first half of the formula represents the influence of the previous speed value, and the initial speed plays a guiding role in the evolution direction; the second half represents that the inertia weight ω is the modulus that controls the influence of the previous speed on the current speed. Therefore, the balance between global search and local evolution in PSO is determined by the ω value, and proper control of the inertia weight is crucial to accurately and efficiently find the optimal solution. The determination of the adaptive inertia weight coefficient is as follows:
[0242]
[0243] Among them, ω max and ω min are the maximum and minimum values of the weight coefficient ω, respectively. As the evolution process progresses, ω gradually decreases. f is the fitness of the current particle, f av is the average fitness of the particle swarm as a whole, f min is the minimum fitness in the particle swarm. As can be seen from the above formula, ω is greatly affected by f, and the value of ω changes with f. Particles with lower target values will be protected, and particles exceeding the mean will be destroyed. In other words, good particles tend to mine results through local search, while bad particles tend to adjust through drastic modifications. This provides a good way to maintain population diversity and maintain good convergence ability.
[0244] Chaotic acceleration coefficient: This invention introduces a chaotic algorithm to make the acceleration coefficient of particles tend to be stable during the evolution of each generation. It adds time-dependent acceleration coefficients c1 and c2, taking into account the correlation between particles. When a large value c1 and a small value c2 are set at the beginning, particles are allowed to move within the search space instead of moving to p. g Move. Small value c1 and large value c2 can make the particles converge to the global optimal solution in the later stage of optimization. The time-varying acceleration coefficients c1 and c2 are calculated by the following two formulas:
[0245]
[0246]
[0247] Among them, c 1i and c 2i are the initial values of the acceleration coefficients c1 and c2, and c 1f and c 2f is the final value of the acceleration coefficient. The chaotic dynamic weight and the chaotic acceleration coefficient adjust the convergence and alienation process in the PSO algorithm. As the round increases, the ratio of the difference between the round and the current round to the maximum round will decrease with the increase of the round, which allows the particles to have a larger acceleration in the early stage of evolution and tend to be stable in the later stage of evolution. By introducing the chaotic learning algorithm into the PSO algorithm, the initial population search range of the PSO is increased and the stability of the PSO algorithm is improved.
[0248] 4. Implementation of CPSO-BP wave height prediction model
[0249] In Chapter 3, the theoretical basis of the CPSO-BP model is introduced from the three modules of BP network, PSO algorithm and chaos learning algorithm. Based on the theoretical basis introduced in Chapter 3, this paper introduces the implementation steps of the CPSO-BP model in detail from the perspectives of feature selection and model implementation method. It further analyzes the optimization process of CPSO-BP and introduces the implementation method of the CPSO-ELM model compared with the CPSO-BP model.
[0250] 41 Feature Selection
[0251] When selecting input features, it is necessary to determine the correlation between each feature and the wave height. In order to select more effective input features, it is necessary to analyze the correlation coefficient between each input parameter and the wave height, and select features with high correlation coefficients as input features for predicting wave height. The candidate neural network input features are: Mean Sea Level (MSL), 10-meter wind speed U component (U10), 10-meter wind speed V component (V10), Mean Wave Direction (MWD), Mean Wave Period (MWP).
[0252] The present invention uses the Pearson correlation coefficient r x,y The correlation between each variable and the sea wave height (SWH) is calculated, and the correlation is used as a reference to select the input features of the neural network. Pearson correlation coefficient r x,y Used to quantitatively analyze the correlation between variables, r x,y ∈[-1, 1], when |r x,y | is close to 1, the correlation between the two is high, and when |r x,y | is close to 0, and the correlation between the two is low. x,y The positive or negative value represents the positive or negative correlation between the two variables. It can be calculated according to the following formula:
[0253]
[0254] |r x,y |>0.8, the two variables are highly correlated; when |r x,y |∈[0.3,0.5)), the two variables are lowly correlated; when |r x,y When |<0.3, the two variables are weakly correlated. The correlation coefficients between SWH and different input features are shown in Table 1:
[0255] Table 1 Pearson correlation coefficients between SWH and various characteristics
[0256]
[0257] It can be seen from Table 1 that the absolute value of the Pearson correlation coefficient of V10 and MWP is greater than 0.5. MWP is the average wave period, but MWP is calculated based on the wave fluctuation period after the wave is generated. As a posteriori data, it is not suitable to be used as the input of the wave height prediction neural network. At the same time, U10 and V10 are the wind speed components in accuracy and latitude respectively, and their correlation is not suitable to be taken out alone as a parameter for wave height prediction. Through feature fusion, the wind speed value UV of the observation point is calculated and used as the input of the network. UV can be calculated by the following formula:
[0258]
[0259] like Figure 5 As shown in the figure, the new feature UV after feature fusion has the highest correlation with SWH, and unlike MWP, UV is not a posteriori and can be used as an input feature.
[0260] Because of the existence of accidental factors, significance analysis is also required to ensure the high correlation between each parameter and SWH. The present invention uses P value (Pvalue) to analyze the significance of each parameter. When the null hypothesis is established, the P value represents the probability of occurrence of extreme situations. The smaller the P value, the smaller the probability of occurrence of extreme situations, and the larger the P value, the greater the probability of occurrence of extreme situations. Therefore, the size of the P value represents the significance of each parameter. When the P value is less than 0.05, it means that the variable is significant; when the P value is less than 0.001, it means that the variable is highly significant; only when the significance is high and the correlation coefficient is high, it makes sense to use this parameter as an input feature. Good input has a high correlation and the P value is generally less than 0.1. The smaller the P value, the more obvious the relationship between the two sets of data can be considered.
[0261] The significance of SWH and different input features is shown in Table 2. MSL and UV have high significance, and the probability of extreme cases is low, which is suitable for use as network input feature values. U10 and v10 are too significant and are not suitable as network input feature values. The reason is that they are the wind force components in the longitude and latitude directions, respectively, and cannot fully represent the wind force. The fused UV represents the wind force, so it is more appropriate to use the fused UV as the input parameter.
[0262] Table 2 P values of SWH and each input feature
[0263]
[0264] Figure 6Taking the Bohai Sea 121°E, 40°N station as an example, the UV, U10, V10 and SWH curves for the whole year of 2020 are drawn. The data source is the ERA5 dataset, which will be described in detail in Chapter 5 of this paper. Figure 6 As shown in the figure, it can be seen from the SWH curve that the wave height in the Bohai Sea is generally high in February and November, with maximum values, and the overall wave height is low in April, July and September, with minimum values. In the figure, the UV curve also has maximum values in February and November, and minimum values in April, July and September, which is highly consistent with the trend of the SWH curve; while the maximum value of the U10 curve appears in April, October and November, and the minimum value appears in February, September and November; the maximum value of the V10 curve appears in February, May, August and November, and the minimum value appears in January, April, November and December, which has a low similarity with the trend of the SWH curve. In summary, the UV curve and the SWH curve are highly similar, and UV and SWH have the same change trend; while the U10 curve and the V10 curve are quite different from the SWH curve, and the change trends of U10 and V10 are significantly different from those of SWH, and are not suitable as input features of the prediction model.
[0265] In summary, UV and MSL are highly correlated with SWH, and the present invention selects UV and MSL as input features of the network for wave height.
[0266] 4.2 Introduction to CPSO Algorithm
[0267] The particle swarm optimization algorithm is divided into two states: exploration state and development state. In the exploration state, the traditional particle swarm algorithm searches the problem space in a random way, but at this time the particles may mutate and fall into the local optimal solution; in the development state, the particle swarm aggregates to the optimal area.
[0268] The boundary between these two states is fuzzy. It is precisely because of the random characteristics of the heuristic algorithm that there is no clear boundary between the exploration state and the development state, which leads to the premature convergence of the particle swarm algorithm. This can be solved by introducing a chaotic learning algorithm.
[0269] Chaotic behavior is highly nonlinear, but each highly chaotic model will present certain behavioral characteristics. In certain environments, chaos algorithms can be applied. Therefore, when using the particle swarm algorithm for solving problems, its chaotic model can be established according to its particle swarm behavior characteristics to solve the problem of premature convergence of the particle swarm.
[0270] Initialize the position of the particle swarm, and the initial position of the i-th particle is expressed as:
[0271] X i =(x i,1 , X i,2 , ...Xi,N ), i∈[1,m] (29)
[0272] After the initial vector is generated, the chaotic algorithm is used to initialize the generated initial vector. Using the characteristics of the chaotic algorithm, for each X of the initial vector i Assign N initial values to generate chaotic variables The initial value can be mapped from the problem space to the chaos space by the following formula:
[0273]
[0274] Find the current optimal solution and the optimal solution in the entire particle swarm to determine the update rate. The solution with the highest current fitness is denoted as P i , the optimal solution in the entire particle swarm is denoted as P g .
[0275] The current optimal solution of the i-th particle is expressed as:
[0276] P i =(P i1 , P i2 , ...P iN ), i∈[1,m] (31)
[0277] The global optimal solution is expressed as:
[0278]
[0279] PSO changes the speed of each particle in different rounds so that the solution tends to P i and P g The direction is updated to obtain the optimal solution.
[0280] The velocity of the i-th particle is updated by the following equation:
[0281]
[0282] Where c1 is the local acceleration coefficient, c2 is the global acceleration coefficient, ω∈R, which is called the inertia weight coefficient r1 and r2 are random real numbers in the interval (0, 1). Small values of c1 and large values of c2 can make the particles converge to the global optimal solution in the later stages of optimization. The local acceleration coefficient is calculated by the following formula:
[0283]
[0284] The overall acceleration factor is calculated by the following formula:
[0285]
[0286] Among them, c 1i and c2i are the initial values of the acceleration coefficients c1 and c2, and c 1f and c 2f is the final value of the acceleration factor.
[0287] The adaptive inertia weight coefficient can be calculated by the following formula:
[0288]
[0289] Among them, ω max and ω min are the maximum and minimum values of the weight coefficient ω, respectively. As the evolution process progresses, ω gradually decreases. f is the fitness of the current particle, f av is the average fitness of the particle swarm as a whole, f min is the minimum fitness in the particle swarm.
[0290] The velocity of the i-th particle is updated by the following equation:
[0291]
[0292] Among them, X i is the position of particle i, V i represents the velocity of particle i, V i ∈(V min , V max ), V min and V max In [0, 1]; λ∈R is called the limiting factor, which is used to adjust ω∈R to limit the rate. The calculation terminates when the maximum number of rounds is reached or converges to meet the fitness requirements.
[0293] The detailed process of the CPSO algorithm is shown in Algorithm 1.
[0294] Algorithm 1
[0295]
[0296]
[0297] 4.3 Implementation method of CPSO-BP model
[0298] This section introduces how CDW optimizes the initialization phase of the BP model.
[0299] (1) Determine the BP network model structure.
[0300] Through feature selection, the present invention selects UV and MSL as input feature values. Determine the number of network input nodes S i is 2, the number of hidden layer nodes is S o=1, and the number of hidden layer nodes S l Set to 5. Figure 7 The BP neural network structure used in the present invention. The dimension N of each particle can be calculated by the following formula:
[0301] N=S i ×S l +S l ×S o +S l +S o +q,q=1 (38)
[0302] Among them, q is the fitness value of each particle, which is placed in the last dimension of each particle to form a 22-dimensional particle X i ; S i ×S l is the number of weights from the input layer to the hidden layer, S l is the number of thresholds of the hidden layer. From formula (41), we can determine that the dimension of the particle is N=22.
[0303] (2) Set the initial parameters of CPSO.
[0304] Set the limiting factor λ = 0.92 and the maximum value of the adaptive inertia weight factor ω max = 0.9 and the minimum value ω min =0.4, set the initial value of the acceleration factor c 1i =c 2i =0.5, set the final value of the acceleration factor c 1f =c 2f =2.5.
[0305] (3) According to the structure of the BP network model, the initial vector in the CPSO algorithm is generated, and the chaotic vector is generated.
[0306] The weights from the input layer to the hidden layer and the threshold of the hidden layer are used as elements in the CPSO matrix. Each particle in the CPSO represents the initial parameters of the BP network. When the population X is initialized, the model randomly generates a particle population of size m of 2000. The i-th particle of the initial population is calculated by the following formula:
[0307] X i =(x i,1 , x i,2 ,...x i,m ), i = 1, 2, ..., 22 (39)
[0308] Then, for X i A small disturbance is added to each parameter in to generate the initial chaotic vector. The i-th initial chaotic vector is calculated by the following formula:
[0309]
[0310] (4) Each particle in the population is scored based on its fitness.
[0311] The fitness of each particle is the inverse of the mean square error. Each particle in the population is scored by the size of the fitness, and the score of each particle is set as the last item of the vector. The fitness is used together with the weight and threshold of the BP network model as the parameters of the particle to determine the structure of a particle. The fitness of the i-th particle is calculated by the following formula:
[0312]
[0313] Each particle is sorted according to the obtained fitness value, the top five particles are regarded as the winning particles, and the second five particles are regarded as temporary particles.
[0314] (5) Sort the particle swarm according to the fitness value, then optimize the particle swarm to generate a new particle swarm.
[0315] According to the fitness score, the top five particles are ranked as the winning particles, denoted as i = 1, 2, ..., 5, the next five particles after these five particles are used as temporary particles, denoted as i = 1, 2, ..., 5. Then, the ten selected winning particles and temporary particles are used as new centers and added to the random matrix 19 times to generate 19 new particles. It can be expressed as Randomly generate a 22-dimensional matrix Y = [y1 y2 ... y 22 ], where. Add them to matrix Y respectively, and normalize the new matrix after addition to the same interval as Y. The new matrix after addition can be calculated by the following formula:
[0316]
[0317] Among them, l manx It can be calculated by the following formula:
[0318] l max ={max||x i +y i |, i=1, 2, ..., 22}, n=1, 2, ..., 19 (43)
[0319] Each winning particle and temporary particle and the 19 Z generated later n A new particle group is formed. Thus, 5 new winning particle groups are generated, recorded as And 5 new temporary particle groups, denoted as
[0320] (6) Chaotic convergence and chaotic alienation operations.
[0321] The five winning particles and the five temporary particles are taken as the centers respectively, 10 new particle groups are generated, and the newly generated particles are reordered according to the fitness values.
[0322] Chaotic convergence: When the sub-groups are performing convergence operations, the population will generate a new sub-group with the individual with the highest score as the center. If there is a higher score than the new sub-group, the convergence operation will continue with the new winning individual as the center. Update the average value f of the fitness f of the calculated particles av and the minimum value f of fitness f min , update the weight coefficient ω.
[0323] Chaos alienation: Update the adaptive inertia weight coefficient ω, local acceleration coefficient c1 and overall acceleration coefficient c2. Substituting the updated value into formula 36 can calculate the speed of the particle after chaos, and then the new position of the particle can be calculated by formula 40. Recalculate the particle coordinates and fitness f according to the new position of the particle. When a particle with a higher f value appears, use this particle to generate a new particle group, and eliminate particles with low fitness values until the particle group matures and all individuals converge.
[0324] If the alienated particle swarm has not converged yet, repeat this step until the network converges.
[0325] (7) The individual X with the highest fitness best =[x1 x2 ... x 22 ] as the input of BP neural network.
[0326] X best where x1, x2, ..., x 10 As the connection weight from the network input layer to the hidden layer, denoted as X best Medium 11 , x 12 , ..., x 15 As the connection weight from the neural hidden layer to the output layer, W2 = [x 11 , x 12 , ..., x 15 ] T ; X best Medium 16 , x 17 , ..., x 20 As the threshold of each node in the hidden layer, denoted as B1 = [x 16 , x 17, ..., x 20 ] T X best Medium 21 As the threshold of each node in the output layer, denoted as B2 = [x 21 ] T . Set W = [W1, W2] T and B = [B1, B2] T They are used as the initial weights and thresholds of the BP network respectively to form the initial CPSO-BP model.
[0327] (8) Train the prediction model and perform simulation prediction (see Figure 8 ).
[0328] 4.4 Optimization process of CPSO-BP model
[0329] In the CPSO-BP model, CPSO searches for the best particles in the solution space to optimize the initial weights and thresholds of the BP network. CPSO discovers particles with higher fitness through convergence and alienation operations. Before performing the convergence operation, CPSO first sorts all particles according to the fitness value, and finds the best particles and temporary particles from the top-ranked particles. Then, a new particle swarm is generated with the best particles and temporary particles as the center, and each newly generated particle swarm is sorted and convergence and alienation operations are performed. When the alienation process no longer produces particles with higher fitness values, that is, when the best particle is found, the particle swarm is no longer updated and the algorithm ends.
[0330] In the optimization process of CPSO, after selecting 5 winning particles and 5 temporary particles, 5 winning particle swarms and 5 temporary particle swarms were generated with them as the center. Taking the real process of CPSO algorithm as an example, Fig. 9 is the fitness score of the convergence process of the five winning particle groups, Fig.10 It is the fitness score of the convergence process of the five temporary particle groups. Fig. 9 and Fig.10 It can be seen that the fitness score of each particle swarm tends to a stable value after a certain number of changes, which means that the particle swarm has matured and the fitness score no longer changes. After each particle swarm undergoes convergence operations, the final score of each particle swarm is the fitness value of the particle with the highest score within it. After the optimal particle swarm is updated, it enters the alienation stage.
[0331] Fig.11 is the fitness score diagram of the convergence process of the winning particle group after mutation, Fig.12 is the fitness score diagram of the convergence process of the temporary particle swarm after mutation. Fig.11 It can be seen that after alienation, no particles with a fitness value higher than the winning particle are produced, so the fitness score does not change. Fig.12 It can be seen that among the five temporary particle groups, subpopulation 1, subpopulation 3, and subpopulation 5 produced individuals with higher fitness scores after mutation.
[0332] contrast Fig. 9 and Fig.10 From the particle scores in , we can see that the fitness scores of subpopulation 2, subpopulation 3 and subpopulation 4 in the winning particle group are lower than the fitness scores of subpopulation 1, subpopulation 2 and subpopulation 5 in the temporary particle group. Therefore, subpopulation 2 in the winning particle group is replaced by subpopulation 1, subpopulation 2 and subpopulation 5 in the temporary particle group, and subpopulation 3 and subpopulation 4 enter the alienation stage as the new winning particle group. Then the three particle groups replaced by the winning particle group are eliminated, and three new particle groups are randomly generated in the temporary particle group to enter the alienation stage. Fig.11 The fitness score of the particle swarm in does not change because they have found the optimal solution before entering the alienation stage, so the particle swarm does not change when entering the convergence stage. Fig.11 and Fig.12 It can be seen that after four convergence operations, the fitness score of the particle swarm no longer changes, indicating that all particle swarms are mature and meet the algorithm stop condition, and the CPSO algorithm optimization ends here. The value of the particle with the highest fitness value found by CPSO is passed to the BP neural network as the initial weight and threshold.
[0333] 4.5 CPSO-ELM model implementation
[0334] The form of the CPSO-ELM model is similar to that of the CPSO-BP model. The CPSO algorithm strategy remains unchanged, and after the CPSO algorithm is finished running, the optimal solution found by the algorithm is passed to the ELM as its initial weight and threshold.
[0335] After ELM determines the weights of each node from the input layer to the hidden layer and the threshold of the hidden layer, ELM can automatically determine the weights of the neurons in the hidden layer to the neurons in the output layer. Through the feature selection of Section 41, the present invention selects UV and MSL as input feature values and predicts SWH by training the BP neural network. Number of input neurons S i is 2, the number of output layer nodes is S o is 1, and the number of hidden layer nodes S l Set to 5, the network structure of ELM is as follows Figure 3 As shown. The dimension N of each particle is calculated by the following formula:
[0336] N=S i ×S l +S l +q,q=1 (44)
[0337] Among them, q is the fitness value of each particle, which is placed in the last dimension of each particle to form a 16-dimensional particle R i ; S i ×S l is the number of weights from the input layer to the hidden layer; S l is the threshold number of neurons in the hidden layer. From formula 47, we can determine that the dimension of the particle is N=16.
[0338] The basic idea of the CPSO-ELM model is to use the parameters optimized by the CPSO algorithm as the initial weights and thresholds of the ELM network. Its optimization strategy is the same as that of the CPSO-BP model, which attempts to optimize the prediction effect by optimizing the neural network parameters.
[0339] Fig.13 This is the prediction flow chart of the CPSO-ELM model.
[0340] 46 First, the input feature selection of the BP neural network is introduced, and the various features of the wave height are analyzed. Finally, UV and MSL are selected as the input features of the BP neural network. Next, the workflow of the CPSO-BP model is introduced in detail. The workflow of the CPSO-ELM model is also introduced as a comparison.
[0341] 5. Experimental results and analysis
[0342] Based on the CPSO-BP wave height prediction model, the present invention selects the standard BP neural network (St-BP) to compare with the prediction results of CPSO-ELM and CPSO-BP, and analyzes the advantages of CPSO-BP model in wave height prediction in the field of marine early warning through simulation results.
[0343] This paper first introduces the experimental data set and evaluation indicators to prepare for the subsequent analysis of experimental results. Then, the accuracy of the prediction results and the performance of the model are compared. The three models of St-BP, CPSO-ELM and CPSO-BP are evaluated by multiple indicators, and the accuracy, generalization ability, prediction stability and timeliness of the three models are compared one by one.
[0344] 51 Experimental Preparation
[0345] The present invention uses ocean wave height data from the Yellow Sea and the Bohai Sea, and the data source is the ERA5 data set from the European Centre for Medium-Range Weather Forecasts (ECMWF). ERA5 is the fifth generation data set obtained by ECMWF by reanalyzing global meteorological data by combining model data with observational data from all over the world. The ERA5 data set uses satellite observations with extremely high spatial resolution. The data set provides hourly estimates of the atmosphere and uses a consistent uncertainty representation method, so the data is standardized and reliable.
[0346] The present invention selects six observation stations in the Yellow Sea and Bohai Sea regions, with a total of 12 observation points. The distribution of Bohai Sea stations is shown in Figure 14 (a), and the distribution of Yellow Sea stations is shown in Figure 14 (b). The average state data of effective wave height in Figure 14 is from ERA5, which is the average from 1981 to 2010. The observation points of the Yellow Sea wave height data are 122°E and 123°E at 345°N, 355°N, and 365°N in the Yellow Sea. The observation points of the Bohai Sea wave height data are 120°E and 121°E at 38°N, 39°N, and 40°N in the Bohai Sea.
[0347] The 12 observation points collect data 4 times a day, starting from 0:00 and collecting data every 6 hours. The time span of the data set used in this invention is from January 1, 2020 to December 31, 2020. The amount of data at each observation point is 1464 groups, representing the wave height at each observation point at each time point. There are 8784 groups of data in six observation points in each sea area. The total number of data for the two sea areas is 17568.
[0348] The observation point data for the Bohai Sea and the Yellow Sea within one year are shown in Figure 14. Fig.15 This is the 2020 wave height chart of six stations in Bohai Sea. Fig.16 These are the wave heights in 2020 at six stations in the Yellow Sea.
[0349] from Fig.15 It can be seen that the overall wave trend in the Bohai Sea is stable. The curve after smoothing the annual observations of the six stations has a small change rate in each season, and the sea conditions are relatively stable. The wave height from June to November is lower than that in other months. At the 120°E, 40°N station, there were large waves lasting for several days in mid-February and mid-November, and a peak wave height appeared at the end of December. Fig.16It can be seen that the wave height in the Yellow Sea was generally stable in 2020, with the highest wave height of the year occurring in December. This may be due to the sudden climate events that the Yellow Sea faced in 2020, which caused large fluctuations in the wave height curve in the figure. On the whole, although the Bohai Sea experienced two months of sudden changes in wave height in mid-February and mid-November, and the wave height in the Yellow Sea in December changed significantly compared with other months, the wave heights in the two major sea areas in 2020 showed a certain periodicity, and generally showed a certain regularity.
[0350] 53 evaluation indicators
[0351] The present invention selects MAE, MAPE, RMSE, NSE and R 2 These five indicators are used as indicators to verify the model error and verify the experimental error from different aspects. The following is a detailed description of these indicators:
[0352] Mean absolute error (MAE) is used to compare the degree of fit between the prediction result and the true value. The value range is [0, +∞). The closer the MAE value is to 0, the closer the model is to the true value. When the MAE value is 0, it means that the model can perfectly predict the true value. MAE can be calculated by the following formula:
[0353]
[0354] The mean absolute percentage error (MAPE) is used to evaluate the prediction model. When MAPE is closer to 0, the model prediction effect is better; when MAPE is greater than 100%, the model prediction effect is unreliable. It can be calculated by the following formula:
[0355]
[0356] The root mean square error (RMSE) ranges from [0, +∞). RMSE can intuitively represent the order of magnitude of the error. For example, when RMSE = 1, it means that the regression effect is 1 less than the true value. RMSE can be calculated by the following formula:
[0357]
[0358] The Nash efficiency coefficient (NSE) ranges from (-∞, 1] and is used to evaluate the quality of the model prediction results. The closer the NSE is to 1, the better the quality of the model and the higher the credibility. The closer the NSE is to 0, the more credible the prediction results are. When the NSE is much less than 0, the model prediction results are unreliable. NSE can be calculated by the following formula:
[0359]
[0360] Regression coefficient R 2 Reflects the correlation between variables. 2The value is [0, 1], R 2 The closer it is to 1, the better the prediction accuracy of the model; 2 The closer it is to 0, the worse the prediction accuracy of the model. 2 <0.3, the model is considered unreliable; when R 2 >0.6, the model is considered to have certain predictive ability; when R 2 >0.7, the model is considered to be able to make relatively accurate predictions; when R 2 >0.8, the model is considered to have good predictive ability. 2 It can be calculated by the following formula:
[0361]
[0362] 53 Experimental Results Analysis
[0363] This section uses CPSO-BP and the St-BP model and CPSO-ELM model without CPSO optimization to conduct simulation experiments. By comparing the various indicators of the prediction results of the three models, the effect of CPSO algorithm on optimizing the BP model is compared.
[0364] 531 Prediction Accuracy Analysis
[0365] Table 3 Initial parameters of three types
[0366]
[0367] The present invention uses MATLAB for simulation, and the computer configuration used in the experiment is: Windows 10 operating system, hard disk size is 1T, and MATLAB version is R2018a. As shown in Table 3, the ELM and BP neural networks used both use a neural network structure with 2 input neurons, 5 hidden layer neurons and 1 output neuron. The learning rate η is 0.05, and the convergence error ε is set to 0.001. As a control in the CPSO-ELM and CPSO-BP models, the particle swarm size is set to 2000, and the number of winning particle swarms N s and the number of temporary particle swarms N t It is set to 5, and the iteration threshold iter is set to 10. Table 3 shows the initialization parameters of the four models.
[0368] There are six stations in each sea area, and each station collects 12 months, 4 data per day, and the data set totals 16768 sets of data. The three models are the prediction results of the prediction model trained with December in the Yellow Sea as the prediction set and the other 11 months as the training set. The first 8384 sets of data in the two sea areas are used as the training set of the model, and the last 400 sets of data are used as the test set for the experiment.
[0369] Fig.17 , Fig.18 , Fig.19 The regression trend lines and regression scatter plots of the actual data and predicted values of the training and test sets of the St-BP, CPSO-ELM and CPSO-BP models in the experiment are shown respectively. The closer the slope of the predicted regression trend is to 1, the better the training effect of the model is; the closer it is to 0, the worse the training effect of the model is. In the scatter plot, the more concentrated the scatter points are and the closer they are to the regression trend line, the more accurate the model's prediction is.
[0370] Fig.17 , Fig.18 , Fig.19 By calculating R 2 The generalization ability of the three models was evaluated. 2 The closer it is to 1, the higher the generalization ability of the model; the closer it is to 0, the lower the predictive generalization ability of the model.
[0371] like Fig.17 , R in the St-BP training phase 2 07479, R in the testing phase 2 The prediction accuracy in the test phase is not significantly lower than that in the training phase, and the model has a certain generalization ability. The trend distribution line of the test set is y=07454x+01989, and the slope of the distribution line is close to 1, indicating that the prediction is relatively accurate.
[0372] like Fig.18 , R in the CPSO-ELM training phase 2 08519, the test phase of R 2 The model prediction effect is good. The R 2 Compared with the R 2 The trend distribution line of the test set is y=07560x+01919, and the slope of the distribution line is closer to 1 than the slope of the prediction trend distribution line of St-BP. The generalization and prediction capabilities of CPSO-ELM are better than those of St-BP.
[0373] like Fig.19 , R in the CPSO-BP training phase 2 08713, the test phase of R 2 The model prediction effect is good. The R 2 Compared with the training stage, the R 2In both the training and testing phases, the CPSO-BP model has a strong generalization ability. The trend distribution line of the test set is y=08508x+02034, and the slope of the distribution line is close to 1, which is closer to 1 than the St-BP model and the CPSO-ELM model. The generalization and prediction ability of CPSO-BP is better than that of St-BP and CPSO-ELM.
[0374] The prediction accuracy of the CPSO-BP model in both the training and testing phases is higher than that of the other two models. 2 The R of CPSO-BP in the training and prediction stages is also higher than that of the other two models, indicating that the generalization ability of the CPSO model is better than that of the St-BP and CPSO-ELM models. 2 The value is higher than that of CPSO-ELM in the training and prediction stages. 2 The value shows that the prediction effect of the BP network optimized by the CPSO algorithm is better than that of the ELM. After the CPSO algorithm improves the initial parameters, the generalization ability of the two models has been significantly improved. In general, the CPSO algorithm has improved the prediction effect of both the BP neural network and the ELM. Although the particle positions generated by each CPSO optimization algorithm are random in each initialization stage, the trend line and R 2 There will be some changes. After comprehensive comparison, the prediction effect of CPSO-BP model is the best, followed by CPSO-ELM model.
[0375] Table 4 Evaluation index table of St-BP prediction results
[0376]
[0377] Table 5 Evaluation index table of CPSO-ELM prediction results
[0378]
[0379] Table 6 Evaluation index table of CPSO-BP prediction results
[0380]
[0381] 5.3.2 Comparison between prediction results and actual data
[0382] Fig. 20 , Fig.21These are the simulation data comparison charts for the Bohai Sea and the Yellow Sea. The data from the first 11 months in the Bohai Sea and the Yellow Sea were used as the training sets for the experiment, and the data from December was used as the test set. The three models of St-BP, CPSO-ELM and CPSO-BP were trained respectively, and the prediction effects of the three were compared. By putting the prediction curves and real data curves of the three models of St-BP, CPSO-ELM and CPSO-BP in the same figure, the prediction effects and prediction errors of the three models can be seen more intuitively. The data from the first 11 months in the Bohai Sea and the Yellow Sea were used as the training sets for the experiment, and the data from December was used as the test set. The three models of St-BP, CPSO-ELM and CPSO-BP were trained respectively, and the prediction effects of the three were compared.
[0383] like Fig. 20 , Fig.21 As shown in the figure, in the prediction of the wave height in the Bohai Sea in December, the prediction curve of the CPSO-BP model is closest to the true value curve of the Yellow Sea and Bohai Sea, and the St-BP and CPSO-BP models also have good prediction effects; in the prediction of the wave height in the Yellow Sea in December, the prediction curves of the three models have certain deviations from the true value, and the prediction curve of the CPSO-BP model is closest to the true wave height curve, and the prediction curves of the St-BP and CPSO-ELM models have large deviations. CPSO optimizes the position update strategy of the particle swarm algorithm in the initialization and convergence stages, so that the particle swarm can be more fully filled in the entire solution space when it is initialized, to ensure that the particle swarm evolves in a better direction. Fig. 20 and Fig.21 It can be seen that the prediction curve of the CPSO-BP model is closest to the actual wave height data. In general, the CPSO-BP prediction curve has the best fitting degree for the prediction of ocean wave height in the Bohai Sea area, and the combination of the CPSO algorithm and the BP neural network can obtain better prediction results.
[0384] 5.4 Prediction Performance Analysis
[0385] 5.4.1 Forecast Error Analysis
[0386] from Fig.15 It can be seen that the overall wave trend in the Bohai Sea is stable and the sea conditions are relatively stable. However, in mid-February and mid-November, there were large waves that lasted for several days. Fig.16It can be seen that the wave height changes in the Yellow Sea and the Yellow Sea in 2020 were relatively stable. On the whole, the wave heights in the two major seas showed a certain periodicity in 2020, and generally showed a certain regularity. Sudden changes in wave height occurred in the Bohai Sea in mid-February, mid-November and December, and in the Yellow Sea in December. Therefore, in the error analysis experiment, in addition to using the first 11 months as training sets and December as a test set, the data of February and November in the Bohai Sea were used as test sets, and the data of the other 11 months were used as training sets to predict the model. Similarly, for the Yellow Sea, February, November and December were used as test sets, and the other 11 months were used as training sets to verify the model.
[0387] Tables 4, 5 and 6 show the values and averages of the four indicators of MAE, MAPE, RMSE and NSE of the prediction results of the three models of St-BP, CPSO-ELM and CPSO-BP respectively. By comparing the average values of the four evaluation indicators, it can be seen that the average values of MAE, MAPE and RMSE of CPSO-ELM are all smaller than the average values of the indicators of CPSO-BP and St-BP, and the average value of NSE of CPSO-ELM is greater than the average values of NSE of CPSO-BP and St-BP, indicating that the prediction effect of CPSO-BP is worse than that of CPSO-ELM and St-BP. The average values of the indicators of CPSO-ELM are close to the average values of the indicators of CPSO-BP. Although the prediction effect of CPSO-ELM is not as good as that of CPSO-BP, it is very close to that of CPSO-BP. In general, CPSO-BP has the best prediction effect and generalization ability, followed by CPSO-ELM.
[0388] Fig. 22 This is a bar chart comparing the average values of the three wave height prediction results for the Bohai Sea. Fig.23 The following is a bar chart comparing the average values of the three model wave height prediction results for the Yellow Sea. Fig. 22 It can be seen that the MAE, MAPE and RMSE indicators of CPSO-BP's prediction results for Bohai Sea are the lowest among the three models, which means that the prediction error of CPSO-BP is the lowest among the three models; the NSE indicator of CPSO-BP's prediction results for Bohai Sea is the highest among the three models, which means that the prediction effect of CPSO-BP model is the best among the three models. Fig.23It can be seen that the MAE and MAPE indicators of CPSO-BP's prediction results for the Yellow Sea are the lowest among the three models, and the RMSE indicator of St-BP's prediction results for the Yellow Sea is the lowest among the three models. This may be due to the abnormal changes in the wave height in the Yellow Sea in December 2020, which led to unstable prediction results of CPSO-BP and CPSO-ELM. However, under unstable sea conditions, the prediction performance of CPSO-BP is still better than that of CPSO-ELM, and the prediction generalization ability of the CPSO-BP model is stronger; the NSE indicator of CPSO-BP's prediction results for the Yellow Sea is the highest among the three models, which shows that the prediction effect of the CPSO-BP model is the best among the three models. In short, CPSO-BP has the best prediction effect in sea areas with stable sea conditions, and still has strong generalization ability in unstable sea conditions.
[0389] 542 Prediction Stability Analysis
[0390] Tables 4, 5, and 6 show the four evaluation indicators of the prediction results. The average values of MAE, MAPE, and RMSE of the prediction results of the CPSO-BP model are the smallest among the three models. Although in specific predictions, the error of CPSO-ELM is smaller than that of CPSO-BP, but overall, the prediction effect of CPSO-BP is the most ideal.
[0391] There is a certain degree of randomness in the optimization process of neural network models. The same model may have different predictions for the same month. For example, abnormal climate will cause deviations in the predicted values. The larger the deviation, the worse the simulation effect of the model. The smaller the deviation, the better the simulation effect of the model. Table 7 shows the variances of the four indicators of the prediction results of the three models. By comparing the variances of the indicators, the prediction stability of the three models can be compared.
[0392] Table 7 shows the variances of the prediction results of the three prediction models. It can be seen from the table that CPSO-ELM has the lowest variance in MAE and NSE indicators, but the variances of the MAE indicator of the three models are at the same order of magnitude; CPSO-BP has the lowest variance in MAPE and RMSE indicators, and the variance of MAPE is one order of magnitude lower than that of the other two models. In general, the CPSO-BP model and the CPSO-ELM model have similar stability, and the stability of both models is better than that of St-BP.
[0393] Table 7 Prediction variance of each indicator in the three models
[0394]
[0395] Fig.24The following is a bar chart comparing the variances of the four indicators of the prediction results of the three models. It can be seen intuitively from the figure that the variances of the MAPE and RMSW indicators of CPSO-BP are much lower than those of St-BP and CPSO-BP; the variances of the MAE and NSE indicators of the three models are in the same order of magnitude. Overall, the CPSO-BP model has the best stability.
[0396] The goal of training network models is to make accurate and fast predictions. As shown in Table 8, the prediction results and prediction times of the three models are somewhat unstable. In order to make a more in-depth comparison of the accuracy and timeliness of the three models, each model was trained 10 times to predict the wave height in December, and the R value of each prediction result was calculated. 2 The mean and variance of each item were calculated to verify the prediction accuracy and stability of the three models.
[0397] As shown in Table 8, the average prediction accuracy of St-BP is 07368, the average prediction accuracy of CPSO-ELM is 07888, and the average prediction accuracy of CPSO-BP is 08393; the average running time of CPSO-BP is 8070 seconds, and the average running time of CPSO-ELM is 5710 seconds. In general, the prediction effect of CPSO-BP is the best, and the prediction effect of CPSO-ELM is second. The running time of the BP network itself is extremely fast, which is negligible compared with CPSO-ELM and CPSO-BP. Its average running time is the fastest among the three models. The optimization process of the CPSO algorithm requires generation-by-generation optimization operations, which makes the CPSO algorithm improve the prediction accuracy and generalization ability of the BP neural network, while also increasing the running time of the BP network. The prediction speed of CPSO-BP is related to factors such as the number of iterations, initial parameters, and number of samples of the CPSO algorithm. Since the ELM neural network runs faster than BP, the CPSO-BP model runs faster than the CPSO-ELM model. The prediction results of CPSO-BP are more accurate than those of CPSO-ELM. However, back propagation makes the network run longer, but improves the accuracy of the CPSO-BP model. As shown in Table 8, the average prediction accuracy of St-BP is 07368, and the average prediction accuracy of CPSO-BP is 08393. The CPSO-BP model greatly improves the prediction effect of the St-BP model. In general, the CPSO-BP model achieves the most accurate prediction results. Although the running time of the model is increased, the calculation speed is still faster than the physical model, and it can achieve more accurate predictions while ensuring timeliness.
[0398] In general, the prediction accuracy of CPSO-BP for the Bohai Sea and the Yellow Sea is better than that of St-BP and CPSO-ELM, and CPSO-BP has better stability and generalization ability. The average running time of the CPSO-BP model in ten experiments is at the same level as that of CPSO-ELM, but the prediction effect is better than that of CPSO-ELM. CPSO-BP can improve the prediction ability and generalization ability of the prediction model while ensuring the timeliness of the prediction.
[0399] Table 8 Prediction accuracy and running time of three models
[0400]
[0401] 55 This paper introduces the preparation related to the experiment, introduces the data set used by the present invention, and analyzes the wave height of the two target sea areas in that year through the data set. Then the calculation formulas and detailed descriptions of the five indicators used to evaluate the experimental results are given. Next, the experimental results are analyzed in detail. First, according to the trend distribution diagram of the prediction effect, the R 2 , compare the prediction accuracy and generalization ability of the three models; then, compare the prediction effects of the three models with the actual results, and further compare the prediction performance of the three models; then, compare the prediction effects of the models on the four indicators of the Yellow Sea and Bohai Sea in February, November and December to analyze the prediction effects of the models; finally, compare the variances of the four prediction indicators of the three models and the test set R of 10 predictions made by the three models 2 The prediction stability of the three models was compared, and the prediction timeliness of the three models was compared through the average prediction time of 10 predictions made by the three models.
[0402] Wave height prediction is related to marine early warning and the safe and timely implementation of offshore engineering. Traditional wave height prediction methods include physical models and empirical models. The physical model simulates the real sea conditions through mechanical analysis. The physical model can obtain relatively accurate prediction results, but due to the complexity of the marine environment, the physical model requires a large amount of computing resources in the modeling process, and the algorithm takes a long time to run. The establishment of the empirical model does not require any physical parameters, and the model training speed is fast, but the prediction accuracy is low. In marine early warning, the accuracy and speed of wave height prediction are both crucial.
[0403] Machine learning methods can build a wave height prediction model in a relatively short period of time. Compared with traditional physical models for wave height prediction, the use of deep learning methods for wave height prediction has the advantages of high accuracy, low cost, and fast operation speed. In the problem of wave height prediction in marine warning, it is very suitable to use deep learning methods for wave height prediction.
[0404] The present invention aims to build an accurate and efficient wave height prediction model by combining BP neural network and CPSO algorithm. Through the optimization ability of chaotic particle swarm optimization algorithm, the inherent deficiencies of neural network are compensated, and a more efficient model is obtained than the traditional physical method, which reduces the consumption of resources and modeling time while ensuring the prediction accuracy.
[0405] The present invention uses a BP neural network model (CPSO-BP) optimized based on a chaotic particle swarm optimization algorithm for ocean wave height prediction. An optimal particle is found by screening generation by generation, and the result of the CPSO algorithm is passed to the BP neural network. The calculation result of the CPSO algorithm is used as the initial weight and threshold of the BP neural network to form a CPSO-BP model. By using the trained CPSO-BP network to perform ocean wave height prediction tasks, the prediction performance of the network is improved.
[0406] The experiment of the present invention uses the wave height data recorded every 6 hours at 6 stations in the Bohai Sea and the Yellow Sea in 2020 by the Medium-Term Weather Forecast Center. By calculating and analyzing the correlation coefficient between each parameter of the wave height data and the wave height, the input features of the model were selected. The St-BP, CPSO-ELM, and CPSO-BP models were trained using the data from the first 11 months, and the data from the 12th month were used as a test set to evaluate the wave height prediction effects of the three models. By comparing the regression curves, prediction curves and various experimental indicators of the prediction results of the three models, the advantages of the CPSO-BP model in solving the wave height prediction problem in the field of marine early warning were analyzed from the perspectives of prediction accuracy, timeliness, robustness and generalization ability. The research on the CPSO-BP ocean wave height prediction model of the present invention has a certain reference role and application value for the future research on issues related to ocean wave height prediction.
[0407] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When the use is implemented in whole or in part in the form of a computer program product, the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.
[0408] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A method for predicting ocean wave height, characterized in that: The ocean wave height prediction method comprises the following steps: Features with high correlation coefficients are selected as input features for predicting wave height; a chaotic model is established according to the behavior characteristics of the particle swarm to solve the problem of premature convergence of the particle swarm; CDW optimizes the BP model in the initialization phase; in the CPSO-BP model, the chaotic particle swarm optimization algorithm (CPSO) finds the optimal particles in the solution space to optimize the initial weights and thresholds of the BP network; in the CPSO-ELM model, the parameters optimized by the CPSO algorithm are used as the initial weights and thresholds of the ELM network and passed into the ELM network; the CPSO-BP model is used to predict wave height in the field of marine warning; When selecting input features, the correlation between each feature and the wave height is determined, and the correlation coefficient between each input parameter and the wave height is analyzed, and the features with high correlation coefficients are selected as input features for predicting the wave height; among them, the candidate neural network input features include five features: mean sea level MSL, 10-meter wind speed U component U10, 10-meter wind speed V component V10, mean sea wave direction MWD, and mean sea wave period MWP; Pearson correlation coefficient r x,y The correlation between each variable and the wave height SWH is calculated, and the correlation is used as a reference to select the input features of the neural network; the Pearson correlation coefficient r x,y Used to quantitatively analyze the correlation between variables, r x,y ∈[-1, 1], when |r x,y | is close to 1, the correlation between the two is high, and when |r x,y | is close to 0, and the correlation between the two is low; r x,y The positive or negative value represents the positive or negative correlation between the two variables, which is calculated according to the following formula: Among them, |r x,y |>0.8, the two variables are highly correlated; when |r x,y |∈[0.3,0.5), the two variables are lowly correlated; when |r x,y When |<0.3, the two variables are weakly correlated; U10 and V10 are the wind speed components in terms of accuracy and latitude respectively. Their correlation is not suitable to be taken out separately as parameters for wave height prediction. Through feature fusion, the wind speed value UV at the observation point is calculated and used as the input of the network. UV can be calculated by the following formula: The new feature UV after feature fusion has the highest correlation with SWH, and unlike MWP, UV is not a posteriori and can be used as an input feature; The P value is used to analyze the significance of each parameter; the P value can be obtained by calculating the chi-square and then querying the chi-square distribution table, which is used to determine whether the H0 hypothesis is valid. The chi-square calculation formula is: Among them, i is the actual value, E i is the theoretical value; When the null hypothesis is true, the P value represents the probability of an extreme situation occurring; The implementation method of the CPSO-BP model includes: (1) Determine the BP network model structure; Through feature selection, select UV and MSL as input feature values; determine the number of network input nodes S i is 2, the number of hidden layer nodes is S o is 1, and the number of hidden layer nodes S l Set to 5; the dimension N of each particle can be calculated by the following formula: N=S i ×S l +S l ×S o +S l +S o +q,q=1; Among them, q is the fitness value of each particle, which is placed in the last dimension of each particle to form a 22-dimensional particle X i ; S i ×S l is the number of weights from the input layer to the hidden layer, S l is the number of thresholds of the hidden layer, and the dimension of the particles is N = 22; (2) Setting the initial parameters of CPSO; Set the limiting factor λ = 0.92 and the maximum value of the adaptive inertia weight factor ω max =0.9 and minimum value ω min =0.4, set the initial value of the acceleration factor c 1i =c 2i =0.5, set the final value of the acceleration factor c 1f =c 2f =2.5; (3) Generate the initial vector and chaotic vector in the CPSO algorithm according to the structure of the BP network model; The weights from the input layer to the hidden layer and the threshold of the hidden layer are taken as elements in the CPSO matrix. Each particle in the CPSO represents the initial parameters of the BP network. When the population X is initialized, the model randomly generates a particle population with a size of 2000. The i-th particle of the initial population is calculated by the following formula: X i =(x i,1 ,x i,2 ,x i,m ),=1,2,...,22; For X i A small disturbance is added to each parameter in to generate the initial chaotic vector. The i-th initial chaotic vector is calculated by the following formula: (4) Score each particle in the population based on its fitness; The fitness of each particle is the inverse of the mean square error. Each particle in the population is scored by the size of the fitness, and the score of each particle is set as the last item of the vector. The fitness is used together with the weight and threshold of the BP network model as the parameters of the particle to determine the structure of a particle. Among them, the fitness of the i-th particle is calculated by the following formula: The solution with the highest current fitness is denoted as P i , sort each particle according to the obtained fitness value, the top five particles are regarded as the winning particles, and the second five particles are regarded as temporary particles; (5) Sort the particle swarm according to the fitness value, then optimize the particle swarm to generate a new particle swarm; According to the fitness score, the top five particles are ranked as the winning particles, denoted as i=1,2,....,5 The next five particles after these five particles are regarded as temporary particles, and are recorded as i=1,2,...,5 Take the ten selected winning particles and temporary particles as new centers, add them to the random matrix 19 times, and generate 19 new particles respectively; Expressed as Randomly generate a 22-dimensional matrix Y = [y1 y2 ... y 22 ]; among them, Add them to matrix Y respectively, and normalize the new matrix after addition to the same interval as Y. The new matrix after addition can be calculated by the following formula: Among them, l manx Calculated by the following formula: l max ={max||x i +y i |i=1,2,...,22},n=1,2,...,19; Each winning particle and temporary particle and the 19 Z generated later n Form a new particle group; thus generate 5 new winning particle groups, recorded as And 5 new temporary particle groups, denoted as (6) Chaotic convergence and chaotic alienation operations; Take the five winning particles and the five temporary particles as the center, generate 10 new particle groups, and re-sort the newly generated particles according to the fitness value; Chaotic convergence: When the sub-groups are performing convergence operations, the population will generate a new sub-group with the individual with the highest score as the center. If there is a higher score than itself in the new sub-group, the convergence operation will continue with the new winning individual as the center; update the average value f of the fitness f of the calculated particles av and the minimum value f of fitness f min , update the weight coefficient ω; Chaos alienation: Update the adaptive inertia weight coefficient ω, local acceleration coefficient c1 and overall acceleration coefficient c2, calculate the speed of the particle after chaos and the new position of the particle; recalculate the particle coordinates and fitness f according to the new position of the particle. When a particle with a higher f value appears, use this particle to generate a new particle group, and eliminate particles with low fitness values until the particle group matures and all individuals converge. If the alienated particle swarm still does not converge, repeat this step until the network converges; (7) The individual X with the highest fitness best =[x1 x2...x 22 ] as the input of BP neural network; X best where x1, x2, ..., x 10 As the connection weight from the network input layer to the hidden layer, denoted as X best Medium 11 , x 12 , ..., x 15 As the connection weight from the neural hidden layer to the output layer, W2 = [x 11 , x 12 , ..., x 15 ] T ; X best Medium 16 x 17 , ..., x 20 As the threshold of each node in the hidden layer, denoted as B1 = [x 16 , x 17 , ..., x 20 ] T X best Medium 21 As the threshold of each node in the output layer, denoted as B2 = [x 21 ] T ; Set W = [W1, W2] T and B = [B1, B2] T They are used as the initial weight and threshold of the BP network to form the initial CPSO-BP model; (8) Train the prediction model and perform simulation prediction.
2. The ocean wave height prediction method according to claim 1, characterized in that: Initialize the position of the particle swarm, and the initial position of the i-th particle is expressed as: X i =(X i,1 ,X i,2 ,...X i,N ),∈[1,m]; After generating the initial vector, the chaotic algorithm is used to initialize the generated initial vector; the characteristics of the chaotic algorithm are used to initialize each X of the initial vector. i Assign N initial values to generate chaotic variables The initial value can be mapped from the problem space to the chaos space by the following formula: Find the current optimal solution and the optimal solution in the entire particle swarm to determine the update rate. The solution with the highest current fitness is denoted as P i , the optimal solution in the entire particle swarm is denoted as P g ; The current optimal solution of the i-th particle is expressed as: P i =(P i1 ,P i2 ,...P iN ),i∈[1,m]; The global optimal solution is expressed as: PSO changes the speed of each particle in different rounds so that the solution tends to P i and P g Update the direction of to obtain the optimal solution; The velocity of the i-th particle is updated by the following equation: Among them, c1 is the local acceleration coefficient, c2 is the overall acceleration coefficient, ω∈R, is called the inertia weight coefficient, r1 and r2 are random real numbers in the interval (0, 1); small values of c1 and large values of c2 can make the particles converge to the global optimal solution in the later stage of optimization; the local acceleration coefficient is calculated by the following formula: The overall acceleration factor is calculated by the following formula: Among them, c 1i and c 2i are the initial values of the acceleration coefficients c1 and c2, and c 1f and c 2f is the final value of the acceleration factor; The adaptive inertia weight coefficient can be calculated by the following formula: Among them, ω max and ω min are the maximum and minimum values of the weight coefficient ω, respectively. As the evolution process progresses, ω gradually decreases; f is the fitness of the current particle, f av is the average fitness of the particle swarm as a whole, f min is the minimum fitness in the particle swarm; The velocity of the i-th particle is updated by the following equation: Among them, X i is the position of particle i, V i represents the velocity of particle i, V i ∈(V min , V max ), V min and V max Within [0,1]; λ∈R is called the limiting factor, which is used to adjust ω∈R and limit the rate; the calculation terminates when the maximum round is reached or converges to meet the fitness requirements.
3. The ocean wave height prediction method according to claim 1, characterized in that: The optimization method of the CPSO-BP model includes: In the CPSO-BP model, CPSO searches for the best particle in the solution space to optimize the initial weights and thresholds of the BP network. CPSO discovers particles with higher fitness through convergence and alienation operations. Before performing the convergence operation, CPSO first sorts all particles according to the fitness value, and finds the best particle and temporary particle from the top-ranked particles. A new particle swarm is generated with the best particle and temporary particle as the center, and each newly generated particle swarm is sorted and convergence and alienation operations are performed. When the alienation process no longer produces particles with higher fitness values, that is, when the best particle is found, the particle swarm is no longer updated and the algorithm ends. In the optimization process of CPSO, after selecting 5 winning particles and 5 temporary particles, 5 winning particle swarms and 5 temporary particle swarms are generated with them as the center respectively; the fitness score of each particle swarm tends to a stable value after a certain number of changes, which means that the particle swarm has matured and the fitness score no longer changes; when each particle swarm undergoes convergence operation, the final score of each particle swarm is the fitness value of the particle with the highest score within it; after updating the optimal particle swarm, it enters the alienation stage; The fitness scores of subpopulation 2, subpopulation 3 and subpopulation 4 in the winning particle swarm are lower than those of subpopulation 1, subpopulation 2 and subpopulation 5 in the temporary particle swarm; therefore, subpopulation 2, subpopulation 3 and subpopulation 4 in the winning particle swarm are replaced by subpopulation 1, subpopulation 2 and subpopulation 5 in the temporary particle swarm as the new winning particle swarms to enter the alienation stage; the three particle swarms replaced by the winning particle swarm are eliminated, and three new particle swarms are randomly generated in the temporary particle swarm to enter the alienation stage; after 4 convergence operations, the fitness score of the particle swarm no longer changes, indicating that all particle swarms are mature at this time and meet the algorithm stopping conditions, and the CPSO algorithm optimization ends here; the value of the particle with the highest fitness value found by CPSO is passed into the BP neural network as the initial weight and threshold.
4. The ocean wave height prediction method according to claim 1, characterized in that: The implementation of the CPSO-ELM model includes: The form of the CPSO-ELM model is similar to that of the CPSO-BP model. The algorithm strategy of CPSO remains unchanged. After the CPSO algorithm runs, the optimal solution found by the algorithm is passed to ELM as its initial weight and threshold. After determining the weights of each node from the input layer to the hidden layer and the threshold of the hidden layer, ELM can determine the weights of the neurons from the hidden layer to the output layer by itself; through feature selection, UV and MSL are selected as input feature values, and SWH is predicted by training the BP neural network; the number of input neurons S i is 2, the number of output layer nodes is S o is 1, and the number of hidden layer nodes S l Set to 5; the dimension N of each particle is calculated by the following formula: N=S i ×S l +S l +q,q=1; Among them, q is the fitness value of each particle, which is placed in the last dimension of each particle to form a 16-dimensional particle X i ; S i ×S l is the number of weights from the input layer to the hidden layer; S l is the threshold number of neurons in the hidden layer, and the dimension of particles is N = 16; The basic idea of the CPSO-ELM model is to pass the parameters optimized by the CPSO algorithm into the ELM network as the initial weights and thresholds of the ELM network, and optimize the prediction effect by optimizing the neural network parameters.
5. An ocean wave height prediction system for implementing the ocean wave height prediction method according to any one of claims 1 to 4, characterized in that: The ocean wave height prediction system comprises: The feature selection module is used to select features with high correlation coefficients as input features for predicting wave height; The CPSO algorithm determination module is used to establish a chaotic model according to the behavior characteristics of the particle swarm and solve the problem of premature convergence of the particle swarm; CPSO-BP model implementation module, used to optimize the BP model in the initialization phase through CDW; CPSO-BP model optimization module, in the CPSO-BP model, is used to optimize the initial weights and thresholds of the BP network by finding the optimal particles in the solution space through CPSO; CPSO-ELM model implementation module, used to use the parameters optimized by the CPSO algorithm as the initial weights and thresholds of the ELM network and pass them into the ELM network; The wave height prediction module is used to predict the wave height in the field of marine early warning using the CPSO-BP model.
6. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the ocean wave height prediction method according to any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the ocean wave height prediction method according to any one of claims 1 to 4.
8. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the ocean wave height prediction system as described in claim 5.
