# Parameter Optimization for Ship Antiroll Gyros
## 4 Mathematical Model for Parameter Optimization of Antiroll Gyro
### 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.  
1. When the gyro was in a nonworking state According to Equation (8), the ship's mathematical model could be established as follows:  
\[\ddot{\phi}_{\text{b}}=-\text{c}_{1}\dot{\phi}_{\text{b}}-\text{c}_{3}\dot{ \phi}_{\text{b}}^{3}-\text{k}_{1}\phi_{\text{b}}-\text{k}_{3}\phi_{\text{b}}^{ 3}-\text{k}_{5}\phi_{\text{b}}^{5}+\text{Dh}\alpha(\text{t})/\big{(}\text{I}_{ \phi\phi}+\text{J}_{\phi\phi}\big{)} \tag{12}\]  
where \(\phi_{b}\) is the ship's roll angle when the gyro is not in operation. Let \(x=\dot{\phi}_{\text{b}}\). Equation (12) could be transformed into an initial value problem of first-order differential equations:  
\[\left\{ \begin{array}{l}x(0)=\phi_{b1}=x_{0},\phi_{b}(0)=\phi_{b0}\\ \dot{\phi}_{b}(t)=x(t)\\ \dot{x}(t)=f_{1}(t,\phi_{b}(t),x(t))\end{array} \right. \tag{13}\]  
where \(f_{1}(t,\phi_{\text{b}}(t),x(t))=-\text{c}_{1}x(t)-\text{c}_{3}x(t)^{3}-\text {k}_{1}\phi_{\text{b}}(t)-\text{k}_{3}\phi_{\text{b}}(t)^{3}-\text{k}_{5}\phi _{\text{b}}(t)^{5}+\text{Dh}\alpha(\text{t})/\big{(}\text{I}_{\phi\phi}+\text {J}_{\phi\phi}\big{)}\). Figure 8: Roll reduction rate with various rotor diameter and thickness. Figure 7: Roll reduction rate with various rotational and precession momentum moments. By solving the differential equation for time \(t\), the following equation could be obtained:  
\[\left\{ \begin{array}{l}\phi_{b}(0)=\phi_{b0},\dot{\phi}_{b}(0)=x_{0}\\ \phi_{bk}=\phi_{b(k-1)}+lx_{k}\\ x_{k}=x_{k-1}+lf_{1}(t_{k},\phi_{bk},x_{k}),k=1,2\cdots\\ t_{k}=t_{k-1}+l\end{array} \right. \tag{14}\]  
where \(l\) is the iterative step length of time \(t\), and \(k\) is the number of iterations. Then, the expression of the roll angle \(\phi_{b}\) changing with time \(t\) could be obtained from Equation (14), \(\phi_{b}=\phi_{b(k-1)}+lx_{k}\). 2. 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:  
\[\left\{ \begin{array}{l}\ddot{\phi}_{a}=-c_{1}\dot{\phi}_{a}-c_{3}\dot{\phi}_ {a}{}^{3}-k_{1}\phi_{a}-k_{3}\phi_{a}{}^{3}-k_{5}\phi_{a}{}^{5}-h_{0}\dot{\beta }\cos(\beta)/\big{(}l_{\phi\phi}+l_{\phi\phi}\big{)}+Dh\alpha(t)/\big{(}l_{ \phi\phi}+l_{\phi\phi}\big{)}\\ \dot{\beta}=h_{0}\dot{\phi}_{a}\cos(\beta)/J-\mathcal{C}\dot{\beta}/J\end{array} \right. \tag{15}\]  
where \(\phi_{a}\) is the ship's roll angle when the gyro is in operation. Let \(x=\dot{\phi}_{a}\) and \(\mathbf{y}=\dot{\beta}\). Equation (15) could be transformed into an initial value problem of first-order differential equations:  
\[\left\{\begin{array}{l}x(0)=\phi_{a1}=x_{0},\phi_{a}(0)=\phi_{a0}\\ y(0)=\beta_{1}=y_{0},\beta(0)=\beta_{0}\\ \dot{\phi}_{a}  
where,  
\[ \begin{array}{l}f_{1}(t,\phi_{a}(t),x(t),\beta(t),y(t))=-c_{1}x(t)-c_{3}x(t)^{3 }-k_{1}\phi_{a}(t)-k_{3}\phi_{a}(t)^{3}-k_{5}\phi_{a}(t)^{5}-h_{0}y(t)\cos(\beta (t))\big{/}\big{(}l_{\phi\phi}+l_{\phi\phi}\big{)}\\ +Data(t)\big{/}\big{(}l_{\phi\phi}+l_{\phi\phi}\big{)}\\ f_{2}(t,x(t),\beta(t),y(t))=h_{0}x(t)\cos(\beta(t))/J-Cy(t)/J.\end{array}  \tag{17}\]  
By solving the differential equation for time \(t\), the following equation could be obtained:  
\[\left\{ \begin{array}{l}\phi_{a}(0)=\phi_{a0},\dot{\phi}_{a}(0)=x_{0}\\ \beta(0)=\beta_{0},\dot{\beta}(0)=y_{0}\\ \phi_{ak}=\phi_{a(k-1)}+lx_{k},\beta_{k}=\beta_{k-1}+ly_{k}\\ x_{k}=x_{k-1}+lf_{1}(t_{k},\phi_{ak},x_{k},\beta_{k},y_{k}),k=1,2\cdots\\ y_{k}=y_{k-1}+lf_{2}(t_{k},x_{k},\beta_{k},y_{k}),k=1,2\cdots\\ t_{k}=t_{k-1}+l\end{array} \right. \tag{18}\]  
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 \(\phi_{a}\) changing with time \(t\) could be obtained from Equation (18), \(\phi_{a}=\phi_{a(k-1)}+lx_{k}\).