Numerical Modeling of Wave Disturbances in the Process of Ship Movement Control

The article presents a numerical model of sea wave generation as an implementation of the stochastic process with a spectrum of wave angular velocity. Based on the wave spectrum, a forming filter is determined, and its input is fed with white noise. The resulting signal added to the angular speed of a ship represents disturbances acting on the ship’s hull as a result of wave impact. The model was used for simulation tests of the influence of disturbances on the course stabilization system of the ship.


Introduction
A typical practice in designing an automatic control system is to build a mathematical model of an object (or process), and on this basis to make a synthesis of a control system (controller, algorithm). Then, before implementation, the created control algorithm is tested (if possible) by computer simulation and tuned in right after installation. Simulation is therefore the first step in checking the stability of the system and algorithm operation, so it should reflect reality as faithfully as possible, accounting for disturbances.
The process of ship movement control is characterized by a high level of external disturbances. Due to the manner of their influence, disturbances can be divided into two groups. Disturbances of one type affect ship dynamics (changes in water depth or loading condition, etc.); the other type is additive disturbances, whose effects are observed as additional signals superimposed on a ship's heading, angular speed, drift angle, etc. The latter group also includes disturbances from currents, winds, and waves. Although they are correlated, these disturbances are usually divided into three different types of signals. This article focuses on disturbances from wind-generated waves, as they are the most essential from the viewpoint of the automatic ship movement control problem.
The article presents a numerical model of sea wave generation as a method alternative to the existing ones. The presented solution can be universally used in simulations of automatic ship movement control systems, tackling various problems. This is often difficult in the case of solutions presented in the literature on the subject. This restriction often results from the complexity of the models and the assumptions made. The proposed model is easy to implement and still takes into account all relevant components. The model was verified in simulations testing the influence of disturbances on the operation of the ship course stabilization system.

Wave Disturbances Generated by Wind
Surface layers of water in the sea and the air above are rarely calm. Statistical data on weather conditions prevailing in the North Atlantic show that, on average, the weather is windless only for about seven days a year [14]. In the remaining period, winds blow with different forces and from different directions, and the sea is more or less wavy. Wind-induced waves are formed by the impact of wind on the water; that is, kinetic energy from the atmosphere is transferred to the surface of the sea, creating free deformations. The size of the waves depends on the speed of wind-generating waves (the stronger the wind is, the larger wave dimensions can be), the duration of the wind blowing above the water from the same direction (in practice ±15 • ), and the distance of fetch. Waves that appear on the surface of the seas and oceans make up an irregular interfered signal composed of a series of monochromatic waves. A set of interfered waves contains a whole spectrum of waves with different lengths, periods, speeds, and heights, so disturbances from waves can be regarded as an implementation of a stochastic process involving a specific spectrum. An example of such a description appointed by research based on real measurements is the spectrum in this form [14]: where S(ω)-spectral density of wave ordinate; ω-angular frequency of the wave (pulsation); h 3% -wave height with 3% probability of exceedance (Table 1); β-parameter dependent on h 3% ( Figure 1); α-parameter dependent on parameter β(α = 0.21β).
The above values are associated with wave parameters (height h 3% , length) and depend on the sea state, as shown in Table 1. This table also approximately indicates the relation between wind speed (Beaufort wind scale) and sea state (Douglas scale).  In the automatic course control system, the value of deviation from a preset course depends on wave energy, as well as a ship's speed and wave angle ( Figure 2). In this approach, we can consider the following situations: • Waves coming at a specific angle from the direction opposite to ship movement (diagonal waves); • waves coming at an angle, but in the direction of ship movement (quartering waves); • waves coming from the bow (head waves); • waves perpendicular to the ship side (beam waves); • waves striking the stern (following waves). The greatest changes in the heading angle of the ship at low speeds occur in case of transverse waves, whereas the smallest impact comes from diagonal and quartering waves; in case of diagonal and head waves, heading deviations (yawing) get larger as the ship speed increases. Taking into account the ship speed and wave angle, we can transform spectrum (1) to this form (determined by research based on real measurements) [14]: In the automatic course control system, the value of deviation from a preset course depends on wave energy, as well as a ship's speed and wave angle ( Figure 2). In this approach, we can consider the following situations: • Waves coming at a specific angle from the direction opposite to ship movement (diagonal waves); • waves coming at an angle, but in the direction of ship movement (quartering waves); • waves coming from the bow (head waves); • waves perpendicular to the ship side (beam waves); • waves striking the stern (following waves). In the automatic course control system, the value of deviation from a preset course depends on wave energy, as well as a ship's speed and wave angle ( Figure 2). In this approach, we can consider the following situations: • Waves coming at a specific angle from the direction opposite to ship movement (diagonal waves); • waves coming at an angle, but in the direction of ship movement (quartering waves); • waves coming from the bow (head waves); • waves perpendicular to the ship side (beam waves); • waves striking the stern (following waves). The greatest changes in the heading angle of the ship at low speeds occur in case of transverse waves, whereas the smallest impact comes from diagonal and quartering waves; in case of diagonal and head waves, heading deviations (yawing) get larger as the ship speed increases. Taking into account the ship speed and wave angle, we can transform spectrum (1) to this form (determined by research based on real measurements) [14]: The greatest changes in the heading angle of the ship at low speeds occur in case of transverse waves, whereas the smallest impact comes from diagonal and quartering waves; in case of diagonal and head waves, heading deviations (yawing) get larger as the ship speed increases. Taking into Algorithms 2018, 11, 130 4 of 10 account the ship speed and wave angle, we can transform spectrum (1) to this form (determined by research based on real measurements) [14]: ξ-wave angle ( Figure 2).
The effect of wave action on the process of ship movement control (in various control problems) can easily be determined by measuring a ship's angular velocity. The signal of angular speed is a sum of two components: One formed due to rudder deflection, and the other due to waves. The spectrum of angular velocity is created by transforming the spectrum of wave ordinates (2) and takes this form (appointed by research based on real measurements) [14]: where S r (ω)-spectral density of wave angular velocity; x r , x T -dimensionless reducing parameters (Figure 3) dependent on the length of the ship (L), wavelength (λ), and the ship's maximum draught marked by the waterplane (T). ξ -wave angle (Figure 2).
The effect of wave action on the process of ship movement control (in various control problems) can easily be determined by measuring a ship's angular velocity. The signal of angular speed is a sum of two components: One formed due to rudder deflection, and the other due to waves. The spectrum of angular velocity is created by transforming the spectrum of wave ordinates (2) and takes this form (appointed by research based on real measurements) [14]:  It should be noted that spectral density (3), due to the expression in the numerator ( ) cos ξ , faithfully represents the power of the wave signal for angles differing from 90° by at least ± 15° (for diagonal, quartering, head, and following waves).
In order to use the spectrum of wave angular velocity (3) acting as disturbances affecting the ship hull due to waves, the forming filter:  It should be noted that spectral density (3), due to the expression in the numerator cos(ξ), faithfully represents the power of the wave signal for angles differing from 90 • by at least ±15 • (for diagonal, quartering, head, and following waves).
In order to use the spectrum of wave angular velocity (3) acting as disturbances affecting the ship hull due to waves, the forming filter: 2Dα k x r x T |cos(ξ)|g −1 s 2 s 2 + 2α k s + α k 2 + β k 2 (4) should be used to pass white noise through it (stochastic process with zero expected value and steady spectral density); then, the formed signal r w should be added to-or, for positive wave angles, subtracted from-the ship's angular speed caused by rudder deflection. Filter (4) is obtained from this relation: Using Lagrange interpolation (Algorithm 1), where average values of parameters are adopted in the nodes β, x r , x T , we get: In addition, taking into account the data from Table 1, we can refer to the model input to wind force (Beaufort wind scale) or to sea state (Douglas scale).

