An optimization algorithm for ship assisted berthing and unberthing considering multi-parameter correlation
By decorrelating the ship's off-mooring data and building independent parameters, the problem of poor training effect of traditional BP neural networks when processing parameter correlation is solved, and the accuracy and safety of prediction are improved.
Patent Information
- Application Number
- CN202111515871.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-12-13
AI Technical Summary
Traditional BP neural networks have poor training results when dealing with parameter correlations in port real-time environments, resulting in low prediction effect of ships on off-beat and insufficient safety and accuracy.
The data is preprocessed through decorrelation processing, a covariance matrix is constructed and orthogonal transformation is performed, and the transformation obtains independent parameters, and then a BP neural network model is constructed for training.
It improves the training effect of neural networks, enhances the accuracy of prediction and the safety of ships' off-mooring.
Smart Images

Figure CN114330838B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship assisted berthing and unberthing, and in particular to an optimization algorithm for ship assisted berthing and unberthing that takes multi-parameter correlation into consideration. Background Art
[0002] The berthing safety of ships is a key link in the construction of smart ports, mainly because it can affect the safety of ships and the efficiency of port work. With the continuous increase in the tonnage and density of ships at port terminals, ships have large tonnage and inertia, and have the disadvantages of poor stability and poor operability when berthing and leaving. Marine accidents have also occurred frequently in recent years. Accidents of collision between shore and ship caused by berthing and leaving have seriously affected the work efficiency of ports. Moreover, if a collision occurs during berthing and leaving, it will not only endanger the safety of personnel, but also may cause environmental pollution in the port. Therefore, optimizing the algorithm for auxiliary berthing and leaving is of great practical significance for solving the problem of berthing and leaving.
[0003] The traditional BP neural network has powerful deduction and learning capabilities. It can accurately and quickly process various real-time information collected by the device, and then make timely and accurate judgments on the berthing and unberthing status. However, due to the certain correlation between the real-time environmental parameters of the port, the training effect of the neural network is not very good. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a ship-assisted berthing and unberthing optimization algorithm that considers the correlation of multiple parameters, that is, on the basis of considering the correlation of each parameter, the parameters are decorrelated to improve the training effect of the neural network, thereby improving the prediction effect and the safety and accuracy of the ship berthing and unberthing. The technical solution is:
[0005] An optimization algorithm for ship assisted berthing and unberthing considering multi-parameter correlation comprises the following steps:
[0006] S1. Obtain data: Obtain data M (m) from the port auxiliary berthing and unberthing data collection system for a period of time 1 ,m 2 ,m 3 ,m 4 ,m 5 ,m 6 ,m 7 ), (m 1 ,m 2 ,m 3 ,m 4 ,m 5 ,m 6 ,m 7 ) represents the set of (wind speed, wind direction, sea wave height, wave direction, ship displacement, ship distance from the shore, ship speed);
[0007] S2. Decorrelation processing: wind speed m in step S1 1 and wave height m 3 、wind direction angle m 2 and wave direction angle m 4 There will be correlation between them, which will have an adverse effect on the accuracy of the prediction model, so the obtained data needs to be decorrelated.
[0008] S3. Construct a BP neural network model, and conduct training and testing. A large number of data sets are obtained from the port, of which 70% of the randomly selected data are used for S3 training, and the remaining 30% of the data sets are used for testing the neural network.
[0009] Further preferably, the decorrelation processing step in step S2 is as follows:
[0010] S21. Set vector M = (m 1 , m 2 , m 3 , m 4 ), forming the covariance matrix C M
[0011]
[0012] Its off-diagonal elements is the variable m a and m b The covariance of a Variance (a, b = 1, 2, 3, 4);
[0013] From the definition of a real symmetric positive definite matrix, we know that C M is a real symmetric positive definite square matrix of order 4 with 4 real eigenvalues and 4 linearly independent and orthogonal eigenvectors;
[0014] S22. Set up a matrix A, whose columns are composed of C M The regularized feature vectors of T C M A can be C M Transformed into a diagonal matrix, the diagonal elements are C M The eigenvalues of
[0015] M=AL
[0016] The vector M can be transformed into a linearly independent vector L, and the covariance matrix of L is a diagonal matrix Because A -1 =A T , the above formula can be written as
[0017] L=AT M
[0018] After the above processing, we get L = (l 1 , l 2 , l 3 , l 4 ) can turn wind speed, wind direction, wave height and wave angle into independent parameters without affecting each other. 5 , l 6 , l 7 =m 5 , m 6 , m 7 , thus obtaining the processed data L = (l 1 , l 2 , l 3 , l 4 , l 5 , l 6 , l 7 );
[0019] S23. All data are normalized, and the normalization formula is as follows;
[0020]
[0021] In the formula, x represents the normalized data, l u is the uth input data (u=1, 2, ..., 7), l min is the minimum value of the input data, l max is the maximum value of the input data, and finally the data X=(x 1 , x 2 , x 3 , x 4 , x 5 , x 6 , x 7 ).
[0022] Further preferably, in step S3, the BP neural network model construction steps are as follows:
[0023] S31.BP neural network is composed of many neurons, the first layer is the input layer, the middle layer is the hidden layer, and the last layer is the output layer. 1 , x 2 , x 3 , x 4 , x 5 , x 6 is the independent variable of the training set, x 7 is the dependent variable of the training set, S i =S 1 , S 2 ,...,S pRepresents the net output value, and through the activation function f, the hidden layer output Y is obtained i ,
[0024] The net output of the i-th neuron is
[0025]
[0026] Where W j is the weight of the neuron, w ji (j=1, 2, ..., 6, i=1, 2, ..., p) is the weight between the input layer and the hidden layer, and the net output value S i After processing by the activation function f, the output value Y of the hidden layer can be obtained i , expressed as
[0027] Y i =f(S i ).
[0028] Further preferably, in step S3, the BP neural network model training steps are as follows:
[0029] S32. There are two processes in training BP neural network, one is the signal forward propagation process, and the other is the error back propagation process. The input layer has 6 nodes, the hidden layer has p nodes, and the output layer has 1 node. i (i=1, 2, ..., p) is the weight between the hidden layer and the output layer. The activation function of the hidden layer is f(x), and the activation function of the output layer is f 2 (x), then the output of each node in the hidden layer can be expressed as
[0030]
[0031] The output of each node in the output layer is
[0032]
[0033] In the error back propagation process, the error function should be defined first. The output data obtained when the qth group of data enters the network is Use the square error function to represent the sample error E of the qth group of data q
[0034]
[0035] In the formula, is the expected output;
[0036] For N sets of training data, the overall error is
[0037]
[0038] In the process of adjusting the output layer weights, the cumulative error BP algorithm is used to adjust v i , so that the overall error E is reduced, that is
[0039]
[0040] Where η is the learning rate, which is set to 0.1.
[0041] Further preferably, in step S3, the BP neural network model training steps are as follows:
[0042] S33. Assume that the error signal is
[0043]
[0044] The first of these
[0045]
[0046] Item 2
[0047]
[0048] is the partial derivative of the output layer transfer function
[0049] therefore
[0050]
[0051] Combined with the chain theorem, the weight adjustment formula of each neuron in the output layer is obtained as follows:
[0052]
[0053] Similarly, the weight adjustment formula of each neuron in the hidden layer is
[0054]
[0055] in is the partial derivative of the hidden layer transfer function.
[0056] Through repeated learning and training using the above method, the network parameters corresponding to the minimum error can be determined. At this time, the trained neural network can self-process the input information of similar samples and output the information with the minimum error after nonlinear transformation.
[0057] Beneficial Effects
[0058] The present invention provides a ship-assisted berthing and unberthing optimization algorithm that takes into account the correlation of multiple parameters, that is, on the basis of considering the correlation of various parameters, the parameters are decorrelated to improve the training effect of the neural network, thereby improving the prediction effect and the safety and accuracy of the ship's berthing and unberthing. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 Neural network diagram of this application;
[0060] Figure 2 This is the prediction effect of the ship speed for this application. DETAILED DESCRIPTION
[0061] The following detailed description is illustrative and is intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those of ordinary skill in the art to which the present application belongs. It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application.
[0062] An optimization algorithm for ship assisted berthing and unberthing considering multi-parameter correlation comprises the following steps:
[0063] S1. Obtain data. Obtain a large amount of data M (m) from the port auxiliary berthing and unberthing data collection system for a period of time. 1 , m 2 , m 3 , m 4 , m 5 , m 6 , m 7 ), (m 1 , m 2 , m 3 , m 4 , m 5 , m 6 , m 7 ) represents the set of (wind speed, wind direction, sea wave height, wave direction, ship displacement, ship distance from the shore, ship speed);
[0064] S2. Decorrelation processing. In the above data, wind speed m 1 and wave height m 3 、wind direction angle m 2 and wave direction angle m 4 There will be a correlation between them, that is, the greater the wind speed, the greater the wave height (positive correlation), and the greater the angle between the wind direction and a certain reference surface, the greater the angle between the wave direction and the surface (positive correlation). This kind of correlated data may have an adverse effect on the accuracy of the prediction model, so it is necessary to decorrelate the obtained data.
[0065] For m 1 , m 2 , m 3 , m 4 Four data constitute the covariance matrix
[0066]
[0067] Its off-diagonal elements is the variable m a and m b The covariance of a Variance (a, b = 1, 2, 3, 4).
[0068] From the definition of a real symmetric positive definite matrix, we know that C M is a 4th-order real symmetric positive definite square matrix with 4 real eigenvalues and 4 linearly independent and orthogonal eigenvectors. Suppose there is a matrix A whose columns are represented by C M The regularized feature vectors of T C M A can be C M Transformed into a diagonal matrix, the diagonal elements are C M The eigenvalues of . Perform an orthogonal transformation
[0069] M=AL
[0070] The vector M can be transformed into a linearly independent vector L, and the covariance matrix of L is a diagonal matrix Because A -1 =A T , the above formula can be written as
[0071] L=A T M
[0072] After the above processing, we get L = (x 1 , x 2 , x 3 , x 4 ) can turn wind speed, wind direction, wave height and wave angle into independent parameters without affecting each other. 5 , l 6 , l 7 =m 5 , m 6 , m 7 The processed data L is thus obtained. 1 , l 2 , l 3 , l 4 , l 5 , l 6 , l 7 )
[0073] All data are normalized, and the normalization formula is as follows;
[0074]
[0075] In the formula, x represents the normalized data, l u is the uth input data (u=1, 2, ..., 7), l min is the minimum value of the input data, l max is the maximum value of the input data. Finally, the data X=(x 1 , x 2 , x 3 , x 4 , x 5 , x 6 , x 7 )
[0076] A total of 3000 sets of data were obtained from the port, of which 70% of the data, namely N=2100 sets, were randomly selected for training S3, and the remaining 900 sets of data were used to test the neural network.
[0077] Take a set of data as an example, m 1 , m 2 , m 3 , m 4 =(1.9, 1.3, 2.8, 0.9), construct the covariance matrix
[0078]
[0079] C M is a 4th-order real symmetric positive definite matrix, let C M The eigenvalue matrix of is D, then
[0080]
[0081] Assume that the columns of matrix A are represented by C M The regularized feature vectors of A T C M A can be C M Transformed into a diagonal matrix, the diagonal elements are C M The characteristic value of
[0082]
[0083] According to L = A T M, we can get independent parameters X, that is
[0084]
[0085] After all the data are processed in the above way, they become independent parameters. After normalization, they become dimensionless parameters, and finally we get
[0086] X=(0.893, 0.220, 0.305, 0.262, 0.035, 0.264, 0.782)
[0087] S3. BP neural network training and effect testing. The data processed by S2 is used for neural network training and testing.
[0088] S4. Compare the prediction results with those of the BP neural network algorithm without data processing. Figure 2 , shows the comparison curve of the predicted and actual values of ship speed in 2100 groups of cases. It can be seen that the neural network training effect is better after the data is decorrelated.
[0089] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A ship-assisted berthing and unberthing optimization algorithm considering multi-parameter correlation, characterized in that: The following steps are involved: S1. Obtain data: obtain the data M (m1, m2, m3, m4, m5, m6, m7) of the port within a period of time from the port auxiliary berthing and unberthing data acquisition system, (m1, m2, m3, m4, m5, m6, m7) represents the set of (wind speed, wind direction angle, sea wave height, wave direction angle, ship displacement, ship distance from the shore, ship speed); S2. Decorrelation processing: There is a correlation between the wind speed m1 and the wave height m3, the wind direction angle m2 and the wave direction angle m4 in step S1, which will have an adverse effect on the accuracy of the prediction model. Therefore, it is necessary to perform decorrelation processing on the obtained data; the decorrelation processing steps are as follows: S21. Set vector M = (m1, m2, m3, m4) to form the covariance matrix C M Its off-diagonal elements is the variable m a and m b The covariance of a Variance (a,b=1,2,3,4); From the definition of a real symmetric positive definite matrix, we know that C M is a real symmetric positive definite square matrix of order 4 with 4 real eigenvalues and 4 linearly independent and orthogonal eigenvectors; S22. Set up a matrix A, whose columns are composed of C M The regularized feature vectors of T C M A can be C M Transformed into a diagonal matrix, the diagonal elements are C M The eigenvalues of M=aL The vector M can be transformed into a linearly independent vector L, and the covariance matrix of L is a diagonal matrix Because A -1 =A T , the above formula can be written as L=A T M After the above processing, we get L = (l1, l2, l3, l4), which can turn wind speed, wind direction, wave height and wave angle into independent parameters, l5, l6, l7 = m5, m6, m7, thus obtaining the processed data L = (l1, l2, l3, l4, l5, l6, l7); S3. Construct a BP neural network model, and conduct training and testing. A large number of data sets are obtained from the port, of which 70% of the randomly selected data are used for S3 training, and the remaining 30% of the data sets are used for testing the neural network.
2. The ship assisted berthing and unberthing optimization algorithm considering multi-parameter correlation according to claim 1 is characterized in that: In step S2 S23. All data are normalized, and the normalization formula is as follows; In the formula, x represents the normalized data, l u is the uth input data (u=1,2,…,7), l min is the minimum value of the input data, l max is the maximum value of the input data, and the final data obtained is X=(x1,x2,x3,x4,x5,x6,x7).
3. The ship-assisted berthing and unberthing optimization algorithm considering multi-parameter correlation according to claim 2 is characterized in that: In step S3, the BP neural network model construction steps are as follows: S31.BP neural network is composed of many neurons, the first layer is the input layer, the middle layers are hidden layers, and the last layer is the output layer. x1, x2, x3, x4, x5, x6 are independent variables of the training set, x7 is the dependent variable of the training set, S i =S1, S2, ..., S p Represents the net output value, and through the activation function f, the hidden layer output Yi is obtained. The net output of the i-th neuron is Where W j is the weight of the neuron, w ji (j=1,2,…,6,i=1,2,…,p) is the weight between the input layer and the hidden layer, and the net output value S i After processing by the activation function f, the output value Y of the hidden layer can be obtained i , expressed as Y i =f(S i )。 4. The ship assisted berthing and unberthing optimization algorithm considering multi-parameter correlation according to claim 3 is characterized in that: In step S3, the BP neural network model training steps are as follows: S32. There are two processes in training BP neural network, one is the signal forward propagation process, and the other is the error back propagation process. The input layer has 6 nodes, the hidden layer has p nodes, and the output layer has 1 node. i (i=1,2,…,p) is the weight between the hidden layer and the output layer, the activation function of the hidden layer is f(x), and the activation function of the output layer is f2(x), then the output of each node in the hidden layer can be expressed as The output of each node in the output layer is In the error back propagation process, the error function should be defined first. The output data obtained when the qth group of data enters the network is Use the square error function to represent the sample error E of the qth group of data q In the formula, is the expected output; For N sets of training data, the overall error is In the process of adjusting the output layer weights, the cumulative error BP algorithm is used to adjust v i , so that the overall error E is reduced, that is Where η is the learning rate, which is set to 0.
1.
5. The ship-assisted berthing and unberthing optimization algorithm considering multi-parameter correlation according to claim 4 is characterized in that: In step S3, the BP neural network model training steps are as follows: S33. Assume that the error signal is The first of these Item 2 is the partial derivative of the output layer transfer function therefore Combined with the chain theorem, the weight adjustment formula of each neuron in the output layer is obtained as follows: Similarly, the weight adjustment formula of each neuron in the hidden layer is in is the partial derivative of the hidden layer transfer function; After repeated learning and training through the above steps, the network parameters corresponding to the minimum error can be determined. At this time, the trained neural network can self-process the input information of similar samples and output the information with the minimum error after nonlinear transformation.
Citation Information
Patent Citations
Intelligent ship berthing and unberthing algorithm test environment construction method based on three-dimensional simulation
CN111199095A
Ship collision risk degree estimation method based on improved BP neural network
CN111553562A