Parameter Optimization for Ship Antiroll Gyros

Ship antiroll gyros are a type of equipment used to reduce ships’ roll angle, and their parameters are related to the parameters of a ship and wave, which affect gyro performance. As an alternative framework, we designed a calculation method for roll reduction rate and considered random waves to establish a gyro parameter optimization model, and we then solved it through the bacteria foraging optimization algorithm (BFOA) and pattern search optimization algorithm (PSOA) to obtain optimal parameter values. Results revealed that the two methods could effectively reduce the overall mass and floor space of the antiroll gyro and improved its antirolling effect. In addition, the convergence speed and antirolling effect of the BFOA were better than that of the PSOA.


Introduction
The stability of a ship greatly influences its crew and built-in equipment [1]. Therefore, reducing the roll motion of a ship is crucial. Compared with other ship antiroll products, antiroll gyros have advantages, such as easy installation, low energy consumption, and antiroll capability, at any speed of the ship [2,3].
In 1904, Schlick first proposed placing a large gyro on a ship to provide a roll-damping moment [4]. In 1917, Orden modified the structure of the ship antiroll gyro to make the structure simpler [5]. In 1925, Thompson introduced a new antiroll gyro that reduced the gyro's energy consumption [6]. Perez and Steinmann proposed using several small antiroll gyros to distribute the overall capsizing moment of the ship, monitor it, and adjust the number of gyros according to the variable navigational conditions [7,8]. With scientific progress, research is no longer limited to structural optimization but improving the performance of gyros around the control method [9][10][11].
The rotating gyro rotor produces a damping moment opposite to the swaying direction of the ship during precession. Therefore, various gyro parameters produce various damping moments and antirolling effects. However, research has been limited to the optimization of the gyro's structure and control method and the lack of parameter optimization. Similar to antiroll gyros, tuned mass dampers (TMDs) are often used to reduce vibration in high-rise buildings and bridges. Researchers show that parameter optimization is an effective means to improve damping performance [12][13][14]. Xin took the minimum standard deviation of the fore-aft displacement at the top of a tower as the control objective and optimized the mass, damping, and stiffness coefficients of the TMD. The results indicated that the fore-aft displacement was reduced by 54.5% through the parameter optimization method [14].
Scholars have proposed some classical optimization algorithms and intelligent optimization algorithms to solve different optimization problems [15][16][17][18]. Pattern search optimization algorithm (PSOA) is one of the classical algorithms. It is a method for solving optimization problems that do not require any information about the gradient of the objective function [15]; however, this method tends to fall into a locally optimal solution. In contrast, the bacteria foraging optimization algorithm (BFOA) is a new swarm intelligence optimization algorithm. It has the advantages of simple realization, group parallel search, fast convergence speed, and easy to jump out of the local optimal solution [16], so it has been widely used in many engineering fields.
Referring to the parameter optimization of TMDs and considering the interaction between the wave, ship, and gyro, this paper established the joint dynamical equation of ships and antiroll gyros under random waves. Most control objectives in TMDs are intuitive, such as displacement. However, our objective, the roll reduction rate, needs to be calculated through the roll angles' mean value over a period of time. Therefore, considering the nonreal time of the roll reduction rate, we proposed resolving the roll reduction rate through continuous iteration and designed its calculation method. In addition, considering the lack of research on gyro's parameter optimization, we established a gyro's parameter optimization model and then solved it through the BFOA and PSOA to obtain optimal parameter values.

Mathematical Model of Random Waves
The interference moment of random waves was mainly related to the wave slope angle α(t), and the essence of α(t) was to convert the spectrum of waves into that of α(t). Where α(t) is the maximum inclination of the wave surface on a vertical section orthogonal to the crest, and the wave slope angle α(t) [19] was defined as follows: where ω e is the encounter frequency, ε i is the random phase angle uniformly distributed between 0 and 2π, N is the number of selected harmonics, and χ is the course angle. S σ (ω e ) is the spectrum function of wave slope angle, which could be obtained with the density of the wave energy spectrum S ζ (ω): where g is the gravitational acceleration, u is the ship sailing speed, and ω is the harmonic angular frequency. The two-parameter spectrum proposed by the International Towing Tank Conference (ITTC) was used as the density of the wave energy spectrum S ζ (ω) [20]: where h 1/3 is the significant wave height and T 1 is the mean period of the wave.

