Improved Control of Propeller Ventilation Based on POA-XGBoost and Ship Dynamics/Control Model

Under adverse sea conditions, propeller ventilation caused by in-and-out water can decrease the reliability of the ship power grid and the lifespan of the propulsion shaft system. Predicting the development of propeller ventilation severity while identifying it can contribute to improving propeller ventilation control. In this study, the eXtreme Gradient Boosting (XGBoost) algorithm combined with a ship dynamics/control model is proposed as a propeller ventilation identification and prediction method. Meanwhile, the Pelican optimization algorithm (POA), particle swarm optimization (PSO), and genetic algorithm (GA) are applied to determine the optimal hyperparameters of the XGBoost algorithm. The results indicate that the method can effectively identify the current propeller ventilation state and predict whether a full ventilation state will occur after experiencing a partial propeller ventilation state. The comparison results indicate that the POA has a better optimization effect on the XGBoost algorithm for propeller ventilation identification and prediction. The method proposed in this study provides crucial technical support for the effective switching of propulsion control strategies for ship electric propulsion systems under adverse sea conditions.


INTRODUCTION
Under adverse sea conditions, the dynamic behavior of the propeller in waves causes fluctuations in the ship-integrated power system.In particular, propeller ventilation caused by frequent in-and-out-of-water movements leads to fluctuations as high as 80-100% of the rated load [1].Propeller ventilation can not only accelerate the wear and tear of the ship's propulsion equipment but also lead to significant fluctuations in the voltage and frequency of the shipboard power network caused by an imbalance between the "source" and "load" power [2].Severe fluctuations in the shipboard power network can adversely affect the operational performance and efficiency of electrical equipment and even lead to accidents where the entire ship loses power.To solve this issue, Smogeli et al. [3] proposed an antispin control strategy that can switch between adverse sea conditions and normal conditions for propulsion control strategies.This switch was based on the propeller ventilation state identified by the ventilation identification module.Without considering the predicted development of ventilation severity, ineffective propulsion control strategy switching may occur.Therefore, predicting the severity of ventilation while identifying it is important for ensuring the safety and stability of ship operations.
Machine Learning (ML) algorithms have been widely applied in the identification of propeller ventilation in recent years.Califano et al. [4] and Luca Savio et al. [5] adopted a support vector machine and a single Kalman filter to identify whether propeller ventilation occurred, both of which have achieved high identification accuracy.Gao et al. [6] and Zhang et al. [7] proposed adopting an evidence reasoning rule based on the Adaboost.ML and maximum likelihood evidential reasoning rule to identify the partial ventilation state.This is a transitional state between the nonventilated and fully ventilated states.However, there are some limitations to the existing methods.They can only identify the current propeller ventilation state as the moment for switching propulsion control strategies without considering whether a full ventilation state will occur after experiencing the partial propeller ventilation state.If the propeller does not fully transition from a partial ventilation state to a full ventilation state, it quickly returns to the non-ventilation state.This can result in the frequent and ineffective switching of propulsion control strategies under adverse sea conditions.The propeller may return to the non-ventilation state before completing the switch to the propulsion control strategy, or it immediately needs to switch back to the normal condition control strategy after completing the switch to the adverse sea condition control strategy.The method proposed in this study can identify the current propeller ventilation state and predict whether a full ventilation state will occur after experiencing the partial propeller ventilation state.The propulsion control strategy is switched only when the full ventilation state is predicted, resulting in a reduction in ineffective switching of propulsion control strategies.
To address the aforementioned issues, this study proposes predicting the severity of ventilation development and identifying it to enhance the control of propeller ventilation.If the propeller reached the full ventilation state, the propulsion control strategy was switched.If it does not, it does not switch.Propeller ventilation identification and prediction are classification problems.Currently, the main algorithms used for classification include KNN, neural networks, SVM, and decision trees.The XGBoost algorithm proposed by Chen [8] is based on the CART regression tree and belongs to the boosting ensemble learning method.By incorporating L2 regularization terms and secondorder derivatives into the objective function of the gradient augmented decision tree, the ability to generalize and avoid overfitting of XGBoost is improved.The XGBoost algorithm has an excellent ability to handle large-scale data.The comparison results of the KNN, BP neural network, SVM, and XGBoost on the problem of propeller ventilation identification and prediction by the author indicate that XGBoost achieves better performance.However, the XGBoost algorithm without parameter optimization has a low degree of fit with the existing dataset, which leads to its poor generalization performance and adaptability [9].Therefore, this study adopts POA, PSO, and GA to optimize the hyperparameters of XGBoost.This paper is organized as follows.In Section 2, the ship dynamics/control model is developed to simulate the dynamic response of a ship propulsion system under adverse sea conditions of different wind and wave conditions.In Section 3, the current and speed signals of the propulsion motor are collected, and their characteristics are extracted for training the POA-XGBoost, PSO-XGBoost, and GA-XGBoost algorithms.These algorithms were designed to accurately identify and predict the propeller ventilation.Section 4 focuses on the identification and prediction performance of the model.
Finally, the conclusions and recommendations for future research are presented in Section 5.