Computing Experiments
The experiments have been made in a MATLAB/Simulink environment. A de Witt-Oppe model [15] represented a real ship, incorporating the dynamics of the steering gear [16]: (7) where (x 1 , x 2 ) = (x, y)-Cartesian coordinates (ship's position); x 3 = ψ-deviation from the course; x 4 = r-angular velocity; x 5 -longitudinal speed; x 6 -transverse speed; u = δ-rudder angle; u z = δ z -rudder angle setting; δ max -maximum rudder deflection; . δ 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). 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 [16]: The quality control criterion was this functional: where λ 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: where Without compromising the generality of the research, it was assumed that parameters ξ, h 3% , λ 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 • ) for disturbances from four types of wave. The first trajectory was obtained at sea state 4 (h 3% = 1.5, λ = 60) and for the wave angle ξ = −π/4[rad] (diagonal waves); the second trajectory was produced at sea state 5 (h 3% = 3, λ = 90) and for the wave angle ξ = 5π/12[rad] (diagonal waves); the third one was also obtained at sea state 5 (h 3% = 3, λ = 90), but for the wave angle ξ = 0[rad] (head waves), whereas the fourth was obtained at sea state 6 (h 3% = 5, λ = 130) and for the wave angle ξ = −π/5[rad] (diagonal waves). In all four situations, the quality control is high (note the scale used due to the specificity of particular cases), although in the second case the ship is much more pushed to the left (port side, because ξ > 0) than in the first case (to the right-starboard, because ξ < 0), due to higher sea state. In the third case, despite sea state 5, the ship is drifting less than in the second situation, due to the zero angle of the head waves. In the fourth case, the ship has the strongest drift (to the right-starboard, because ξ < 0), due to the highest sea state 6. This happens even if the wave angle in absolute terms is the smallest of all presented situations involving diagonal waves.           In addition, Figures 4-7 illustrate disturbance signals added to the ship's angular velocity caused by rudder deflection. One can observe that, as expected, the absolute value of the signal increases with increasing sea state, whereas for the steady sea state it decreases for smaller absolute wave angles.
The presented situations are typical of the research done. In all examined cases, the model correctly executed hull-affecting disturbances that corresponded to sea waves induced by wind.  In addition, Figures 4-7 illustrate disturbance signals added to the ship's angular velocity caused by rudder deflection. One can observe that, as expected, the absolute value of the signal increases with increasing sea state, whereas for the steady sea state it decreases for smaller absolute wave angles.
The presented situations are typical of the research done. In all examined cases, the model correctly executed hull-affecting disturbances that corresponded to sea waves induced by wind.

Conclusions
The article presents a numerical model of sea wave generation, which was positively tested in a ship course stabilization problem. The stabilization control algorithm was provided by an LQR regulator.
The author plans to apply stochastic disturbance of a ship's angular speed in developing original systems of ship movement control.