Ship Rolling Mathematical Model under Random Wave Excitation
The stress of the ship is shown in Figure 1. α(t) is the wave slope angle, φ is the roll-damping moment, K(φ) is the roll-restoring moment, and M(χ, ω, t) is the wave excitation moment.

Ship Rolling Mathematical Model Under Random Wave Excitation
The stress of the ship is shown in  Based on the Mathieu equation [21], considering the nonlinear damp and ship nonlinear restore moment, the ship rolling motion equation was established as follows [22]: where I φφ is the ship's moment of inertia, J φφ is the moment of inertia of additional mass, φ is the roll angle, φ  is the roll angular acceleration, and χ is the course angle.
The roll-damping moment ( ) R φ  was calculated as the linear damping plus cubic damping [22]: where φ  is the roll angular velocity, and ' 1 c and ' 3 c are the damping moment coefficients.
To simplify the calculation, the roll-restoring moment was approximated to a fifth-degree polynomial [22]: where 1 K , 3 K , and 5 K are the restoring moment coefficients. The wave excitation moment was expressed as a function of wave slope angle [22]: where D is the ship's displacement, h is the transverse metacentric height, and ( ) t α is the wave slope angle.
The ship rolling mathematical model could be transformed into: Based on the Mathieu equation [21], considering the nonlinear damp and ship nonlinear restore moment, the ship rolling motion equation was established as follows [22]: where I φφ is the ship's moment of inertia, J φφ is the moment of inertia of additional mass, φ is the roll angle, ..
φ is the roll angular acceleration, and χ is the course angle.
The roll-damping moment R . φ was calculated as the linear damping plus cubic damping [22]: where . φ is the roll angular velocity, and c 1 and c 3 are the damping moment coefficients. To simplify the calculation, the roll-restoring moment was approximated to a fifth-degree polynomial [22]: where K 1 , K 3 , and K 5 are the restoring moment coefficients. The wave excitation moment was expressed as a function of wave slope angle [22]: where D is the ship's displacement, h is the transverse metacentric height, and α(t) is the wave slope angle.
The ship rolling mathematical model could be transformed into: ..

Joint Dynamical Equation of Ship and Antiroll Gyro
As displayed in Figure 2, the antiroll gyro was mounted on the ship deck. The antiroll gyro consisted of a precession axis, frame, rotor, and rotor spindle. Oξηζ is the absolute coordinate system, and φ is the roll angle of the hull around Oζ. Oxyz is the relative coordinate system, and Oz is the rotating axis of the rotor. Oy is the rotating axis of the outer frame, and β is the precession angle of the gyro around Oy.

Joint Dynamical Equation of Ship and Antiroll Gyro
As displayed in Figure 2, the antiroll gyro was mounted on the ship deck. The antiroll gyro consisted of a precession axis, frame, rotor, and rotor spindle. Oξηζ is the absolute coordinate system, and φ is the roll angle of the hull around Oζ . Oxyz is the relative coordinate system, and Oz is the rotating axis of the rotor. Oy is the rotating axis of the outer frame, and β is the precession angle of the gyro around Oy . The mass of the gyro's outer frame was neglected, and the influence of the ship's movement on other degrees of freedom on the gyro was not considered. The rotor was an axisymmetric rigid body whose moment of inertia around Oz was z I , the rotor speed was constant at 0 ω , and the momentum moment constant of Ox and Oy was J . According to the Euler equation of the motion of rigid bodies [23], the motion equation of the antiroll gyro relative to Oxyz was as follows: The damping device was added in the precession direction of the antiroll gyro, and the precession of the gyro was restricted appropriately depending on the characteristics of damping to The mass of the gyro's outer frame was neglected, and the influence of the ship's movement on other degrees of freedom on the gyro was not considered. The rotor was an axisymmetric rigid body whose moment of inertia around Oz was I z , the rotor speed was constant at ω 0 , and the momentum moment constant of Ox and Oy was J. According to the Euler equation of the motion of rigid bodies [23], the motion equation of the antiroll gyro relative to Oxyz was as follows: where M x , M y , and M z are the components of the resultant external torque on Oxyz, β is the precession angular acceleration, and h 0 = I z ω 0 is the momentum moment constant of the gyro. If Oy was considered as the input axis, then input torque M y caused the gyro to precess, and then a torque M x output on Ox occurred. The output torque M x from the above motion equation was projected into Oξηζ. Given the stability of the high-speed spinning gyro, the angular velocity . φ was considerably smaller than ω 0 , and its second derivative was ignored. Equation (9) could then be simplified as follows: The damping device was added in the precession direction of the antiroll gyro, and the precession of the gyro was restricted appropriately depending on the characteristics of damping to improve the antirolling effect. The total damping torque M y could be expressed as M y = C . β, and C was defined as the gyro's damping coefficient in units of Ns/m, which was the ratio of the damper's damping force installed in the gyro to the movement speed of the damper's piston rod.
Furthermore, the motion equation of the ship and the mathematical model of the antiroll gyro could be simultaneously established to obtain the ship antiroll gyro's motion equation:

Study of the Antirolling Characteristics of the Gyro
Following Equation (11), this Section describes the antirolling characteristics of a public service ship and its supporting antiroll gyro and the influence of various parameters of the antiroll gyro on the roll angle of the ship. The ship is presented in Figure 3, and the parameters of it are presented in Table 1. The structure and parameters of the supporting antiroll gyro are presented in Table 2 and

Study of the Antirolling Characteristics of the Gyro
Following Equation (11), this Section describes the antirolling characteristics of a public service ship and its supporting antiroll gyro and the influence of various parameters of the antiroll gyro on the roll angle of the ship. The ship is presented in Figure 3, and the parameters of it are presented in Table 1. The structure and parameters of the supporting antiroll gyro are presented in Table 2 and Figure 4. The gyro's rotor had an axisymmetric structure, and the intermediate rotating shaft and rotating outer ring were connected by rib welding.     improve the antirolling effect. The total damping torque y M could be expressed as y M Cβ =  , and C was defined as the gyro's damping coefficient in units of Ns/m, which was the ratio of the damper's damping force installed in the gyro to the movement speed of the damper's piston rod.
Furthermore, the motion equation of the ship and the mathematical model of the antiroll gyro could be simultaneously established to obtain the ship antiroll gyro's motion equation:

Study of the Antirolling Characteristics of the Gyro
Following Equation (11), this Section describes the antirolling characteristics of a public service ship and its supporting antiroll gyro and the influence of various parameters of the antiroll gyro on the roll angle of the ship. The ship is presented in Figure 3, and the parameters of it are presented in Table 1. The structure and parameters of the supporting antiroll gyro are presented in Table 2 and    A comparison and analysis of the motion equation of the rolling ship and antiroll gyro indicated that the antirolling effect of the ship was related to the rotational momentum moment h 0 , the precession momentum moment J, and the gyro's damping coefficient C.

Influence of Gyro's Damping Coefficient on Roll Reduction Rate
By substituting values of gyro's damping coefficients into Equation (11) to solve the differential equation, the variation in the ship roll reduction rate under corresponding gyro's damping coefficients could be obtained. Where the roll reduction rate means the rate at which the roll angle decreases when the gyro is working compared to that when the gyro is not working, and it would be defined qualitatively in Equation (18). As displayed in Figure 5, when the gyro's damping coefficient increased, the roll reduction rate gradually increased. When the gyro's damping coefficient C = 16, 000 Ns/m, the roll reduction rate reached the maximum value and then began to decline.
Considering that the mean value period has little influence on the wave slope angle, we only studied the influence of gyro's damping coefficients under different significant wave heights on roll reduction rate. Usually, when the wave height is higher than 5 m, the surveillance ship will not cruise. So the roll reduction rate under different gyro's damping coefficients was solved in five cases with wave heights of 1-5 m, and the significant wave height of 5 m was taken as the subsequent optimization condition. The five coordinates in Figure 6 were, respectively, the maximum values of the roll reduction rate when the wave height was 1-5 m. Figure 6 illustrates that as the significant wave height changed, the optimal interval of gyro's damping coefficient changed very little. Therefore, the gyro's damping coefficient was taken as a constraint condition in the subsequent simulation.