SHIP DYNAMICS/CONTROL MODEL
To simulate the dynamic characteristics of ship electric propulsion systems under adverse sea conditions, an integrated simulation model including a mechanical module, electrical module, and hydrodynamic module is introduced in this section, as shown in Fig. 1.The integrated simulation model is mainly categorized into three main subsystems: electrical propulsion system, the 3 DOF (degree of freedom) motion system, and the sea state interference system.The electrical propulsion system includes a propulsion motor, propulsion controller, and propeller models.The 3 DOF motion system can calculate the ship heading angle and speed according to the interaction between the thrust generated by the propeller, pod angle, and external interference of wind and waves.The sea state interference system, which includes the first-order wave force model, second-order wave force model, wind force model, and in-andout-of-water model, was used to simulate the external environmental interference of ships under adverse sea conditions.

The propulsion motor model
Because the electrical time constant is much smaller than the mechanical time constant in an electric propulsion system, the first-order equation in.Equation ( 1) is used to simplify the motor dynamic equation [10].
( ) where Qc is the target torque provided by the controller, Qm is the output torque of the propulsion motor, Tm is the time constant of the motor.
The torque balance equation between the propeller and the propulsion motor can be simplified using (2).
where Is is the moment of inertia, kω is the friction coefficient of the transmission shaft, ω is the propeller angular velocity, Qp is the propeller torque.

Propeller model
When determining the geometric parameters of a fixed-pitch propeller, the torque and thrust coefficients of the propeller are dependent only on the advance coefficient.The torque and thrust of the propeller are expressed by (3).
where Tp is the propeller thrust; KQ and KT represent the propeller torque coefficient and the propeller thrust coefficient, respectively; βQ and βT represent the torque loss coefficient and the loss thrust coefficient, respectively, which are used to characterize the variation of propeller torque and thrust with propeller submergence; ρw is the water density; n and D represent the revolution speed and the diameter of the propeller, respectively.
The goal of ship propulsion control is to maintain the stability of a ship's velocity.A motor speed control strategy was adopted in this study.

3 DOF ship motion system
Figure 2: ship motion coordinate system [11] As shown in Fig. 2, a ship motion coordinate system [11], which includes the earth-fixed coordinate system O-ξηζ, the body-fixed coordinate system G-xyz and the motion coordinate system G-x'y'z',' is developed to explore the effects of wind and waves on ship forces in adverse sea conditions.
In this study, it was assumed that the forces generated by the wind and waves on the ship were in the same direction.The ship sails against wind and waves under adverse sea conditions.Therefore, only surge, heave, and pitch motions were considered in this study, whereas sway, roll, and yaw motions were ignored.
According to the separation concept of MMG school [12], surge motion can be expressed by ( 4). ( ) where m and 11 m are the mass of the ship and the added mass of the entrained water in the longitudinal direction, respectively, u is the ship longitudinal velocity, w is the ship vertical velocity, q is the angular speed of the pitch motion.The subscripts H, P, A and W represent the external forces and moments contributed by the hull, pod thruster, wind, and waves, respectively.
According to [13], a simplified response equation derived from a semi-analytical approach was proposed by Jørgen Juncher Jense et al. to calculate the pitch and heave motion of monohull ships induced by waves, which can be expressed by (5). 2 is the wave number, λ is the wave length, Vs is the ship velocity, χw is the relative wave direction that is taken as π when moving against the waves, Z is the vertical force, M is the longitudinal moment, A is the sectional hydrodynamic damping, which can be modelled by the dimensionless ratio between the incoming and diffracted wave amplitudes [14].

Wind force model
As recorded in [15], the force and moments generated by the wind usually have a significant impact on the surge, sway, and yaw motions of ships on the horizontal plane, with little impact on the heave, pitch, and roll motions.Therefore, only the longitudinal force generated by the wind was considered in this study, which can be calculated using the steady velocity of the ship.

( )
where ρA is the air density, UA is the relative wind speed, CXA is the longitudinal wind coefficient, χA is the relative wind direction, AX is the projected frontal area of the ship above water.

