On the Identification of Coupled Pitch and Heave Motions Using Opposition-Based Particle Swarm Optimization

A mathematical model must be established to study the motions of ships in order to control them effectively. An assessment of the model depends on the accuracy of hydrodynamic parameters. An algorithm for the parameter identification of the coupled pitch and heave motions in ships is, thus, put forward in this paper. The algorithm proposed is based on particle swarm optimization (PSO) and the opposition-based learning theory known as opposition-based particle swarm optimization (OPSO). A definition of the opposition-based learning algorithm is given first of all, with ideas on how to improve this algorithm and its process being presented next. Secondly, the design of the parameter identification algorithm is put forward, modeling the disturbing force and disturbing moment of the identification system and the output parameters of the identification system. Then, the problem involving the hydrodynamic parameters of motions is identified and the coupled pitch and heave motions of a ship described as an optimization problem with constraints. Finally, the numerical simulations of different sea conditions with unknown parameters are carried out using the PSO and OPSO algorithms. The simulation results show that the OPSO algorithm is relatively stable in terms of the hydrodynamic parameters identification of the coupled pitch and heave motions.


Introduction
The model concerned with the motions of ships describes the process of movement of the response characteristics of the control input, and this is the precondition to understanding the motions of ships.Widely used system identification techniques for hydrodynamic parameters and the hydrodynamic parameters themselves can be identified by observing the data relating to the motions of ships.This directly establishes the mathematical model of the ship's hydrodynamic parameters and motions between the state models.Classic identification algorithms, such as the maximum likelihood identification method and the prediction error used for parameter estimation are too low in terms of sensitivity and are thus inadequate as methods used in order to solve true values.Abkowitz [1] extended the Kalman Filter method to estimate the hydrodynamic parameters of a ship's motions.Clarke et al. [2] identified the nonlinear parameters of the motions of ships by using an artificial neural network.Haddara used free attenuation from the free response-signal method to identify the roll [3,4] and extended it to the parameter identification of sway and yaw coupled equations [5] and pitch and heave coupled equations [6].Haddara and Xu [7] additionally put forward a ship's longitudinal motions state as a Markov chain process and, in order to simplify the longitudinal motions equation, they used a neural network for the identification of a ship's longitudinal motions parameters.Mahfouz and Haddara [8] mixed the classic recognition algorithm and neural network methods, putting forward a hydrodynamic parameter identification method using RDLRNNT technology, a method that appears to be fairly sound.
Bhattacharyya and Haddara [9] used artificial neural networks (ANN) and spectral analysis methods to identify the hydrodynamic derivatives in the mathematical model involving ship and marine vehicle motions.ANN has also some defects, however, such as bad generalization performance, easily falling into a local minimum.Luo and Zou [10] applied support vector machines (SVM) to identify the hydrodynamic derivatives of Abkowitz's model from the simulated free-running model test results and then used the regressive 2 Mathematical Problems in Engineering Abkowitz model to predict zigzag tests.Zhang and Zou [11] proposed a novel method of artificial intelligence technology in the shape of support vector machines in order to estimate the hydrodynamic coefficients in the mathematical models of ship maneuvering motions.A comparison between the predicted hydrodynamic forces and the test results shows that the identified hydrodynamic mathematical model has a good generalization performance.
In recent years, with the rapid development of intelligent algorithms, a number of scholars have used the swarm intelligent algorithm, applying it to hydrodynamic parameters in order to identify problems related to the motions of ships.Through the state equation of underwater bodies and observation equation, Chen et al. [12] has used intelligent recognition technology for simulation recognition of an underwater navigation body and has obtained ten hydrodynamic parameters.In 2008, Chen et al. [13] proposed a new recognition algorithm based on intelligence technology.The leastsquare criterion together with the Differential Swarm Intelligent (DS) algorithm is employed to identify hydrodynamic parameters.In 2011, Dai et al. [14,15] used an improved PSO algorithm and continuous domain ant colony optimization algorithm to identify the hydrodynamic parameters of heave and pitch with satisfactory results.In order to determine a water diving device parameter test and for the theoretical calculation of difficult problems, Gao and Li [16] put forward a method based on the basic artificial bee colony algorithm and the improved artificial bee colony method used to identify a potential coefficient method.Experiments show that the use of artificial colony algorithm identification device parameters is indeed feasible.
The PSO algorithm was proposed by Kennedy and Eberhart in 1995 [17,18].In order to overcome the existing problems in the practical use of the PSO algorithm and improve the performance of the algorithm, an improved algorithm has been put forward by number of scholars [19][20][21][22][23][24][25][26].Generally speaking, the improved PSO algorithm strategy currently includes two aspects, namely, the improvement of the strategy of the PSO algorithm and its fusion with other algorithms.The improved PSO algorithm mainly concerns the variation of the particles, the multipopulation cooperation, and the design of parameters.These methods can potentially prevent particle aggregation and conflict, and avoid premature convergence to local optima.PSO algorithms are integrated with other algorithms, improving the strategy of the PSO.Some scholars are currently advocating the opposition-based learning particle swarm optimization algorithm.Wang et al. [21] have introduced opposition-based learning into the PSO algorithm, then they proposed opposition-based learning and the Cauchy mutation PSO algorithm (OPSO), using opposition-based learning to initialize the group.Omran and Al-Sharhan [24] have used dynamic shrinkage factors to generate opposition-based solutions.Shahzad [25] have presented three kinds of opposition-based PSO algorithm: the first version of the OPSO algorithm using only oppositionbased learning in order to initialize groups and the second version (IOPSO) in addition to opposition-based learning produced the opposition-based particles as a replacement for the worst particle in the group during each iteration.In the third version of the algorithm the initialization of oppositionbased learning is removed from IOPSO.Shi and Eberhart [26] have controlled the velocity of PSO by using oppositionbased learning and proposed the speed clamping PSO algorithm (OVCPSO) based on opposition-based learning, which achieved good results.
Owing to the limitations of conventional identification methods in coupled pitch and heave motions parameter identification, in this paper, we are proposing to identify ship coupled heave and pitch motions using opposition-based PSO.In order to achieve this, we have designed a model involving wave disturbance force and torque disturbance, using the design methods for an output parameter identification system, with an opposition-based PSO algorithm for parameter identification.