Influence of Rotational and Precession Momentum Moment on Roll Reduction Rate
By substituting different values of 0 h and J into Equation (11) for the solution, the variation in roll reduction rate with the corresponding 0 h and J is illustrated in Figure 7, which shows that the roll reduction rate increased with increasing 0 h and decreased with increasing J .
To identify the relationship among roll reduction rate, rotor diameter, and thickness more directly, we determined the roll reduction rate with various rotor diameter and thickness in Figure  8, which indicated that an increase in rotor diameter resulted in an increase in gradual roll reduction rate. When the rotor diameter was 0.5 m, as the rotor thickness increased, the roll reduction rate increased first and then decreased before reaching a peak of 70% when the rotor thickness was 0.75 m. With the increase of rotor diameter, the influence of rotor thickness on the roll reduction rate decreased gradually. However, the increase of rotor diameter and thickness led to an increase in gyro's power consumption and floor space. Therefore, it was necessary to establish a parameter optimization model, set up constraints, and determine the optimal solution of gyro parameters in consideration of various factors.

Influence of Rotational and Precession Momentum Moment on Roll Reduction Rate
By substituting different values of 0 h and J into Equation (11) for the solution, the variation in roll reduction rate with the corresponding 0 h and J is illustrated in Figure 7, which shows that the roll reduction rate increased with increasing 0 h and decreased with increasing J .
To identify the relationship among roll reduction rate, rotor diameter, and thickness more directly, we determined the roll reduction rate with various rotor diameter and thickness in Figure  8, which indicated that an increase in rotor diameter resulted in an increase in gradual roll reduction rate. When the rotor diameter was 0.5 m, as the rotor thickness increased, the roll reduction rate increased first and then decreased before reaching a peak of 70% when the rotor thickness was 0.75 m. With the increase of rotor diameter, the influence of rotor thickness on the roll reduction rate decreased gradually. However, the increase of rotor diameter and thickness led to an increase in gyro's power consumption and floor space. Therefore, it was necessary to establish a parameter optimization model, set up constraints, and determine the optimal solution of gyro parameters in consideration of various factors.

Influence of Rotational and Precession Momentum Moment on Roll Reduction Rate
By substituting different values of h 0 and J into Equation (11) for the solution, the variation in roll reduction rate with the corresponding h 0 and J is illustrated in Figure 7, which shows that the roll reduction rate increased with increasing h 0 and decreased with increasing J.
To identify the relationship among roll reduction rate, rotor diameter, and thickness more directly, we determined the roll reduction rate with various rotor diameter and thickness in Figure 8, which indicated that an increase in rotor diameter resulted in an increase in gradual roll reduction rate. When the rotor diameter was 0.5 m, as the rotor thickness increased, the roll reduction rate increased first and then decreased before reaching a peak of 70% when the rotor thickness was 0.75 m. With the increase of rotor diameter, the influence of rotor thickness on the roll reduction rate decreased gradually. However, the increase of rotor diameter and thickness led to an increase in gyro's power consumption and floor space. Therefore, it was necessary to establish a parameter optimization model, set up constraints, and determine the optimal solution of gyro parameters in consideration of various factors. Appl. Sci. 2020, 10, x FOR PEER REVIEW 23 of 19 Figure 7. Roll reduction rate with various rotational and precession momentum moments.

Mathematical Model for Parameter Optimization of Antiroll Gyro
According to the study in Section 3, there was a complicated nonlinear relationship between the roll reduction rate and the rotor's size. In addition, since the gyro is restricted by the ship, the parameter optimization is needed to obtain the optimal parameters. In this Section, the ship roll reduction rate and the rotor mass were modeled as objective functions. Then, the ship space, power drive, and material strength were considered as constraints to form the optimization model.

Establishing the Mathematical Model of the Ship Roll Reduction Rate
The antirolling capability of gyro could be directly evaluated by the ship roll reduction rate. The solution of the ship roll reduction rate required continuous iteration, and its iterative process is presented in Figure 9.

Mathematical Model for Parameter Optimization of Antiroll Gyro
According to the study in Section 3, there was a complicated nonlinear relationship between the roll reduction rate and the rotor's size. In addition, since the gyro is restricted by the ship, the parameter optimization is needed to obtain the optimal parameters. In this Section, the ship roll reduction rate and the rotor mass were modeled as objective functions. Then, the ship space, power drive, and material strength were considered as constraints to form the optimization model.

Establishing the Mathematical Model of the Ship Roll Reduction Rate
The antirolling capability of gyro could be directly evaluated by the ship roll reduction rate. The solution of the ship roll reduction rate required continuous iteration, and its iterative process is presented in Figure 9.

Mathematical Model for Parameter Optimization of Antiroll Gyro
According to the study in Section 3, there was a complicated nonlinear relationship between the roll reduction rate and the rotor's size. In addition, since the gyro is restricted by the ship, the parameter optimization is needed to obtain the optimal parameters. In this Section, the ship roll reduction rate and the rotor mass were modeled as objective functions. Then, the ship space, power drive, and material strength were considered as constraints to form the optimization model.

