Ship seawater cooling system parameter prediction method based on HHWOA-TCN-BiGRU model
Through the HHWOA-TCN-BiGRU model, combined with the improved whale optimization algorithm, the challenges of data timing and nonlinear dynamics in the parameter prediction of ship seawater cooling system are solved, and accurate capture and prediction of complex data characteristics is achieved, which improves prediction Effect.
Patent Information
- Application Number
- CN202411497329.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-10
AI Technical Summary
The parameter prediction task of ship seawater cooling system faces data timing and nonlinear dynamic characteristics, and existing models are difficult to accurately capture complex data characteristics, resulting in poor prediction results.
Using the HHWOA-TCN-BiGRU model, features are extracted through the TCN model and BiGRU network, combined with the improved whale optimization algorithm to optimize the number of neurons and convolution kernel parameters, and the HHWOA-TCN-BiGRU model is constructed to predict the parameters of ship seawater cooling system .
Accurate capture and prediction of ship seawater cooling system parameters is achieved, improving the accuracy of prediction and the ability to adapt to complex data characteristics.
Smart Images

Figure CN119293453A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship parameter prediction, and in particular to a ship seawater cooling system parameter prediction method based on a HHWOA-TCN-BiGRU model. Background Art
[0002] At present, under the background of the era of "Industry 4.0", China's shipping industry is in a golden stage of development. Smart ships and smart shipping have emerged and have gradually become the focus of research in this era. The prerequisite for realizing full intelligence of ships is to be able to predict various parameters of ships during a period of navigation in real time and accurately, accurately identify various types of faults that may occur in the engine room, and make processing decisions. During the navigation of ships, the cooling water system plays a vital role in the normal navigation, among which the seawater cooling system undertakes the work of heat exchange between the entire ship system and seawater. Therefore, short-term prediction of the parameters of the ship's seawater cooling system is of great significance to ensure the normal operation of the seawater cooling system.
[0003] Traditional parameter prediction methods for ship seawater cooling systems mainly include autoregressive moving average (ARMA), support vector regression, and Bayesian methods. With the rapid development of deep learning, more and more people have begun to use deep learning models for short-term parameter prediction research, mainly including prediction methods based on BP neural network, convolutional neural network (CNN), and long short-term memory network (LSTM). However, the task of ship cooling water system parameter prediction faces multiple challenges: first, the data has obvious time series, and accurately capturing this long-term time series relationship is crucial for parameter prediction. Second, the data is nonlinear and highly dynamic, and traditional linear models are difficult to adapt well to such complex data characteristics. Summary of the invention
[0004] The present invention provides a ship seawater cooling system parameter prediction method based on the HHWOA-TCN-BiGRU model to overcome the technical problems that when predicting the parameters of the ship seawater cooling system, the system data cannot be accurately captured, and the existing prediction model cannot adapt well to such complex data characteristics because the system data has nonlinear and highly dynamic characteristics.
[0005] In order to achieve the above object, the technical solution of the present invention is:
[0006] A method for predicting parameters of a ship seawater cooling system based on a HHWOA-TCN-BiGRU model, comprising:
[0007] S1: Acquire historical data of state parameters of a ship seawater cooling system in time sequence, and normalize the historical data to obtain input data;
[0008] S2: constructing a TCN-BiGRU model according to the TCN model and the BiGRU network model, wherein the TCN-BiGRU model is used to extract and map features of the input data to obtain predicted data;
[0009] S3: Preset the chaotic mapping sequence and construct an adaptive weight strategy and a nonlinear convergence factor, and use the chaotic mapping sequence, the nonlinear convergence factor and the adaptive weight strategy to improve the whale optimization algorithm to obtain an improved whale optimization algorithm;
[0010] S4: Use the improved whale optimization algorithm to optimize the number of neurons and convolution kernel parameters of the TCN-BiGRU model to obtain an optimized TCN-BiGRU model, namely, the HHWOA-TCN-BiGRU model;
[0011] S5: Inputting the input data into the HHWOA-TCN-BiGRU model to obtain the data of the predicted state parameters of the ship seawater cooling system.
[0012] Furthermore, the whale optimization algorithm is improved by using chaotic mapping sequence, nonlinear convergence factor and adaptive weight strategy to obtain an improved whale optimization algorithm, including:
[0013] Using chaotic mapping sequence to improve the initialization population stage in the whale optimization algorithm;
[0014] Using a nonlinear convergence factor to replace the convergence factor used in the prey encirclement method and the bubble net attack method in the predation attack phase of the whale optimization algorithm;
[0015] An adaptive weight strategy is used to improve the optimal prey position obtained in the random prey search phase of the whale optimization algorithm.
[0016] Furthermore, the chaotic mapping sequence is a Tent chaotic mapping.
[0017] Furthermore, the initialization population stage in the whale optimization algorithm is improved by using a chaotic mapping sequence, including:
[0018] The Tent chaotic mapping is shown in formulas (1) and (2):
[0019] y(m+1)=2*y(m) 0≤y(m)≤p (1)
[0020] y1(m+1)=2-2*y(m) p<y(m)≤1 (2)
[0021] Formula (1) is used to solve the initial position of the next individual when the value of y(m) is less than or equal to the set initial value p;
[0022] Formula (2) is used to solve the initial position of the next individual when the value of y(m) is greater than the set initial value p and less than 1; the initial value p is the initial position of y(0) and is a randomly selected constant;
[0023] m represents the number of all individuals in the whale population, y(m) represents the chaotic variable of the Tent chaotic map at m, that is, the initial position of the mth individual, and y(m+1) represents the initial position of the next individual.
[0024] Furthermore, it is characterized in that the nonlinear convergence factor includes:
[0025] The nonlinear convergence factor is shown in formula (3):
[0026]
[0027] Where a′ represents the nonlinear convergence factor after replacement; μ and represents a constant; t represents the current number of iterations; T max Indicates the maximum number of iterations.
[0028] Furthermore, it is characterized in that the adaptive weight strategy includes:
[0029] The adaptive weight strategy is shown in formulas (4), (5) and (6),
[0030]
[0031]
[0032]
[0033] Formula (4) indicates that when the control parameter A is less than 1 and the set predation probability is less than the threshold, the individual position is updated by surrounding the prey;
[0034] Formula (5) indicates that when A ≥ 1 and the set predation probability is less than the threshold, the individual position is updated by randomly searching for prey;
[0035] Formula (6) indicates that when the control parameter A is less than 1 and the set predation probability is greater than or equal to the threshold, the bubble net attack method is used to update the individual position;
[0036] in, is the adaptive full weight of the whale position, x best(t) represents the position of the current global optimal individual, x(t) represents the position of the current individual, e bl is a constant, b represents a limiting constant, l is a constant, cos(2πl) represents a constant, A·D represents the encircling step length, A represents a control parameter, and D is an intermediate variable, as shown in formula (7),
[0037] D=|C·x best (t)-x(t)| (7)
[0038] Where, C represents the control parameter;
[0039] D′ represents the distance between the current whale position and the optimal whale position, as shown in formula (8),
[0040] D′=|x best (t)-x(t)| (8).
[0041] Further, S4 uses the improved whale optimization algorithm to optimize the number of neurons and convolution kernel parameters of the TCN-BiGRU model to obtain an optimized TCN-BiGRU model, namely, the HHWOA-TCN-BiGRU model, including:
[0042] S41, initializing the improved whale optimization algorithm to generate a whale population, wherein the initial whale population is a numerical set of the number of neurons and convolution kernel parameters;
[0043] S42, determining the initial position of each individual whale in the whale population according to the improved whale optimization algorithm; the position is the initial value of the selected number of neurons and convolution kernel parameters;
[0044] S43, calculating the fitness value corresponding to each whale individual according to the improved whale optimization algorithm, selecting the whale individual position corresponding to the best fitness as the current optimal solution, that is, the current optimal number of neurons and convolution kernel parameters, and the optimal solution is a local optimal solution;
[0045] S44, preset the predation probability and set the threshold. If the predation probability is greater than the threshold, the individual position of the whale is updated by using the bubble net attack method; if the predation probability is less than or equal to the threshold, the absolute value of the control parameter A in the improved whale optimization algorithm is determined. When the absolute value is less than 1, the individual position of the whale is updated by surrounding the prey; when the absolute value is greater than or equal to 1, the random prey search stage is entered to update the individual position of the whale;
[0046] S45, calculating the fitness value of the individual whales in the whale population after the position is updated, obtaining a new local optimal solution, and comparing it with the previous local optimal solution. If the data processed by using the new number of neurons and convolution kernel parameters is closer to the real data than the data processed by using the previous number of neurons and convolution kernel parameters, then updating the current optimal solution;
[0047] S46. Continuously update the nonlinear convergence factor according to the number of iterations, and update the value of the control parameter A according to the nonlinear convergence factor, repeat the steps of S44-S45, continuously update the position of the individual whale, and when the set number of iterations is reached, end the iteration and output the global optimal position, that is, the optimal number of neurons and convolution kernel parameters.
[0048] Furthermore, the TCN-BiGRU model includes a TCN network, a two-layer BiGRU network and a fully connected layer connected in sequence;
[0049] The TCN network is used to extract features from input data to obtain a feature matrix;
[0050] The two-layer BiGRU network is used to capture the bidirectional dependency information of the feature matrix to obtain a new feature matrix;
[0051] The fully connected layer is used to map the new feature matrix to obtain predicted state parameter data.
[0052] Beneficial effects: The present invention provides a method for predicting parameters of a ship seawater cooling system based on a HHWOA-TCN-BiGRU model. A TCN-BiGRU model is constructed according to a TCN model and a BiGRU network model. The method can process state parameters of a ship seawater cooling system with a time sequence according to the TCN-BiGRU model and accurately capture system data. An improved whale optimization algorithm is constructed. The method can obtain the optimal parameters of the model according to the improved whale optimization algorithm, and the optimal model is obtained to adapt to complex data characteristics, thereby realizing the prediction of ship cooling water system parameters in the short term in the future. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0054] Figure 1 A schematic diagram of a method for predicting parameters of a ship seawater cooling system based on the HHWOA-TCN-BiGRU model provided by the present invention;
[0055] Figure 2 This is a diagram showing the setting of monitoring points for the status of the seawater cooling system of the present invention;
[0056] Figure 3 Schematic diagram of the structure of the TCN-BiGRU model of the present invention;
[0057] Figure 4 Schematic diagram of the causal convolution structure of the TCN model;
[0058] Figure 5 Schematic diagram of the residual connection structure of the TCN model;
[0059] Figure 6 It is a structural diagram of the BiGRU model;
[0060] Figure 7 A flowchart of the improved whale optimization algorithm of the present invention;
[0061] Figure 8 This is a comparison chart of the results of several methods in an embodiment of the present invention. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] This embodiment provides a method for predicting parameters of a ship seawater cooling system based on the HHWOA-TCN-BiGRU model. Figure 1 As shown, including:
[0064] S1: Acquire historical data of state parameters of a ship seawater cooling system in time sequence, and normalize the historical data to obtain input data;
[0065] S2: constructing a TCN-BiGRU model according to the TCN model and the BiGRU network model, wherein the TCN-BiGRU model is used to extract and map features of the input data to obtain predicted data;
[0066] S3: Preset the chaotic mapping sequence and construct an adaptive weight strategy and a nonlinear convergence factor, and use the chaotic mapping sequence, the nonlinear convergence factor and the adaptive weight strategy to improve the whale optimization algorithm to obtain an improved whale optimization algorithm;
[0067] S4: Use the improved whale optimization algorithm to optimize the number of neurons and convolution kernel parameters of the TCN-BiGRU model to obtain an optimized TCN-BiGRU model, namely, the HHWOA-TCN-BiGRU model;
[0068] S5: Inputting the input data into the HHWOA-TCN-BiGRU model to obtain the data of the predicted state parameters of the ship seawater cooling system.
[0069] Specifically, firstly, historical data of state parameters of a ship seawater cooling system with a time sequence is obtained, and the historical data is normalized to obtain input data, historical data is obtained from a real ship seawater cooling system, and the data is processed so that the data can be input into a subsequent processing model, and the predicted data obtained based on the real data is more authentic; secondly, a TCN-BiGRU model is constructed according to a TCN model and a BiGRU network model, and the TCN-BiGRU model is used to extract and map features of the input data to obtain predicted data, the input data is first processed using the TCN model to obtain a data matrix, and then the data matrix is processed using the BiGRU model to obtain a new feature matrix of the input data, this model can process data with a time series, and the output data is more accurate; a chaotic mapping sequence is preset and an adaptive weight strategy and a nonlinear convergence factor are constructed, and a chaotic mapping is used. The whale optimization algorithm is improved by using a shot sequence, a nonlinear convergence factor and an adaptive weight strategy to obtain an improved whale optimization algorithm. The improved whale optimization algorithm eliminates the randomness of the initial population, makes the initial population more evenly distributed within the parameter range, improves the performance of the optimization algorithm, enables the algorithm to obtain better results and faster calculation speed, improves the local development ability of the algorithm, and improves the accuracy of the optimization algorithm; the improved whale optimization algorithm is used to perform parameter optimization on the number of neurons and convolution kernel parameters of the TCN-BiGRU model to obtain an optimized TCN-BiGRU model, namely the HHWOA-TCN-BiGRU model. The improved whale optimization algorithm can obtain the optimal number of neurons and convolution kernel parameters, and the predicted data is more accurate; finally, the input data is input into the HHWOA-TCN-BiGRU model to obtain the data of the predicted state parameters of the ship seawater cooling system.
[0070] In a specific embodiment, the scheme for obtaining the historical data of the state parameters of the ship seawater cooling system in time sequence and normalizing the historical data to obtain the input data is:
[0071] Real data extracted from a ship's seawater cooling system, such as Figure 2As shown, in this embodiment, the key equipment of the ship seawater cooling system includes the main seawater pump and the central cooling system. According to the position of the sensor that can be installed on the ship, the main monitoring parameters include five state parameters including but not limited to the inlet pressure of the main seawater pump, the outlet pressure of the main seawater pump, the seawater inlet temperature of the central cooler, the seawater outlet temperature of the central cooler and the fresh water outlet temperature of the central cooler, and the five state parameters are respectively recorded as P1, P2, T1, T2 and T3;
[0072] The obtained data is divided into training set and test set with a ratio of 7:3.
[0073] In this solution, historical data is collected and processed according to the following steps to obtain predicted data, which is more authentic. By comparing the collected data and predicted data with the normal fluctuation range, it can be determined whether the system has a fault. Once an abnormality is detected, the specific fault type can be analyzed based on the abnormal change trend of the parameters and the recorded location, and corresponding maintenance can be performed.
[0074] In a specific embodiment, a TCN-BiGRU model is constructed according to the TCN model and the BiGRU network model. The TCN-BiGRU model is used to process the input data, and the scheme for obtaining the predicted data is:
[0075] like Figure 3 As shown, the TCN-BiGRU model includes a TCN network, a two-layer BiGRU network and a fully connected layer connected in sequence;
[0076] The TCN network is used to extract features from input data to obtain a feature matrix; the feature matrix is a low-dimensional feature matrix;
[0077] The BiGRU network is Figure 6 As shown, the two-layer BiGRU network is used to capture the bidirectional dependency information of the feature matrix to obtain a new feature matrix; the new feature matrix is a high-dimensional feature matrix;
[0078] The bidirectional dependency information refers to the changing rules of the data before and after, which integrates the characteristic representation of the context information before and after the time series;
[0079] The fully connected layer is used to map the new feature matrix to obtain predicted state parameter data;
[0080] In this solution, the TCN network is used to process the time-series data, which can perform efficient feature extraction on the time series data. The TCN network has the following characteristics: it can process data in parallel and speed up the model processing speed; the TCN network will not cause gradient explosion or disappearance due to sharing parameters in different time periods; the gradient is more stable and the training memory is smaller;
[0081] The TCN has causal convolution, dilated convolution and residual connection. The structure of the TCN network is as follows: Figure 4-Figure 5 As shown, Figure 4 This is a schematic diagram of the causal convolution structure of the TCN model. Causal convolution ensures that the output depends only on the current and previous time steps, and not on future information. This is necessary for time series prediction because future information is not available at the time of prediction. Through causal convolution, the input data sequence is processed into a feature matrix (i.e., feature representation at different time steps);
[0082] The input data is further processed by dilated convolution based on causal convolution: dilated convolution introduces intervals in the convolution operation to expand the receptive field of the convolution kernel, thereby capturing long-term dependencies without increasing too much computational complexity. By adjusting the dilation rate, the network can flexibly select short-term or long-term dependencies. The output is still a feature matrix, but it can capture longer time series dependency information.
[0083] The main purpose of the residual connection is to avoid the gradient vanishing problem and promote the direct transfer of information. It establishes a short-circuit connection between the output and input of the convolution layer so that the output not only depends on the processing result of the convolution layer, but also retains the characteristics of the input. Through the residual connection, the input is added to the result of the convolution, and finally an output feature matrix combining multiple layers of information is obtained.
[0084] Causal convolution in TCN ensures that the convolution operation depends only on the current time step and the time step before it, without leaking future information. Using dilated convolution solves the problem that the length of modeling time is limited by the size of the convolution kernel, and obtains longer dependencies; Figure 5 This is a schematic diagram of the residual connection structure of the TCN model. The use of residual connections in TCN improves the learning ability of the network, especially when dealing with deep networks. Residual connections help solve the gradient vanishing problem in deep networks and enhance information transmission by introducing feed lines from the previous layer to the next layer. The TCN residual connection model also includes two layers of convolution and nonlinear identity mapping. In addition, the residual connection module also introduces a linear rectification function (ReLU) as an activation function, introduces weight normalization (WeightNorm) to achieve regularization, and introduces spatial loss (Dropout) to normalize the entire channel for each training. The 1×1 Conv can adjust the width of the residual.
[0085] This solution uses the BiGRU network model, the structure is as follows Figure 6As shown in the figure, the BiGRU network model uses a forward and backward propagation structure composed of a bidirectional recurrent neural network, which can simultaneously consider the changing rules of the data before and after, integrate the feature representation of the context information of the time series, more comprehensively mine the time series features, learn the dynamic change pattern, and obtain a new feature matrix of the input data;
[0086] In this scheme, a fully connected layer is used to scale and map the feature matrix obtained by processing the BiGRU network model, so that the seawater system parameters at the next moment can be effectively predicted.
[0087] In a specific embodiment, a chaotic mapping sequence is preset and an adaptive weight strategy and a nonlinear convergence factor are constructed. The chaotic mapping sequence, the nonlinear convergence factor and the adaptive weight strategy are used to improve the whale optimization algorithm. The scheme of the improved whale optimization algorithm is:
[0088] S31, the whale optimization algorithm is mainly divided into three stages: surrounding prey, bubble net attack and random search for prey:
[0089] S311: Assume that the initial population size is N and the dimension of the predation space is d, then the position of the i-th whale is as shown in formula (9),
[0090] x i =(x i1 , x i2 , ..., x id ), i = 1, 2, ..., N (9)
[0091] The first step of whale hunting is to surround the prey. The position of each whale at any time in the search space represents the current solution. Assuming the current target prey is the global optimal solution, each individual in the population gradually approaches the optimal solution. The position update formula is shown in formulas (10) and (11):
[0092] D=|C·x best (t)-x(t)| (10)
[0093] x(t+1)=x best (t)-A·D (11)
[0094] Among them, D is the intermediate variable, t represents the current iteration number, x(t) represents the current individual position, and x best (t) represents the position of the current global optimal individual, x(t+1) represents the next position of the current individual in the encirclement stage, A·D represents the encirclement step length, and A and C are control parameters, as shown in formulas (12) and (13),
[0095] A=2a·ra (12)
[0096] C=2·r2 (13)
[0097] In the formula, r represents a random number generated in the range of [0, 1], and a represents the convergence factor that changes as the number of iterations increases. Its expression is shown in formula (14):
[0098]
[0099] T max is the maximum number of iterations;
[0100] S312: The whale predation attack in the whale optimization algorithm can be divided into two modes, namely the shrinking encirclement mechanism and the spiral update position:
[0101] 1) Contraction and encirclement mechanism
[0102] The appearance of this mode indicates that the whale is still swimming in a straight line and has not yet launched a bubble net attack, which is consistent with the process of surrounding prey. The value range of A is changed from the original [-a, a] to [-1, 1];
[0103] 2) Spiral update position
[0104] The appearance of this mode means that the whale changes from swimming in a straight line to swimming in a spiral and launches a bubble net attack. At this time, formulas (10) and (11) are converted into formulas (15) and (16).
[0105] D′=|x best (t)-x(t)| (15)
[0106] x1(t+1)=D′·e bl ·cos(2πl)+x best (t) (16)
[0107] In the formula, D′ is the distance between the current individual and the current global optimal individual, l represents a constant randomly generated in the range of [-1, 1], b is a restriction constant, and e bl is a constant, cos(2πl) represents a constant; x1(t+1) represents the next position of the current individual in the bubble net attack mode;
[0108] In this embodiment, it is assumed that there is a probability of 0.5 to select the shrinking and surrounding mechanism, that is, to update the individual position by surrounding the prey, and there is a probability of 0.5 to select the spiral updating mechanism, that is, to update the individual position by using the bubble net attack method. Substitute formula (10) into formula (11), and substitute formula (15) into formula (16) to obtain the position update expression, as shown in formulas (17) and (18),
[0109] x(t+1)=x best (t)-A·|C·xbest (t)-x(t)| (17)
[0110] x1(t+1)=|x best (t)-x(t)|e bl ·cos(2πl)+x best (t) (18)
[0111] Formula (17) indicates that when the probability is less than 0.5, the next position of the current individual is updated by surrounding the prey;
[0112] Formula (18) indicates that when the probability is greater than 0.5, the bubble net attack method is selected to update the next position of the current individual;
[0113] In the random search for prey stage, the whale will conduct a random global search. When A<1, the whale will launch a predation attack and search for the local optimal solution. When A≥1, the whale will conduct a random search to search for the global optimal solution. The mathematical model of this stage is shown in formulas (19) and (20).
[0114] D1′=|C·x r -x(t)| (19)
[0115] x2(t+1)=x r -A·D (20)
[0116] Among them, D1′ represents the distance between the current individual and the current global optimal individual in the random search prey stage, x r represents the position of a random individual; x2(t+1) represents the next position of the current individual in the random search for prey phase;
[0117] S32, using a chaotic mapping sequence to improve the initialization population stage in the whale optimization algorithm, wherein the chaotic mapping sequence is a Tent chaotic mapping:
[0118] The Tent chaotic mapping is shown in formulas (21) and (22),
[0119] y(m+1)=2*y(m) 0≤y(m)≤p (21)
[0120] y1(m+1)=2-2*y(m) p<y(m)≤1 (22)
[0121] Formula (1) is when the value of y(m) is less than or equal to the set initial value p, use formula (21) to solve the initial position of the next individual;
[0122] Formula (2) is when the value of y(m) is greater than the set initial value p and less than 1, formula (22) is used to solve the initial position of the next individual; the initial value p is the initial position of y(0), which is a randomly selected constant; in this embodiment, the initial value p is 0.5;
[0123] S33, using a nonlinear convergence factor to replace the convergence factor used in the prey encirclement method and the bubble net attack method in the predation attack phase of the whale optimization algorithm:
[0124] The nonlinear convergence factor is shown in formula (23),
[0125]
[0126] Where a′ represents the nonlinear convergence factor after replacement; μ and represents a constant; t represents the current number of iterations, select T max Indicates the maximum number of iterations, which is set to 200 in this embodiment;
[0127] S34, construct an adaptive weight strategy, and use the adaptive weight strategy to improve the optimal prey position obtained in the random prey search stage in the whale optimization algorithm:
[0128] The adaptive weight strategy is shown in formulas (24), (25) and (26),
[0129]
[0130] Formula (24) indicates that when the control parameter A is less than 1 and the set predation probability is less than the threshold, the individual position is updated by surrounding the prey; in this embodiment, the threshold is set to 0.5;
[0131] Formula (25) indicates that when A ≥ 1 and the set predation probability is less than the threshold, the individual position is updated by randomly searching for prey;
[0132] Formula (26) indicates that when the control parameter A is less than 1 and the set predation probability is greater than or equal to the threshold, the bubble net attack method is used to update the individual position;
[0133] in, is the adaptive full weight of the whale position; with the increase of the number of iterations, the weight coefficient increases continuously, that is, in the predation attack stage and the random search prey stage, when the probability is less than 0.5, the adaptive weight is introduced in the encirclement prey method to make full use of the optimal solution in the optimization problem; at the same time, the adaptive weight used in the bubble net attack method As the number of iterations increases, it will continue to approach the prey. At this time, a smaller weight is used to change the position of the prey, thereby improving the local development ability of the algorithm and improving the accuracy of the optimization algorithm.
[0134] In this scheme, the Tent chaotic map has uniformity and randomness, which can enable the algorithm to avoid local optimal solutions, thereby maintaining the diversity of the population and improving the global search capability. This scheme uses the Tent chaotic map to initialize the population, which greatly eliminates the randomness of the initial population, making the initial population more evenly distributed within the parameter range, and further improving the global search capability of the whale optimization algorithm;
[0135] Local mining and global exploration are two important stages of the optimization algorithm. Too much mining capacity will inhibit the trend of the search agent to develop towards the global optimal solution, and too much exploration capacity will reduce the optimization accuracy. Therefore, this scheme adopts a nonlinear convergence factor to find an appropriate transition between these two stages to improve the performance of the optimization algorithm, so that the algorithm can obtain better results and faster calculation speed.
[0136] The whale optimization algorithm is prone to fall into local optimality in the later local development, resulting in premature convergence. Therefore, in order to maintain the diversity of the population and jump out of the local optimality in time, this scheme proposes an adaptive weight strategy to improve the local development ability of the algorithm and improve the accuracy of the optimization algorithm.
[0137] In a specific embodiment, Figure 7 As shown, the improved whale optimization algorithm is used to optimize the number of neurons and convolution kernel parameters of the TCN-BiGRU model to obtain the optimized TCN-BiGRU model, that is, the scheme of the HHWOA-TCN-BiGRU model is:
[0138] S41, initializing the improved whale optimization algorithm to generate a whale population, wherein the initial whale population is a numerical set of the number of neurons and convolution kernel parameters;
[0139] S42, determining the initial position of each individual whale in the whale population according to the improved whale optimization algorithm; the position is the initial value of the selected number of neurons and convolution kernel parameters;
[0140] S43, calculating the fitness value corresponding to each whale individual according to the improved whale optimization algorithm, selecting the whale individual position corresponding to the best fitness as the current optimal solution, that is, the current optimal number of neurons and convolution kernel parameters, and the optimal solution is a local optimal solution;
[0141] S44, preset the predation probability and set the threshold. If the predation probability is greater than the threshold, the individual position of the whale is updated by using the bubble net attack method; if the predation probability is less than or equal to the threshold, the absolute value of the control parameter A in the improved whale optimization algorithm is determined. When the absolute value is less than 1, the individual position of the whale is updated by surrounding the prey; when the absolute value is greater than or equal to 1, the random prey search stage is entered to update the individual position of the whale;
[0142] S45, calculating the fitness value of the individual whales in the whale population after the position is updated, obtaining a new local optimal solution, and comparing it with the previous local optimal solution. If the data processed by using the new number of neurons and convolution kernel parameters is closer to the real data than the data processed by using the previous number of neurons and convolution kernel parameters, then updating the current optimal solution;
[0143] S46. Continuously update the nonlinear convergence factor according to the number of iterations, and update the value of the control parameter A according to the nonlinear convergence factor, repeat the steps of S44-S45, continuously update the position of the individual whale, and when the set number of iterations is reached, end the iteration and output the global optimal position, that is, the optimal number of neurons and convolution kernel parameters.
[0144] The improved whale optimization algorithm used in this scheme can obtain the optimal number of neurons and convolution kernel parameters, and the predicted data is more accurate.
[0145] In a specific embodiment, the scheme for inputting the input data into the HHWOA-TCN-BiGRU model to obtain the data of the predicted state parameters of the ship seawater cooling system is:
[0146] The training set is input into the HHWOA-TCN-BiGRU model to obtain predicted data, and the predicted data is compared with the actual data to evaluate the prediction performance of the HHWOA-TCN-BiGRU model. If the difference is too large, the improved whale optimization algorithm is used again for optimization, and finally the model of the test set is used for testing to obtain the final predicted data.
[0147] Example:
[0148] This scheme uses the main seawater pump inlet pressure P1 as an example for experiment and analysis. The interval time for each data sampling is 30 minutes, and a total of 900 sets of data are collected, which takes a total of 450 hours. The original length of the time series of 900 groups is divided into the first 630 groups as training sets for simulation training, and the last 270 groups as test sets to verify the accuracy and reliability of the model:
[0149] This embodiment selects convolutional neural network (CNN), long short-term memory neural network (LSTM), TCN-BIGRU model before parameter optimization and the model of this solution as comparison algorithms, and uses mean absolute error (MAE), mean absolute percentage error (MAPE) and root mean square error (RMSE) to measure the deviation between the model prediction value and the true value. The data set is divided into 70% training set and 30% test set, and the delay step is set to 10. The maximum number of iterations of all models is set to 200, the learning rate is set to 0.01, the optimizer is adam, and the activation function of the fully connected layer is linear. The prediction results are shown in Table 1.
[0150] Table 1 Algorithm comparison results
[0151] Prediction Model RMSE MAE MAPE CNN 2.358 2.351 0.047 LSTM 2.076 2.148 0.038 TCN-BIGRU 1.546 0.925 0.031 HHWOA-TCN-BIGRU 0.917 0.696 0.025
[0152] The comparison results are as follows Figure 8 As shown in Table 1 and Figure 8 It can be seen that compared with other models, the RMSE, MAPE, and MAE of the HHWOA-TCN-BiGRU model are all reduced, and more accurate prediction results are obtained. It has the best prediction performance compared with other prediction models. Therefore, the HHWOA-TCN-BiGRU model of this scheme can effectively learn the changes in complex ship cooling water system parameters and use a simple model to accurately predict future ship cooling water system parameters.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting parameters of a ship seawater cooling system based on the HHWOA-TCN-BiGRU model, characterized in that: include: S1: Acquire historical data of state parameters of a ship seawater cooling system in time sequence, and normalize the historical data to obtain input data; S2: constructing a TCN-BiGRU model according to the TCN model and the BiGRU network model, wherein the TCN-BiGRU model is used to extract and map features of the input data to obtain predicted data; S3: Preset the chaotic mapping sequence and construct an adaptive weight strategy and a nonlinear convergence factor, and use the chaotic mapping sequence, the nonlinear convergence factor and the adaptive weight strategy to improve the whale optimization algorithm to obtain an improved whale optimization algorithm; S4: Use the improved whale optimization algorithm to optimize the number of neurons and convolution kernel parameters of the TCN-BiGRU model to obtain an optimized TCN-BiGRU model, namely, the HHWOA-TCN-BiGRU model; S5: Inputting the input data into the HHWOA-TCN-BiGRU model to obtain the data of the predicted state parameters of the ship seawater cooling system.
2. According to claim 1, a method for predicting parameters of a ship seawater cooling system based on the HHWOA-TCN-BiGRU model is characterized in that: The whale optimization algorithm is improved by using chaotic mapping sequence, nonlinear convergence factor and adaptive weight strategy to obtain the improved whale optimization algorithm, including: Using chaotic mapping sequence to improve the initialization population stage in the whale optimization algorithm; Using a nonlinear convergence factor to replace the convergence factor used in the prey encirclement method and the bubble net attack method in the whale optimization algorithm; An adaptive weight strategy is used to improve the optimal prey position obtained in the random prey search phase of the whale optimization algorithm.
3. The method for predicting parameters of a ship seawater cooling system based on the HHWOA-TCN-BiGRU model according to claim 2 is characterized in that: The chaotic mapping sequence is a Tent chaotic mapping.
4. The method for predicting parameters of a ship seawater cooling system based on the HHWOA-TCN-BiGRU model according to claim 3 is characterized in that: The initialization population stage in the whale optimization algorithm is improved by using a chaotic mapping sequence, including: The Tent chaotic mapping is shown in formulas (1) and (2): y(m+1)=2*y(m) 0≤y(m)≤p (1) y(m+1)=2-2*y(m) p <y(m)≤1 (2) Formula (1) is used to solve the initial position of the next individual when the value of y(m) is less than or equal to the set initial value p; Formula (2) is used to solve the initial position of the next individual when the value of y(m) is greater than the set initial value p and less than 1; the initial value p is the initial position of y(0) and is a randomly selected constant; m represents the number of all individuals in the whale population, y(m) represents the chaotic variable of the Tent chaotic map at m, that is, the initial position of the mth individual, and y(m+1) represents the initial position of the next individual.
5. The method for predicting parameters of a ship seawater cooling system based on the HHWOA-TCN-BiGRU model according to claim 2 is characterized in that: The nonlinear convergence factors include: The nonlinear convergence factor is shown in formula (3): Among them, a ′ represents the nonlinear convergence factor after substitution; μ and represents a constant; t represents the current number of iterations; T max Indicates the maximum number of iterations.
6. The method for predicting parameters of a ship seawater cooling system based on the HHWOA-TCN-BiGRU model according to claim 2 is characterized in that: The adaptive weight strategy includes: The adaptive weight strategy is shown in formulas (4), (5) and (6), Formula (4) indicates that when the control parameter A<1 and the set predation probability is less than the threshold, the individual position is updated by surrounding the prey; Formula (5) indicates that when A ≥ 1 and the set predation probability is less than the threshold, the individual position is updated by randomly searching for prey; Formula (6) indicates that when the set predation probability is greater than or equal to the threshold, the bubble net attack method is used to update the individual position; in, is the adaptive full weight of the whale position, x best (t) represents the position of the current global optimal individual, x(t) represents the position of the current individual, e bl is a constant, b represents the spiral shape parameter, l is a constant, cos(2πl) represents a constant, A·D represents the encirclement step length, A represents the control parameter, and D is an intermediate variable, as shown in formula (7), D=|C·x best (t)-x(t)| (7)where C represents the control parameter; D ′ represents the distance between the current whale position and the optimal whale position, as shown in formula (8), D′=|x best (t)-x(t)| (8)。 7. The method for predicting parameters of a ship seawater cooling system based on the HHWOA-TCN-BiGRU model according to claim 1, characterized in that: S4 uses the improved whale optimization algorithm to optimize the number of neurons and convolution kernel parameters of the TCN-BiGRU model to obtain an optimized TCN-BiGRU model, namely, the HHWOA-TCN-BiGRU model, including: S41, initializing the improved whale optimization algorithm to generate a whale population, wherein the initial whale population is a numerical set of the number of neurons and convolution kernel parameters; S42, determining the initial position of each individual whale in the whale population according to the improved whale optimization algorithm; the position is the initial value of the selected number of neurons and convolution kernel parameters; S43, calculating the fitness value corresponding to each whale individual according to the improved whale optimization algorithm, selecting the whale individual position corresponding to the best fitness as the current optimal solution, that is, the current optimal number of neurons and convolution kernel parameters, and the optimal solution is a local optimal solution; S44, preset the predation probability and set the threshold. If the predation probability is greater than the threshold, the individual position of the whale is updated by using the bubble net attack method; if the predation probability is less than or equal to the threshold, the absolute value of the control parameter A in the improved whale optimization algorithm is determined. When the absolute value is less than 1, the individual position of the whale is updated by surrounding the prey; when the absolute value is greater than or equal to 1, the random prey search stage is entered to update the individual position of the whale; S45, calculating the fitness value of the individual whales in the whale population after the position is updated, obtaining a new local optimal solution, and comparing it with the previous local optimal solution. If the data processed by using the new number of neurons and convolution kernel parameters is closer to the real data than the data processed by using the previous number of neurons and convolution kernel parameters, then updating the current optimal solution; S46. Continuously update the nonlinear convergence factor according to the number of iterations, and update the value of the control parameter A according to the nonlinear convergence factor, repeat the steps of S44-S45, continuously update the position of the individual whale, and when the set number of iterations is reached, end the iteration and output the global optimal position, that is, the optimal number of neurons and convolution kernel parameters.
8. The method for predicting parameters of a ship seawater cooling system based on the HHWOA-TCN-BiGRU model according to claim 1, characterized in that: The TCN-BiGRU model includes a TCN network, a two-layer BiGRU network and a fully connected layer connected in sequence; The TCN network is used to extract features from input data to obtain a feature matrix; The two-layer BiGRU network is used to capture the bidirectional dependency information of the feature matrix to obtain a new feature matrix; The fully connected layer is used to map the new feature matrix to obtain predicted state parameter data.
Citation Information
Cited By
Fault prediction method for flexible hand for underwater robot operation
CN119557570A
A Fault Prediction Method for a Flexible Hand Used in Underwater Robot Operations
CN119557570B
Geographic surveying and mapping method and system based on unmanned aerial vehicle
CN120445164A
TCN-BiGRU neural network model-based effluent TP concentration prediction control method of sewage treatment chemical precipitation method
CN121500761A