Pitch and Heave Motions Model
The coupled pitch and heave motions of a ship in a realistic sea can be described by two linear second order ordinary coupled differential equations as follows [7]: where  is heave;  is pitch;  5 is the pitching moment of inertia;  0 is the ship's mass;   is the force of the rudder;   is advanced from the rudder lifting center to the ship's center of gravity;  3 is the disturbance force of heave;  5 is the disturbance moment of pitch,  33 is the added mass Set  1 = ,  3 =  as the state variables The system state equation is then obtained as follows:

Opposition-Based Particle Swarm Optimization
3.1.Particle Swarm Optimization Algorithm.PSO learns from the natural phenomenon of birds looking for food made by a class of population-based stochastic global optimization techniques.With respect to birds in flight, in its initial state every bird is in a random position and flies randomly in all directions, but as time goes on, these initial random state birds form a small community, through mutual learning, mutual tracking, and self-organization, fly at the same speed in the same direction, and ultimately the entire group gathers in one place, namely, the food source.
In the PSO algorithm, each individual is called a "particle, " and each particle represents a potential solution.In continuous spatial coordinates, the PSO algorithm is described as follows.
Suppose that the size of the swarm is  and the search space is -dimensional, then the position of the th particle is presented as   = ( 1 ,  2 , . . .,   ), the velocity of this particle is presented as   = ( 1 ,  2 , . . .,   ), the  fitness value of each particle in its current position is fitness  = fitness(  ), its corresponding optimal value is   = ( 1 ,  2 , . . .,   ) and the population current optimal experience value is recorded as   = ( 1 ,  2 , . . .,   ).Each particle adjusts its speed dynamically according to the comprehensive analysis of both individual and population flying experience and flies to the best position that it and other particles have experienced.Each particle updates its speed and position according to the formula equations: where  is iterative times,  = 1, 2 ⋅ ⋅ ⋅ . 1 ,  2 are random numbers between 0 and 1 and  1 ,  2 are nonnegative constants.This is called the learning factor and each iteration step is justified accordingly.