First-order waves force model
The Froude-Krenov hypothesis states that the pressure distribution in regular waves is not influenced by the presence of ships [13].The firstorder wave force generated by regular waves can be expressed by (7) by considering the ship to be a hexahedron.
( ) where χw is the relative wave direction, ha is the amplitude of the wave, k is the wave number, λ is the wavelength, ωe is the frequency of encounter, ke is the effective wave number, κ is the Smith correction coefficient.

Second-order waves force model
According to [15], the second-order wave force has a significant impact on ship surge motion, with little impact on heave and pitch motions.The longitudinal force generated by second-order waves can be expressed as (8).
where g is the gravity acceleration, H1/3 is the significant wave, approximately 1.6 times the average wave height, Tv is the averaged wave period, CXW is the longitudinal second-order force coefficient.

In-and-out-of-water model
Under adverse sea conditions, the loss of thrust and torque in the propeller caused by the in-and out-of-water effects can be expressed by the thrust loss factor and torque loss factor, respectively.Equation ( 9) was used to calculate the thrust loss factor.
Where, h is the propeller submergence; R represents the radius of propeller.
The torque loss factor can be expressed as the thrust loss factor, as shown in (10).
( ) Where, m is a coefficient with the value of 0.85 in this paper.

Propeller wake fluctuation model
The inflow velocity of the propeller continuously fluctuates under the combined influence of ship speed, maneuvering, and waves [16].This study comprehensively considers the influence of the ship maneuvering motion on the average inflow velocity of the propeller and the influence of regular waves on the oscillation inflow velocity of the propeller.The inflow velocity of the propeller is expressed as (11).
exp cos cos cos where xp and zp represent the longitudinal and vertical positions of the propeller, respectively, in the ship-fixed coordinate system.

Model validation
Because the ship dynamic/control model is used to simulate the dynamic response of the ship propulsion system, the simulation accuracy must be validated.
By comparing the experimental results obtained from the propeller model test in the deep-water towing tank of the benchmark cruise ship, the accuracy of the ship surge motion model was validated, as shown in Fig. 3.According to the data from the ship seakeeping test recorded in [17], the ship pitch motion, heave motion, and first-order wave models were validated, as shown in Fig. 4. To simulate the longitudinal forces caused by the wind and second-order wave forces, the longitudinal and second-order wave force coefficients are shown in Figure 5.Note that the coefficients recorded in [15] were directly used in this study.The uncertainties caused by directly using these coefficients for the cruise ship are assumed to be acceptable for the following reasons: first, both ships are cruise ships with similar hull shapes; second, the longitudinal wind and secondorder wave force coefficients are nondimensional.

Design of the ventilation identification and prediction model
There are challenges in directly measuring the changes in propeller performance parameters under adverse sea conditions.Because the propulsion motor is directly connected to the propeller, its state parameters of the propulsion motor can be used for propeller ventilation identification and prediction.Wang et al. [18] used propulsion torque data to train a model for identifying propeller ventilation, while Zhang [7] incorporated both propulsion torque and speed data.The parameters of the propulsion motor can be divided into electrical and mechanical parameters.Comprehensively considering both the electrical and mechanical parameters may result in better performance.Gao [6] utilized the propulsion torque data and the root mean square value of the electric current.However, to a certain extent, the electric current of the motor varies with torque.In other words, they exhibited the same change trend.Therefore, the electrical and mechanical parameters of the propulsion motor were selected in this study, specifically, the root mean square of the current and speed signals.
The design process of the propeller ventilation identification and prediction model is illustrated in Fig. 6.The dynamics/control model is introduced in Section 2. First, in the simulation model, the ship velocity was set to 6 kn.The operational parameters of the ship propulsion motor under 32 different wind and wave conditions were obtained by adjusting the wind and wave parameters, such as the wind speed, wave period, and significant wave height, as presented in Table 1.The wind speed can be set to 19.0 m/s and 21.0 m/s.The wave period can be set to 9.0 s, 11.0 s, 13.0 s and 15.0 s.The significant wave height can be set to 4.5 m, 5.0 s, 5.5 m and 6.0 m.Then, 32 different conditions can be obtained by cross combining the values of above parameters.The propulsion motor parameters include the motor speed, rate of change of the motor speed, root mean square of the motor current, and rate of change of the root mean square of the motor current.Second, according to the maximum ventilation level that the propeller can develop, 32 sets of simulation results were divided into three categories.Different propeller ventilation states are set for the three categories, which are introduced in Section 3.2.Then, the 32 sets of simulation results were divided into training data and verification data, among which the training data were further divided into training and test samples.Training data were used to train and test the learning and prediction performance of the intelligent algorithm.Verification data were used to demonstrate the generalization ability of the trained intelligent algorithm.Finally, POA-XGBoost, PSO-XGBoost, and GA-XGBoost are developed to achieve a function that can identify the current ventilation state and predict the development of ventilation severity.POA, PSO, and GA were used to select the optimal hyperparameters of the XGBoost algorithm.

