# Numerical Modeling of Wave Disturbances in the Process of Ship Movement Control
## 3 Computing Experiments  
The experiments have been made in a MATLAB/Simulink environment. A [PERSON] model ([PERSON], 1995) represented a real ship, incorporating the dynamics of the steering gear ([PERSON], 1995):  
\[ \begin{array}{l}\dot{x}_{1}=x_{5}\cos x_{3}-x_{6}\sin x_{3}\\ \dot{x}_{2}=x_{5}\sin x_{3}+x_{6}\cos x_{3}\\ \dot{x}_{3}=x_{4}\\ \dot{x}_{4}=-a_{1}x_{4}-a_{2}{x_{4}}^{3}+a_{3}u\\ \dot{x}_{5}=-fx_{5}-W{x_{4}}^{2}+S_{t}\\ x_{6}=-r_{1}x_{4}-r_{3}{x_{4}}^{3}\\ \dot{u}=u_{z}-u\\ |u_{z}|\leq u_{\max}\\ |\dot{u}|\leq\dot{u}_{\max}\end{array}  \tag{7}\]  
where  
\((x_{1},x_{2})=(x,y)\)--Cartesian coordinates (ship's position);  
\(x_{3}=\psi\)--deviation from the course;  
\(x_{4}=r\)--angular velocity;  
\(x_{5}\)--longitudinal speed;  
\(x_{6}\)--transverse speed;  
\(u=\delta\)--rudder angle;  
\(u_{z}=\delta_{z}\)--rudder angle setting;  
\(\delta_{\max}\)--maximum rudder deflection;  
\(\dot{\delta}_{\max}\)--maximum rate of turn of the rudder;  
\(S_{t}\)--propeller thrust;  
\(a_{1},a_{2},a_{3},f,W,r_{1},r_{3}\)--coefficients determined from model tests (different for different types of vessels). The ship movement parameters adopted herein are those of a ship of mariner class, motor ship (m.s.). Compass Island ([PERSON], 1995): \(a_{1}=0.018\) [1/s], \(a_{2}=37.2\) [s/rad\({}^{2}\)], \(a_{3}=0.001\) [1/s\({}^{2}\)], \(f=0.014\) [1/s], \(w=124\) [m/rad\({}^{2}\)], \(s_{t}=0.11\) [m/s\({}^{2}\)], \(r_{1}=-69.5\) [m/rad], \(r_{3}=0\) [m/s\({}^{2}\)/rad\({}^{3}\)]. This particular ship has the following characteristics: 9214 gross registered tons [\(t\)], 13,498 DWT, single screw, length \(L=172\) [m], maximum draft indicated by the waterplane \(T=8\) [m], maximum speed 20 [w], maximum (minimum) angular velocity \(r_{\max}=0.0191\) [rad/s] (\(r_{\min}=-0.0191\) [rad/s]), maximum (minimum) rudder angle \(\delta_{\max}=0.6\) [rad] (\(\delta_{\max}=-0.6\) [rad]), maximum (minimum) rudder rate of turn \(\delta_{\max}=0.066\) [rad/s] (\(\delta_{\max}=-0.066\)[rad/s]). The established initial parameters of the simulation were as follow: Angular velocity \(r=0\) [rad/s], deviation from the course \(\psi=0\) [rad], rudder angle \(\delta=0\) [rad], ship's speed \(V=7.7\)[m/s]. A linear quadratic regulator (LQR) was chosen as the control algorithm of the ship course stabilization system. The LQR regulator was synthesized using a Nomoto model ([PERSON], 1995):  
\[ \begin{array}{l}\dot{x}_{3}=x_{4}.\\ \dot{x}_{4}=-a_{1}x_{4}+a_{3}u\end{array}  \tag{8}\]  
The quality control criterion was this functional:  
\[J=\int\limits_{0}^{t}\left(\psi^{2}+\lambda_{I}\delta^{2}\ \right)dt \tag{9}\]where  
\(\lambda_{J}\)--a coefficient greater than zero, which is interpreted as a compromise between the deviation from the course (angle of yaw) and the rudder angle (steering gear load), arbitrarily adopted here as 1. Then, the control for LQR can be expressed by this formula:  
\[\delta=k_{\psi}\psi+k_{r}r \tag{10}\]  
where \(k_{\psi}=-\frac{1}{\sqrt{\lambda_{J}}}\), \(k_{r}=\frac{1}{a_{3}}\left(a_{1}-\sqrt{a_{1}{}^{2}+\frac{2a_{3}}{\sqrt{\lambda_ {J}}}}\right)\). Without compromising the generality of the research, it was assumed that parameters \(\xi\), \(h_{3\%}\), \(\lambda\) do not change their value during computational experiments. The computing experiments were intended to investigate the operational correctness of numerical-model-generating waves acting on the ship hull. Figures 4-7 show ship movement trajectories (course setting was \(0^{\circ}\)) for disturbances from four types of wave.