Opposition-Based Learning.
Opposition-based learning was put forward by Professor Tizhoosh [19] in 2005.
He argues that intelligent algorithms are based on a random guess value concerning the initial population, with each generation coming close to the solution with the optimal solution or a close approximation of the optimal solution eventually being found.Thus, the initial guess value greatly influences the algorithm and, if the random guess value is very close to the optimal solution, the algorithm may converge quickly, but if the value is far away from the solution or is even the reverse, the algorithm will take much more time.If the current solution and its opposite are sought simultaneously, a better solution will be chosen and the efficiency of the algorithm will be greatly enhanced.According to the theory of probability, there is a 50% probability that the current solution is more remote from the optimal solution than its opposite [20].
Definition 1 (definition of the opposite number).Let  ∈  be a real number within a defined interval, where  ∈ [, ].
The opposite number  0 can be defined as Definition 2 (definition of the opposite point).In the high dimensional space, if  = ( Definition 3 (opposition-based optimization).For a point in the -dimensional space  = ( 1 ,  2 , . . .,   ), suppose that () is the function used to measure the performance of a candidate solution, according to the opposition theorem,   = ( 1 ,  2 , . . .,   ) will be the opposition set for  = ( 1 ,  2 , . . .,   ), If ( 0 ) < (), then the set of points  can be replaced by  0 , or else  is maintained.

Opposition-Based Particle Swarm
Optimization.In PSO, each particle adjusts its search direction on the basis of the optimum location of all particles.In the initial stage, the algorithm converges quickly but slows down later on or even stops.These particles lose the ability to evolve when the speed of all the particles approaches zero and the algorithm is thought to represent convergence.Sometimes the algorithm does not converge to global extreme values, however, not even local extreme values.This is because the high aggregate and deficiency diversity of the particles takes a long time or an infinite time to skip from the focusing point.
In order to solve this problem, the opposition-based learning mechanism is introduced into the basic PSO, and a new random optimization algorithm is constructed, the opposition-based particle swarm optimization (OPSO) algorithm.In the OPSO algorithm, a variable is set and referred to as conNum.If the global best fitness is not updated during a single iteration, then the conNum = conNum + 1, and when conNum reaches a constant set number setNum, it shows that there is a high concentration of particles, and the algorithm cannot find a better solution in the current position and speed.At this point, opposition-based learning is brought %% Initialization (1) Initialize swarm size N and constant number  1 and  2 ; space dimension ; maximum (2) Initialize the iteration number for opposition calculation  = 0,  = 100; (3) for  = 1:  (4) initialize   randomly with the search range ( min ,  max ) (5) initialize   randomly with the velocity range ( min ,  max ) (6) End for (7) Evaluate each particle's fitness   = (  ), and the best fitness   =   (8) Identify the best particle's position  and its fitness  = min(  ); %%Loop (9) While ( <  max ) (10) If  >  then (11) for  = 1 to  (12) Calculate the opposite particle  0 using (8); (13) Evaluate fitness in opposite vector  = (  ); (14) end for (15) Select  fittest particles  from ( 1 ,  1 , . . .,   ) and  0 ( 1 ,  1 , . . .,   ) to (16) create a population of size ; (17) Else (18) for  = 1 to  (19) Calculate particle velocity   ( + 1) using ( 5) (20) update particle position   ( + 1) using ( 6) (21) Evaluate   = (  ( + 1)) (22) End for (23) End if (24) update   (25) for into play.According to (8) the position-based position   of the particle's current position is produced, the smaller values  are selected from  and   which have 2 locations and a new swarm is then formed.If the conNum is less than setNum, then according to ( 5) and ( 6) the particle velocity and position are updated.The process of OPSO is shown in Algorithm 1.

Design of Pitch and Heave Parameter Identification
The value of pitch and heave can be measured, so select state  1 and  3 in (2) as the measurement state, with the observation equation as where  is an observation vector and  is the twodimensional measurement of noise, and this is generally considered to be white noise.Before computer simulation, it was necessary to disperse the state equation and observation equation.This paper does not consider the steering input but only the wave disturbance on the ship, with the state equation being formulated as follows: where, Φ =    , Γ = ∫   0   .In this paper, the single-parameter ITTC spectrum is chosen for wave disturbance simulation, with the expression being formulated as follows: where  is the acceleration of gravity,  is the natural angular frequency, and ℎ 1/3 is a third significant wave height, for a level 4 and 5 sea condition, and the ITTC recommended value is 2.5 m and 3.75 m, respectively.
By (10), the observed quantity is the function of , para, namely: =  (  , para  ,   ) +   ,  = 1, 2, . . ., dataNum, (12) where dataNum is the times of observation, (⋅) is the model output vector, and   is the observation vector.The minimum mean square errors between the observed data and identical value are setting as follows: The hydrodynamic parameters of our requirements should mean that the two components in (13) obtain their minimum value simultaneously under constrained conditions (10).We must set different weight coefficients to ensure that each parameter has the same effect on the objective function, taking into consideration the different order of magnitude of pitch and heave.The fitness function is shown as follows: where  is the weight coefficient.

Experiment Testing and Comparisons
Here the experimental ship's parameters are as follows: the hull quality  is 442000 kg, the beam  is 7.2 m, and the draft is 2.25 m.The waterline   is 60 m. 5 = (0.25 *   ),  0 = 99450000 (kg⋅m 2 ),   = 25.8 m, and   = 1.32 m.The number of rudder  is 2 and the hydrostatic resilience factor  44 is 3370000.For the ship,  33 ,  35 ,  55 , and  53 are constants and can be obtained by calculating the structural parameters of the ship. is Gaussian white noise  is Gaussian white noise and its covariance matrix can be taken as so that the accuracy of the sensor can be taken as A comparative algorithm is the OPSO algorithm proposed in this paper and the PSO-w (PSO with inertia weight [26]), with the parameters being set as shown in Table 1.
The identification results by PSO and OPSO are shown in Tables 2, 3, and 4, for level 4 sea condition, speed 18 kn and course angle 90 ∘ , 135 ∘ , and 180 ∘ , respectively.
As we can see from Table 2 to Table 4, the parameters of pitch and heave are correctly identified by using the PSO algorithm, with the OPSO algorithm clearly obtaining better results than the PSO, especially for level 4 sea condition, speed 18 kn, and course angle 135 ∘ , and the relative error of the OPSO is smaller than for the PSO algorithm.
From the identification of the parameters of pitch and heave motions carried out by using the OPSO algorithm, we can obtain the mathematical model for pitch and heave which is constructed according to the identification of the hydrodynamic parameters.The model in which the pitch and There are three curves in each diagram; the first curve "-◻-" represents the observed values of the coupled pitch and heave motions, the second curve "--" represents the model constructed by PSO-w, and the last curve "-e-" represents the model output values constructed by OPSO.
It is obvious in these figures that there was an agreement between the pitch and heave model estimated by the PSOw model and observed values for a level 4 sea condition, ship speed 18 kn, and course angle 90 ∘ and 180 ∘ , but when the course angle was 90 ∘ , the results were not accurate.However, the model estimated by the OPSO algorithm tallies completely with the observed values.
Tables 5, 6, and 7 and Figures 4, 5, and 6 show similar results for a level 5 sea condition.It is clear in Tables 5-7 that the parameters identified by the OPSO algorithm are close to the real ones while those identified by PSO-w are not, especially the results for level 5 sea condition, ship speed 18 kn, and course angle 90 degrees, as the parameters have greater relative errors.Because of this, the corresponding pitch and heave models do not tally with the observed values.However, for other course angles, both the PSO-w and OPSO algorithms agree with observed values.

Conclusions
The identification of the hydrodynamic parameters of ships is an important way of obtaining these parameters.In this paper, we have used OPSO to design the method of identifying the hydrodynamic parameters of the coupled pitch and heave motions of ships.This paper introduces in detail the opposition-basedlearning algorithm and puts forward an improved idea and process for the oppositionbased algorithm.In addition, this paper introduces the process involving the hydrodynamic parameter identification algorithm.Here, we have established wave disturbance as the model input, with the algorithm's fitness function being the output model.The hydrodynamic parameter identification problem was then converted into a constrained optimization problem and the OPSO algorithm was used to find the optimal solution.Finally, we made use of computer simulation, with the simulation results showing that the OPSO algorithm is relatively stable in terms of identifying the hydrodynamic          parameters connected with the problem of the coupled pitch and heave motions of ships.In addition, the identified coupled pitch and heave model values and the observed values are consistent.This method may provide a new solution for the identification of coupled pitch and heave motions.This paper has not taken the disturbance of the rudder angle into consideration, something which the author intends to research in due course.

Figure 1 :
Figure 1: Pitch and heave observed value.Model identified by PSO-w and model identified by OPSO for level 4 sea condition, ship speed 18 kn and course angle 90 ∘ .

Figure 2 :
Figure 2: Pitch and heave observed value.Model identified by PSO-w and model identified by OPSO for level 4 sea condition, ship speed 18 kn and course angle 135 ∘ .

Figure 3 :
Figure 3: Pitch and heave observed value.Model identified by PSO-w and model identified by OPSO for level 4 sea condition, ship speed 18 kn and course angle 180 ∘ .

Figure 4 :
Figure 4: Pitch and heave observed value.Model identified by PSO-w and model identified by OPSO for level 5 sea condition, ship speed 18 kn and course angle 90 ∘ .

Figure 5 :Observations
Figure 5: Pitch and heave observed value.Model identified by PSO-w and model identified by OPSO for level 5 sea condition, ship speed 18 kn and course angle 135 ∘ .

Figure 6 :
Figure 6: Pitch and heave observed value.Model identified by PSO-w and model identified by OPSO for level 5 sea condition, ship speed 18 kn and course angle 180 ∘ .

Table 1 :
Parameters and their range of values used in our proposed algorithm., speed 18 kn, and course angle 90 ∘ , 135 ∘ , and 180 ∘ is shown in Figures1, 2, and 3, respectively.

Table 2 :
Parameter identification of pitch and heave motions for level 4 sea condition, ship speed 18 kn and course angle 90 ∘ .

Table 3 :
Parameter identification of pitch and heave motions for level 4 sea condition, ship speed 18 kn and course angle 135 ∘ .

Table 4 :
Parameter identification of pitch and heave motions for level 4 sea condition, ship speed 18 kn and course angle 180 ∘ .

Table 5 :
Parameter identification for pitch and heave motions for level 5 sea condition, ship speed 18 kn and course angle 90 ∘ .

Table 6 :
Parameter identification of pitch and heave motions for level 5 sea condition, ship speed 18 kn and course angle 135 ∘ .

Table 7 :
Parameter identification of pitch and heave motions for level 5 sea condition, ship speed 18 kn and course angle 180 ∘ .