Data classification and ventilation state
The method of setting different propeller ventilation states for different categories proposed by the author in [19] will be used again in this study.
According to the maximum ventilation level that the propeller can develop, 32 sets of simulation results were divided into three categories.Category 1 indicates the occurrence of full ventilation.Category 2 indicates that the maximum ventilation level within a wave period corresponds to a partial ventilation.Category

Pelican optimization algorithm
The POA developed by Pavel Trojovský [20] in 2020 is a random heuristic algorithm.The POA simulates the behavior and strategies of pelicans during hunting and is divided into two stages: moving towards prey and winging on the water surface.In the stage of moving towards prey, the pelicans determine the position of the prey and then move towards the determined area.It is worth mentioning that the position of the prey is randomly generated in the search space, leading to an increase in the exploration ability of the POA in the exact search of the problem-solving space.In the stage of winging on the water surface, after reaching the surface of the water, the pelicans spread their wings to move the fish upward and then collected prey in their throat pouch.This behavior can lead to more prey being caught in the attacked space.A POA can increase its local search capability by simulating its behavior.POA has better global search ability and best local area recognition ability in engineering problems, which has been proven in several reports [21], [22].

Particle swarm optimization
The PSO, developed by Eberhart and Kennedy [23] in 1995, is an evolutionary computation.PSO is a simplified model established using swarm intelligence, which was initially inspired by the regularity of bird clustering activities.The PSO simulates the sharing of information among individuals in an animal population.This process leads to an evolutionary progression from disorder to order in the problem-solving space, ultimately resulting in identification of the optimal solution.

Genetic algorithm
The GA, proposed by Holland in 1973 [24], is a modern intelligent algorithm that draws inspiration from Darwin's theory of evolution and Mendel's theory of genetics.The aim is to simulate the survival of the fittest and natural genetic mechanisms observed in the biological world.The GA transforms practical problems into evolutionary problems by starting with an initial population and generating new populations through repeated genetic operations of selection, crossover, and mutation until the termination conditions are met.Because of its advantages of good robustness, strong global optimization ability, and no limitations on derivatives and function continuity, GA is often adopted in the field of objective optimization.

XGBoost algorithm
The prediction model of XGBoost can be expressed by (12).
( ) where xi represents the i-th input sample,  ̂ is the predicted value of the i-th sample, ft represents the t-th decision tree, F is the set of all regression trees.
The objective function of the XGBoost algorithm consists of a loss function and regularization, which can be expressed as (13).
where yi represents the true value of the i-th sample, ( ) is the loss function, and ( )  is the regularization function, which can be specifically represented by (14).
( ) where T is the number of leaf nodes in the decision tree, ω represents the leaf node output score of each decision tree, λ is the coefficient of the leaf node, γ is the punish regularization term for the leaf weights.
In the XGBoost algorithm, the error generated by the model combined with the previous (t-1) trees is used as a reference to build the t-th tree, leading to a decrease in the value of the loss function.Therefore, the objective function can be rewritten as (15): When the tree structure is determined, the optimal weight is obtained by setting its first-order derivative to 0.
The optimized objective function can be obtained by substituting the optimal weight expressed in Equation ( 16) into the objective function.

POA-XGBoost, PSO-XGBoost, and GA-XGBoost
The 32 sets of data were divided into training and test datasets.Meanwhile, the 32 sets of data were divided into three categories.Therefore, three sets of data, including one set from each category, were selected as test data, whereas the remaining 29 sets of data were selected as training data.In this study, POA, PSO, and GA were selected to adjust the hyperparameters of the XGBoost algorithm.The baseline algorithm for propeller ventilation identification and prediction was XGBoost, whereas the POA, PSO, and GA were used to search for the optimal hyperparameters of the Xgboost algorithm.The hyperparameters that need to be optimized are listed in Table 2, which include max_depth, min_child_weight, n_estimators, alpha, lambda, gamma, subsample, and colsample_bytree.
The modeling process of the propeller ventilation identification and prediction model based on POA-Xgboost, PSO-Xgboost, and GA-Xgboost is shown in Fig. 8. POA, PSO, and GA are used to optimize the XGBoost algorithm to find the hyperparameters that can maximize the classification performance of the XGBoost algorithm.The classification error of the XGBoost algorithm was used as the fitness function of the POA, PSO, and GA.The optimal hyperparameters of the Xgboost algorithm can be obtained by comparing the fitness values to those obtained by continuous iteration and update.