Establishing the Mathematical Model of the Ship Roll Reduction Rate
The antirolling capability of gyro could be directly evaluated by the ship roll reduction rate. The solution of the ship roll reduction rate required continuous iteration, and its iterative process is presented in Figure 9.

When the gyro was in a nonworking state
According to Equation (8), the ship's mathematical model could be established as follows: where φ b is the ship's roll angle when the gyro is not in operation. Let x = . φ b . Equation (12) could be transformed into an initial value problem of first-order differential equations: where Appl. Sci. 2020, 10, 661

of 15
By solving the differential equation for time t, the following equation could be obtained: where l is the iterative step length of time t, and k is the number of iterations. Then, the expression of the roll angle φ b changing with time t could be obtained from Equation (14) The iterative step length of time t is l , the iterative number is k

Roll reduction rate
The gyro is in non-working state The gyro is in working state Circulation Circulation Figure 9. Solution process of ship roll reduction rate.
1. When the gyro was in a nonworking state According to Equation (8), the ship's mathematical model could be established as follows: ( ) ( ) where b φ is the ship's roll angle when the gyro is not in operation.
Let b x φ =  . Equation (12) could be transformed into an initial value problem of first-order differential equations: . By solving the differential equation for time t , the following equation could be obtained: . Solution process of ship roll reduction rate.

When the gyro was in a working state
According to Equation (11), the mathematical model of the ship antiroll gyro could be established as follows: where φ a is the ship's roll angle when the gyro is in operation. Let x = . φ a and y = .
β. Equation (15) could be transformed into an initial value problem of first-order differential equations: Appl. Sci. 2020, 10, 661 9 of 15 where, By solving the differential equation for time t, the following equation could be obtained: where l is the iterative step to determine the length of time t, and k is the number of iterations. Then, the expression of roll angle φ a changing with time t could be obtained from Equation (17), φ a = φ a(k−1) + lx k .

Expression of Ship Roll Reduction Rate
The ship roll reduction rate TT was defined as follows: and φ a is the average of φ a from φ a1 to φ ak .

Objective Functions
Different ships have different working environments and different requirements for their antiroll gyros, which can be roughly summarized by two points: (1) the efficiency principle, which refers to the antirolling effect that antiroll gyro can achieve and is typically expressed as the roll reduction rate; and (2) the lightweight principle, which refers to the gyro's overall mass that is as small as possible because the mass of the antiroll gyro is mainly concentrated on the rotor and can also be expressed as the mass of the rotor.

Highest roll reduction rate
The roll reduction rate was expressed in Equation (18), and the objective function was expressed as follows:

Minimum rotor mass
The structure and size of the rotor are displayed in Figure 4. Therefore, the mass of the rotor could be expressed as follows: where V is the volume of the rotor in Figure 4. The objective function was expressed as follows:

Constraint Conditions
The dimensional constraint of the gyro rotor was obtained based on the maximum allowable mounting size of the gyro, given the assumption that the gyro's maximum allowable mounting size is h l × h w × h h , where h l , h w , and h h are the length, width, and height of the mounting size. As shown in Figure 4, the rotor's inner diameter D 1 , the rotor's outer diameter D 2 , the rotor's shaft diameter D 3 , the rotor thickness H 1 , and the ribbed plate thickness H 3 met the following constraints: where a i , i ∈ {1, 2, · · · , 6} are all positive, and their specific values were selected according to the actual size of the gyro's rotor. The dimensional constraint of motor speed ω m was obtained based on the available power of the ship's electrical system. As ω m = 9550P T , where P is the rated power and T is the rated torque, given the assumption that the power cap is P s , the ω met the following constraints: where a 7 is positive, and its specific value was selected empirically between 1050 and 1150. The constraint of the gyro's damping coefficient was expressed as a 8 ≤ C ≤ a 9 , in which a 8 and a 9 were obtained from Figure 6. The constraint of the mass of the gyro rotor was Ms ≤ a 10 , where a 10 was selected according to gyro's size. The constraint of the roll reduction rate was TT ≥ a 11 , where the specific value of a 11 was given by the ship's designer.
Then, the constraint conditions can be summarized as follows: Ms ≤ a 10 , a 11 ≤ TT (24)