RESULT AND ANALYSIS
The training data consisted of 29 sets of simulation results comprising 20,967 sample points.Among these, 14,667 sample points were randomly selected to form the training samples, and the remaining 6,300 were selected to form the test samples.
The MAPE, MSE, and MAE values of the XGBoost, POA-XGBoost, PSO-XGBoost, and GA-XGBoost models are listed in Table 3.It can be seen that the POA, PSO, and GA can improve the classification accuracy of Xgboost, whereas the POA performs better for propeller ventilation identification and prediction problems.To further demonstrate the generalization ability of the POA-Xgboost model for propeller ventilation identification and prediction, the remaining three sets of verification data were used as the inputs for the trained model.Meanwhile, the GA and PSO are used to optimize the hyperparameters of XGBoost through the same process as POA-XGBoost.The identification accuracy of the POA-XGBoost model was compared with the results of the XGBoost, GA-XGBoost, and PSO-XGBoost models, as shown in Fig. 7 and Fig. 8.Note that owing to the extremely obvious features of category 3, all models in this study can be easily identified and have a high identification accuracy.The results for Category 3 are not displayed here.There is a sample imbalance problem for the remaining verification data of both Category 1 and Category 2. For category 1, the proportion of sample points of state 1 to all samples was 57.6%, 5.8% for state 2, 26.6% for state 3, and 10.0% for state 4. For Category 2, the proportion of the sample points of State 1 to all samples was 90.2%, while that of State 4 was 9.8 %.Accurately identifying states 2 and 4 is most important, as it relates to the switching of propulsion control strategies.From Fig. 10 and Fig. 11, it can be seen that the POA-XGBoost model has the highest total identification accuracy among all the models for both category 1 and category 2. For category 1, although the GA-XGBoost model achieves better identification accuracy for state 2, POA-XGBoost performs better when considering the identification accuracy of states 2 and 4 comprehensively.For category 2, the identification accuracy of state 4 of the POA-XGBoost model is far higher than that of the other models.
The test samples were used to test the accuracy of the trained POA-XGBoost model, as shown in Fig. 6.A confusion matrix is presented in Table 3. From Table 4, it can be seen that the total identification accuracy of POA-XGBoost for the test samples was 99.38%.This indicates that the POA-XGBoost model has excellent learning ability.As state 1 has a large sample size and high prediction accuracy, it was excluded from the calculation of the confidence interval for the prediction results, as shown in Table 5.The confidence interval results further demonstrate the effectiveness of the POA-XGBoost model.

CONCLUSION
Considering the important role of propeller state identification and prediction in the safety of ships sailing in adverse sea conditions, as well as the powerful classification performance of the XGBoost algorithm, a method of combining the simulation model with the XGBoost algorithm to design a propeller ventilation identification and prediction model is proposed in this paper.Then, POA, PSO, and GA are adopted to optimize the hyperparameters of the XGBoost algorithm.The results indicate that the proposed method can achieve the function of predict whether a full ventilation state will occur after experiencing a partial propeller ventilation state, which can improve the control of ship propeller ventilation in adverse sea conditions.Meanwhile, the POA has a better optimization effect on the XGBoost algorithm for propeller ventilation identification and prediction.
The proposed method provides a basis for switching propulsion control strategies to improve the stability of ship-integrated power systems.Therefore, in the next step, a model predictive control strategy will be developed based on the propeller ventilation identification and prediction model.We will further develop a propeller ventilation effect prediction model to improve its real-time performance.

Figure 1 :
Figure 1: block diagram of the integrated simulation model structure

Figure 3 :
Figure 3: Validation of ship surge motion model

Figure 4 :
Figure 4: Validation of pitch motion, heave motion and first-order waves models

Figure 5 :
Figure 5: Wind and second-order waves force coefficients

Figure 6 :
Figure 6: Block diagram of the identification and prediction method

Figure 7 :
Figure 7: Different propeller ventilation states setting based on different categories [19]

Figure 8 :
Figure 8: Propeller ventilation identification and prediction process

Figure 12 :
Figure 12: Comparison results between test samples and predicted values

Table 1 .
Input parameters and applications of the 32 sets of data.

Table 2 .
Hyperparameters to be optimized.

Table 3 .
MAPE, MSE and MAE values of the different Xgboost model.

Table 5 .
Confidence interval of prediction accuracy of POA-XGBoost model.