Principles of PSOA and BFOA
PSOA is a direct search method, which only uses the function value instead of the derivative, so it is very effective in solving the optimization problem of functions that are not differentiable or difficult to differentiate. As shown in Figure 10, PSOA searches a set of points around the current point, looking for one where the value of the objective function is lower than the value at the current point.
The equation of roll reduction rate is nonlinear, which is difficult to solve using the gradient-based optimization algorithm. So, PSOA is a feasible method to achieve the optimal object of this paper. However, PSOA tends to fall into the local optimal solution, and the selection of initial value has a great impact on the result. To overcome these shortcomings, we further applied a parallel search method, BFOA.
BFOA is a new swarm intelligence optimization algorithm, which can be summarized as searching for food, moving the location, and digesting food. As shown in Figure 11, BFOA achieves optimization through three behaviors: Chemotaxis, replication, and dispersal. The chemotaxis can ensure the local search ability of bacteria, the replication can accelerate the search speed of bacteria, and the dispersal can enhance the global optimization ability of the algorithm. parallel search method, BFOA.
BFOA is a new swarm intelligence optimization algorithm, which can be summarized as searching for food, moving the location, and digesting food. As shown in Figure 11, BFOA achieves optimization through three behaviors: chemotaxis, replication, and dispersal. The chemotaxis can ensure the local search ability of bacteria, the replication can accelerate the search speed of bacteria, and the dispersal can enhance the global optimization ability of the algorithm.

Results and Analysis of the Highest Roll Reduction Rate
By taking the ship and its supporting antiroll gyro provided in Section 3 as an example, this Section conducted a simulation analysis on the parameter optimization. Given the ship's size, the parameter optimization model with the highest roll reduction rate as the objective could be written as follows:

Results and Analysis of the Highest Roll Reduction Rate
By taking the ship and its supporting antiroll gyro provided in Section 3 as an example, this Section conducted a simulation analysis on the parameter optimization. Given the ship's size, the parameter optimization model with the highest roll reduction rate as the objective could be written as follows: The relationship between the roll reduction rate and the iterations of the PSOA and BFOA is illustrated in Figure 12, and the solution time and results of the two algorithms are shown in Figure 13. Figures 11 and 12 indicate that the convergence speed of the BFOA was faster, and its roll reduction rate was higher than that of the PSOA. With the same mass of 2000 kg, the roll reduction rate obtained through the BFOA reached 79.6%, higher than that of the PSOA (78.5%).  The comparison between the parameters of the gyro before and after the BFOA's optimization of the roll reduction rate is presented in Table 3. The gyro's damping coefficient C increased by 13.2%, which was within the optimal interval in Figure 6. The inner diameter 1 D became larger, and the outer diameter 2 D became slightly smaller, which caused the rotational momentum moment of the gyro to decrease. The rotor thickness 1 H increased, which caused the precession momentum moment of the gyro to increase. It is consistent with Figure 6 that the increase of rotational momentum moment and the decrease of precession momentum moment contributed to the increase of roll reduction rate. Although the mass only decreased by 20.6%, the optimization of these parameters made the roll reduction rate increase to 79.6%.  The comparison between the parameters of the gyro before and after the BFOA's optimization of the roll reduction rate is presented in Table 3. The gyro's damping coefficient C increased by 13.2%, which was within the optimal interval in Figure 6. The inner diameter 1 D became larger, and the outer diameter 2 D became slightly smaller, which caused the rotational momentum moment of the gyro to decrease. The rotor thickness 1 H increased, which caused the precession momentum moment of the gyro to increase. It is consistent with Figure 6 that the increase of rotational momentum moment and the decrease of precession momentum moment contributed to the increase of roll reduction rate. Although the mass only decreased by 20.6%, the optimization of these parameters made the roll reduction rate increase to 79.6%. The comparison between the parameters of the gyro before and after the BFOA's optimization of the roll reduction rate is presented in Table 3. The gyro's damping coefficient C increased by 13.2%, which was within the optimal interval in Figure 6. The inner diameter D 1 became larger, and the outer diameter D 2 became slightly smaller, which caused the rotational momentum moment of the gyro to decrease. The rotor thickness H 1 increased, which caused the precession momentum moment of the gyro to increase. It is consistent with Figure 6 that the increase of rotational momentum moment and the decrease of precession momentum moment contributed to the increase of roll reduction rate. Although the mass only decreased by 20.6%, the optimization of these parameters made the roll reduction rate increase to 79.6%.

Results and Analysis of the Minimum Rotor Mass
The parameter optimization model with the minimum rotor mass as the objective could be rewritten as follows: The relationship between the rotor mass and iterations of the PSOA and BFOA is illustrated in Figure 14, and the solution time and results of the two optimization algorithms are presented in Figure 15. Figures 14 and 15 indicate that the convergence speed of the BFOA was faster, and its rotor mass was smaller than that of PSOA. With the same roll reduction rate of 75%, the rotor mass obtained with the BFOA was 1560 kg, smaller than that with the PSOA (1680 kg).

Results and Analysis of the Minimum Rotor Mass
The parameter optimization model with the minimum rotor mass as the objective could be rewritten as follows: The relationship between the rotor mass and iterations of the PSOA and BFOA is illustrated in Figure 14, and the solution time and results of the two optimization algorithms are presented in Figure 15. Figures 14 and 15 indicate that the convergence speed of the BFOA was faster, and its rotor mass was smaller than that of PSOA. With the same roll reduction rate of 75%, the rotor mass obtained with the BFOA was 1560 kg, smaller than that with the PSOA (1680 kg).  The comparison between the parameters of the gyro before and after the BFOA optimization of rotor mass is presented in Table 4. As the rotor mass was directly related to the rotor size, the inner diameter D 1 , outer diameter D 2 , and rotor thickness H 1 all had obvious changes, especially the rotor thickness, which decreased by 28.6%, higher than that of Section 5.2 (2.6%). In addition, the gyro's damping coefficient C increased by 8.4%, smaller than that of Section 5.2 (13.2%), but still conformed to the optimal interval in Figure 6. Although the roll reduction rate only increased to 75.1% in this optimization, the objective function, rotor mass decreased by 960 kg. The comparison between the parameters of the gyro before and after the BFOA optimization of rotor mass is presented in Table 4. As the rotor mass was directly related to the rotor size, the inner diameter 1 D , outer diameter 2 D , and rotor thickness 1 H all had obvious changes, especially the rotor thickness, which decreased by 28.6%, higher than that of Section 5.2 (2.6%). In addition, the gyro's damping coefficient C increased by 8.4%, smaller than that of Section 5.2 (13.2%), but still conformed to the optimal interval in Figure 6. Although the roll reduction rate only increased to 75.1% in this optimization, the objective function, rotor mass decreased by 960 kg.

Conclusions
Little work has been conducted for optimizing gyro parameters. In the present study, we designed a parameter optimization method for antiroll gyros of ships. The specific contributions of the present work are as follows: We established a joint dynamical equation of ships and antiroll gyros and analyzed the influence of gyro's damping coefficient C , rotational momentum moment 0 h , and precession momentum moment J on roll reduction rate. Following this, we proposed a calculation method for the roll reduction rate. Then, taking the minimum rotor mass and highest roll reduction rate as the objective function, and the ship space, power drive, and material strength as the constraints, we established a gyro parameter optimization model. Finally, we used the PSOA and BFOA to solve the two-parameter optimization models.
Our simulation results revealed that antirolling characteristics, such as roll reduction rate and rotor mass, improved effectively through gyro parameter optimization. In addition, the convergence speed of the BFOA was faster than that of the PSOA, and the antirolling characteristics

Conclusions
Little work has been conducted for optimizing gyro parameters. In the present study, we designed a parameter optimization method for antiroll gyros of ships. The specific contributions of the present work are as follows: We established a joint dynamical equation of ships and antiroll gyros and analyzed the influence of gyro's damping coefficient C, rotational momentum moment h 0 , and precession momentum moment J on roll reduction rate. Following this, we proposed a calculation method for the roll reduction rate. Then, taking the minimum rotor mass and highest roll reduction rate as the objective function, and the ship space, power drive, and material strength as the constraints, we established a gyro parameter optimization model. Finally, we used the PSOA and BFOA to solve the two-parameter optimization models.
Our simulation results revealed that antirolling characteristics, such as roll reduction rate and rotor mass, improved effectively through gyro parameter optimization. In addition, the convergence speed of the BFOA was faster than that of the PSOA, and the antirolling characteristics obtained by the BFOA were better than those obtained by the PSOA, and this was due to the excellent global search ability of the BFOA.