Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Recently, several active control strategies for the stabilization of parametric roll oscillations in ships have been proposed [2, 7, 8, 10, 9, 14, 15, 17, 18, 27, 29]. The potential of violating one of the conditions for the onset of parametric roll resonance (see [6]) has been effectively shown in [2, 8, 10, 9, 17, 18, 27]. Those control strategies, called frequency detuning control in Chap. 10, are designed to change the frequency of the parametric excitation for instance via the Doppler-shift of the encounter frequency – that is, the frequency of the waves as seen from the ship. The Doppler-shift can be achieved by variations of the ship’s speed and heading angle.

Whereas the effectiveness of frequency detuning control to stabilize parametrically excited roll oscillations in ships has been reported, research on how to change the encounter frequency with respect to optimality has been conducted only recently [2]. Since changes of the ship’s speed and heading angle result in a shift of the encounter frequency, optimal control methodologies can be used to determine the optimal encounter frequency and the optimal setpoints for the ship’s speed and heading angle.

In this work, two optimal control methods for the stabilization of parametric roll resonance are proposed. Based on the results in Breu and Fossen [2], the extremum seeking (ES) methodology is adapted to iteratively determine the optimal setpoint of the encounter frequency. The mapping of the encounter frequency to the two controllable states, the ship’s forward speed and heading angle, is a constrained optimization problem which can be posed in a two-step sequential least-squares formulation. By defining an appropriate objective function and designing globally exponential stable speed and heading controllers, it is shown that the proposed ES controller is able to stabilize the roll oscillations caused by parametric excitation effectively.

As a second approach, the application of a model predictive controller (MPC) to ships experiencing parametric roll resonance is proposed. Constraints on inputs and states as well as an objective function aiming to violate one of the empirical conditions for the onset of parametric roll resonance are formulated in the MPC framework. It is illustrated in simulations that the proposed MPC approach is apt to be used for the stabilization of parametrically excited roll oscillations.

2 -DOF Ship Model

A simplified 3-DOF model of the ship describing the coupled motions in surge, roll, and yaw is used to represent the ship dynamics.

2.1 Reference Frames

Two reference frames are considered; a geographical reference frame fixed to the ocean surface, and a reference frame fixed to the vessel (body frame). Figure 11.1 depicts the two reference frames in the horizontal plane, that is, the z-axis is not shown in Fig. 11.1.

Fig. 11.1
figure 1

Horizontal plane, reference frames, and angle definitions

The reference frame fixed to the vessel is moving with the vessel and it has its origin at a location o b midships. The body axes x b, y b, and z b coincide with the principle axes of inertia, as defined in [5]. The vectors decomposed in the body frame are denoted in boldface with a superscript b.

We make the following assumption:

Assumption 11.1.

The geographical reference frame fixed to the ocean surface is inertial.

The ocean surface reference frame is defined by the North-East-Down coordinate system in [5], with the axes accordingly. Boldface and a superscript n denote the vectors expressed in the inertial frame.

2.2 Ship Dynamics

The generalized velocity vector expressed in the body frame is denoted by the vector ν = u, v, w, p, q, r  ⊤ . The generalized external forces τRB = X, Y, Z, K, M, N  ⊤ , expressed in the body frame, are the sum of the generalized environmental forces τenv and the generalized control forces τ, that is, \({\tau }_{\mathrm{RB}} ={ \tau }_{\mathrm{env}} + \tau \). The generalized position (position and attitude) vector is denoted as η = N, E, D, ϕ, θ, ψ ⊤ , where the position vector N, E, D  ⊤  is expressed in the inertial frame and the elements of the attitude vector ϕ, θ, ψ ⊤  are the Euler angles.

The relationship between the generalized position and the velocities satisfies [5]

$$\dot{\eta } = \mathbf{J}\left (\eta \right )\nu, $$
(11.1)

where Jη is the transformation matrix consisting of the linear and angular velocity transformation matrices as defined by Fossen [5].

The rigid-body kinetics are given by:

$${ \mathbf{M}}_{\mathrm{RB}}\dot{\nu } +{ \mathbf{C}}_{\mathrm{RB}}\left (\nu \right )\nu ={ \tau }_{\mathrm{RB}},$$
(11.2)

where M RB is the rigid-body inertia matrix, satisfying M RB = M RB  ⊤  > 0 and \(\dot{{\mathbf{M}}}_{\mathrm{RB}}\,=\,\mathbf{0}\). The rigid-body Coriolis and centripetal matrix \({\mathbf{C}}_{\mathrm{RB}}\left (\nu \right ) = -{\mathbf{C}}_{\mathrm{RB}}^{\top }\left (\nu \right )\) is due to the rotation of the body frame about the inertial frame. By the superscript 1, 4, 6, we indicate that only the motions in surge, roll, and yaw – the first, fourth, and sixth rows and columns of the 6-DOF model are considered.

Assumption 11.2.

The mass is distributed homogeneously and the ship has xz-plane symmetry.

Since the origin of the body frame is in the centerline of the ship and the body axes coincide with the principle axes of inertia, the rigid-body inertia matrix takes the following form:

$${ \mathbf{M}}_{\mathrm{RB}}^{\left \{1,4,6\right \}} = \left [\begin{array}{*{10}c} m& 0 & 0\\ 0 &{I}_{x } & 0 \\ 0 & 0 &{I}_{z}\\ \end{array} \right ],$$
(11.3)

where m denotes the ship mass, whereas I x and I z are the moments of inertia about the x b- and the z b-axis, respectively.

The rigid-body Coriolis and centripetal matrix can expressed by:

$${ \mathbf{C}}_{\mathrm{RB}}^{1,4,6}\left ({\nu }^{\left \{1,4,6\right \}}\right ) = \left [\begin{array}{*{10}c} 0 &m{z}_{g}r&-m{x}_{g}r \\ -m{z}_{g}r& 0 & 0 \\ m{x}_{g}r & 0 & 0\\ \end{array} \right ] = 0,$$
(11.4)

where \(\vec{{r}}_{g}^{b} ={ \left [{x}_{g},{y}_{g},{z}_{g}\right ]}^{\top }\) denotes the vector from the body origin to the center of gravity (CG) of the ship, expressed in the body frame. Next the following assumptions are made.

Assumption 11.3.

The CG and the origin of the body frame coincide, that is, \(\vec{{r}}_{g}^{b} = 0\).

Assumption 11.4.

For a maneuvering ship in a seaway, the surge and yaw motions are approximated by the zero-frequency potential coefficients while added mass and damping in roll is approximated at the natural roll frequency ωϕ. Furthermore, the fluid memory effects are neglected.

By Assumption 11.4, it follows that

$${ \mathbf{M}}_{\mathrm{A}}^{\left \{1,4,6\right \}} = \left [\begin{array}{*{10}c} {A}_{11}\left (0\right )& 0 & 0 \\ 0 &{A}_{44}\left ({\omega }_{\phi }\right )& 0 \\ 0 & 0 &{A}_{66}\left (0\right )\\ \end{array} \right ].$$
(11.5)

From (11.5) it follows that the hydrodynamic Coriolis and centripetal matrix is

$${ \mathbf{C}}_{\mathrm{A}}^{\left \{1,4,6\right \}}\left ({\nu }^{\left \{1,4,6\right \}}\right ) = 0.$$
(11.6)

The linear damping is the sum of the potential and viscous damping and becomes

$${ \mathbf{D}}_{l}^{\left \{1,4,6\right \}} ={ \mathbf{D}}_{\mathrm{ p}}^{\left \{1,4,6\right \}}+{\mathbf{D}}_{ V }^{\left \{1,4,6\right \}} := -\left [\begin{array}{*{10}c} {X}_{u}& 0 & 0 \\ 0 &{K}_{\mathrm{p}} & 0 \\ 0 & 0 &{N}_{r}\\ \end{array} \right ],$$
(11.7)

where the viscous damping matrix D V 1, 4, 6 is approximated by a diagonal matrix and the couplings between the roll and yaw motions are neglected. The nonlinear damping is

$${ \mathbf{D}}_{n}^{\left \{1,4,6\right \}}\left ({\nu }^{\left \{1,4,6\right \}}\right ) := -\left [\begin{array}{*{10}c} {X}_{\vert u\vert u}\vert u\vert & 0 & 0 \\ 0 &{K}_{\vert p\vert p}\vert p\vert & 0 \\ 0 & 0 &{N}_{\vert r\vert r}\vert r\vert \\ \end{array} \right ].$$
(11.8)

The quadratic damping coefficient in surge may be modeled as, see Fossen [5],

$${X}_{\vert u\vert u} = -\frac{1} {2}\rho S\left (1 + {k}_{\mathrm{f}}\right ) \frac{0.075} {(\log _{10}\mathrm{{R}_{n}} - 2 )^{2}},\quad\quad\quad\quad\quad\mathrm{{R}_{n}} = \frac{u{L}_{\mathrm{pp}}} {{\nu }_{\mathrm{k}}}$$

The water density is denoted by ρ, the wetted surface of the hull by S, and the form factor yielding a viscous correction by k f. The Reynolds number Rn depends on the length between perpendiculars L pp and the kinematic viscosity of the fluid νk.

Motivated by the results presented in Galeazzi et al. [9], Neves and Rodríguez [24], Shin et al. [28] and based on the model introduced in Chap. 9, the restoring forces for the surface vessel are approximated as:

$$\vec{{g}}^{\left \{1,4,6\right \}}\left ({\eta }^{\left \{1,4,6\right \}}\right ) \approx \left [\begin{array}{*{10}c} 0\\ \rho g\nabla {\overline{\mathrm{GM } } }_{ T}\phi - {K}_{{\phi }^{3}}{\phi }^{3} \\ 0 \end{array} \right ],$$
(11.9)

where g is the acceleration of gravity, ∇ the displaced water volume, and \({\overline{\mathrm{GM}}}_{\mathrm{T}}\) the transverse metacentric height given by:

$${ \overline{\mathrm{GM}}}_{\mathrm{T}} ={ \overline{\mathrm{GM}}}_{\mathrm{m}} +{ \overline{\mathrm{GM}}}_{\mathrm{a}}\cos \left ({\int \nolimits \nolimits }_{0}^{t}{\omega }_{\mathrm{ e}}\left (\tau \right )\mathrm{d}\tau \right ).$$
(11.10)

Here, \({\overline{\mathrm{GM}}}_{\mathrm{m}}\) is the mean metacentric height, \({\overline{\mathrm{GM}}}_{\mathrm{a}}\) the amplitude of the metacentric height change in waves, and ωe the encounter frequency. This model takes into account velocity changes since ωe is allowed to vary with time.

The ship dynamics can be written as:

$$\dot{{\eta }}^{\left \{1,4,6\right \}} ={ \mathbf{J}}^{\left \{1,4,6\right \}}\left ({\eta }^{\left \{1,4,6\right \}}\right ){\nu }^{\left \{1,4,6\right \}}$$
(11.11)
$$\mathbf{M}\dot{{\nu }}^{\left \{1,4,6\right \}} + \mathbf{C}\left ({\nu }^{\left \{1,4,6\right \}}\right ){\nu }^{\left \{1,4,6\right \}} + \mathbf{D}\left ({\nu }^{\left \{1,4,6\right \}}\right ){\nu }^{\left \{1,4,6\right \}} +\vec{ g}\left ({\eta }^{\left \{1,4,6\right \}}\right ) ={ \tau }^{\left \{1,4,6\right \}}$$
(11.12)

where

$$\begin{array}{rcl}{ \mathbf{J}}^{\left \{1,4,6\right \}}\left ({\eta }^{\left \{1,4,6\right \}}\right )& = \left [\begin{array}{*{10}c} \cos \left (\psi \right )&0& 0\\ 0 &1 & 0 \\ 0 &0&\cos \left (\phi \right )\\ \end{array} \right ] & \\ \mathbf{M}& ={ \mathbf{M}}_{\mathrm{RB}}^{\left \{1,4,6\right \}} +{ \mathbf{M}}_{A}^{\left \{1,4,6\right \}} & \\ & = \left [\begin{array}{*{10}c} m + {A}_{11}\left (0\right )& 0 & 0 \\ 0 &{I}_{x} + {A}_{44}\left ({\omega }_{\phi }\right )& 0 \\ 0 & 0 &{I}_{z} + {A}_{66}\left (0\right )\\ \end{array} \right ] & \\ \mathbf{C}\left ({\nu }^{\left \{1,4,6\right \}}\right )& ={ \mathbf{C}}_{\mathrm{ RB}}^{\left \{1,4,6\right \}}\left ({\nu }^{\left \{1,4,6\right \}}\right ) +{ \mathbf{C}}_{ A}^{\left \{1,4,6\right \}}\left ({\nu }^{\left \{1,4,6\right \}}\right ) = \mathbf{0} & \\ \mathbf{D}\left ({\nu }^{\left \{1,4,6\right \}}\right )& ={ \mathbf{D}}_{ l}^{\left \{1,4,6\right \}} +{ \mathbf{D}}_{ n}^{\left \{1,4,6\right \}}\left ({\nu }^{\left \{1,4,6\right \}}\right ) & \\ & = -\left [\begin{array}{*{10}c} {X}_{u} + {X}_{\vert u\vert u}\vert u\vert & 0 & 0 \\ 0 &{K}_{\mathrm{p}} + {K}_{\vert p\vert p}\vert p\vert & 0 \\ 0 & 0 &{N}_{r} + {N}_{\vert r\vert r}\vert r\vert \\ \end{array} \right ]& \\ \vec{g}\left ({\eta }^{\left \{1,4,6\right \}}\right )& =\vec{ {g}}^{\left \{1,4,6\right \}}\left ({\eta }^{\left \{1,4,6\right \}}\right ) & \\ & = \left [\begin{array}{*{10}c} 0 \\ \rho g\nabla \left [{\overline{\mathrm{GM}}}_{\mathrm{m}} +{ \overline{\mathrm{GM}}}_{\mathrm{a}}\cos \left ({\int \nolimits \nolimits }_{0}^{t}{\omega }_{\mathrm{e}}(\tau )\mathrm{d}\tau \right )\right ]\phi - {K}_{{\phi }^{3}}{\phi }^{3} \\ 0 \end{array} \right ]. & \\ \end{array}$$

For simplicity, it is assumed that the ship is controlled by a single rudder such that

$${\tau }^{\left \{6\right \}} = -{N}_{ \delta }\delta, $$
(11.13)

where δ denotes the rudder angle. Then, the yaw subsystem can be approximated by a first-order Nomoto model with time and gain constants T and K, respectively (Fossen [5]):

$$T\dot{r} + r = K\delta.$$
(11.14)

The Nomoto constants T and K can be related to the hydrodynamic ship coefficients such as the acceleration derivatives and the velocity derivatives. These coefficients may be approximated by considering the geometrical dimensions of the ship, that is, the length between the perpendiculars and the draft of the ship, as stated by Clarke et al. [4].

The control inputs to the 3-DOF ship model (11.11) and (11.12) are the control forces in roll τϕ and surge τu, as well as the rudder deflection δ. Measured outputs of the system are the roll angle ϕ, the roll rate \(\dot{\phi }\), the surge speed u, the heading angle ψ and the heading rate \(\dot{\psi }\).

2.3 Encounter Frequency Model

In this chapter, the following assumption is made:

Assumption 11.5.

The waves are planar and regular sinusoidal.

Consequently, the waves can be described by:

$$\zeta \left (\vec{r},t\right ) =\bar{ \zeta }\cos \left ({\omega }_{0}t -\vec{ {k}}^{\top }\vec{{r}}^{n} + {\phi }_{ \zeta }\right ),$$
(11.15)

where \(\zeta \left (\vec{r},t\right )\) is the sea surface elevation at a location \(\vec{{r}}^{n}\) at a time t. The vector \(\vec{{r}}^{n}\) is expressed in the inertial frame. The amplitude of the sinusoid is \(\bar{\zeta }\), the modal wave frequency ω0, and the initial phase shift ϕζ. The wave vector \(\vec{k}\) implicitly defines the wave number k:

$$\vec{k} = k\vec{e}$$

where \(\vec{e}\) is the propagation vector, satisfying \(\Vert \vec{e}\Vert = 1\). The wave length for a planar wave is

$$\lambda = \frac{2\pi } {\Vert \vec{k}\Vert } = \frac{2\pi } {k}$$
(11.16)

and the phase velocity is

$$c = \frac{{\omega }_{0}} {\Vert \vec{k}\Vert } = \frac{\lambda } {{T}_{\mathrm{w}}}$$
(11.17)

with T w the period. We assume that \(\bar{\zeta }\), ω0, and \(\vec{k}\) are constants for simplicity.

To an observer at a fixed location in the inertial reference frame, the frequency at which the waves encounter the ship equals the modal wave frequency. This is however not true when the observer is moving with the ship at a nonzero velocity. A moving ship causes a shift in the peak frequency of the wave spectrum which can be accounted for by introducing the encounter frequency.

From Fig. 11.1 it is evident that the encounter angle expressed in the inertial frame is given by:

$${\beta }_{\mathrm{w}}^{n} = {\beta }_{\mathrm{ w}} + \psi.$$

We assume without loss of generality that βw n is constant; that is, the waves are always coming from the same compass direction. The horizontal velocity of the ship \(\vec{v} ={ \nu }^{\left \{1,2\right \}}\) is expressed in the body frame and can readily be expressed in the inertial frame:

$$\vec{{v}}^{n} = \mathbf{R}\left (\psi \right )\vec{v},$$
(11.18)

where Rψ ∈ SO2 is the rotation matrix about ψ. It satisfies \(\mathbf{R}\left (\psi \right ){\mathbf{R}}^{\top }\left (\psi \right ) ={ \mathbf{R}}^{\top }\left (\psi \right )\mathbf{R}\left (\psi \right ) = \mathbf{I}\) and detRψ = 1, that is, it is orthogonal. The rotation matrix is given by:

$$\mathbf{R}\left (\psi \right ) = \left [\begin{array}{*{10}c} \cos \left (\psi \right )&-\sin \left (\psi \right )\\ \sin \left (\psi \right ) & \cos \left (\psi \right ) \end{array} \right ].$$

The peak frequency shift of the wave spectrum is due to the Doppler shift. The projection of the ship velocity \(\vec{{v}}^{n}\) on the wave vector \(\vec{k}\) is

$$\vec{{v}}_{\mathrm{p}} = {v}_{\mathrm{p}}\vec{e} =\Vert \vec{ {v}}^{n}\Vert \cos \left ({\beta }_{\mathrm{ w}}^{n} - \chi \right )\vec{e},$$
(11.19)

where the course angle χ is the sum of the heading angle ψ and the sideslip angle β. The encounter frequency, that is the frequency of oscillation of the waves as it appears to an observer on the ship, can then be calculated by considering the Doppler shift and by combining (11.18) and (11.19):

$$\begin{array}{rcl}{ \omega }_{\mathrm{e}}& = {\omega }_{0}\left (1 - {v}_{\mathrm{p}}/c\right ) & \\ & = {\omega }_{0}\left (1 - \frac{k} {{\omega }_{0}} \Vert \mathbf{R}\left (\psi \right )\vec{v}\Vert \cos \left ({\beta }_{\mathrm{w}}^{n} - \chi \right )\right ) & \\ & = {\omega }_{0} - k\sqrt{{u}^{2 } + {v}^{2}}\cos \left ({\beta }_{\mathrm{w}}^{n} - \psi - \beta \right ).&\end{array}$$
(11.20)

Under the assumption of deep water (h ≥ λ ∕ 2), where h is the water depth, the dispersion relationship holds:

$$k = \frac{{\omega }_{0}^{2}} {g}.$$
(11.21)

To decouple the surge model from the sway–yaw subsystem, it is assumed that the forward speed of the vessel is slowly time-varying only, which implies:

$$\Vert \vec{v}\Vert = \sqrt{{u}^{2 } + {v}^{2}} \approx u$$
(11.22)

and that there is no ocean current present. From Fig. 11.1 it is apparent that the sideslip angle β is

$$\beta =\arcsin \left (\frac{v} {\Vert \vec{v}\Vert }\right ) \approx \frac{v} {\Vert \vec{v}\Vert }$$
(11.23)

when β is small. Since the sway component of the ship velocity is neglected, the sideslip angle is disregarded as well.

Hence, the encounter frequency can be expressed by:

$${\omega }_{\mathrm{e}}\left (u,\psi, {\omega }_{0},{\beta }_{\mathrm{w}}^{n}\right ) = {\omega }_{ 0} -\frac{{\omega }_{0}^{2}} {g} u\cos \left ({\beta }_{\mathrm{w}}^{n} - \psi \right ).$$
(11.24)

Notice that the encounter frequency (11.24) couples the roll dynamics to the surge and yaw dynamics in (11.12), respectively.

3 Extremum Seeking Control

Extremum seeking control is a real-time optimization methodology, popular in both research and industry. It is characterized by the online tuning of the a priori unknown setpoint of a system to achieve an optimal output, with respect to an objective functional for example. ES is not model based – it is applicable also when the model is not perfectly known. In the ES methodology, a perturbation signal is added to the system to find an estimate of the gradient of the objective signal. In Ariyur and Krstić [1], a thorough introduction to ES control, including many applications in various research areas, is presented.

3.1 Extremum Seeking Applied to Ships in Parametric Roll Resonance

In this section, the ES method is adapted to the regulation of parametrically excited roll motions in ships as depicted in Fig. 11.2. The proposed, overall scheme consists of the ship – the surge and the yaw motions are coupled to the roll motion by the encounter frequency (11.24) – the control block and a dynamic feedback loop (ES loop).

Fig. 11.2
figure 2

Extremum seeking control applied to ships in parametric roll resonance

The output J of the objective function has an extremum, that is a minimum or a maximum, at ωe, d  ∗ . The ES loop adds a slow perturbation to the best current estimate of ωe, d in order to iteratively and online tune the parameter ωe, d to its optimal value ωe, d  ∗ .

By assuming the perturbation signal to be sufficiently slow compared to the open-loop dynamics, the system can be viewed as a static map and its dynamics can be neglected for the ES loop. The high-pass filter \(s/\left (s + {\omega }_{h}\right )\) serves to eliminate the offset of the cost signal J and the second perturbation creates a sinusoidal response of J. Adding a sinusoidal perturbation signal to the best estimate of ωe, d causes the two sinusoids to be in phase or out of phase depending on whether the best estimate is smaller or larger than its optimal value ωe, d  ∗ . Whereas the low-pass filter \({\omega }_{l}/\left (s + {\omega }_{l}\right )\) is used to extract the offset caused by multiplying the two sinusoids, the integrator in the ES loop gives the approximate gradient update law. ([1])

The proposed ES control schemes requires three time scales in the overall system. Since it is assumed that the map from the reference to the output of the objective function is a static map, the time constant of the plant needs to be the fastest. Furthermore, the perturbation signal must be sufficiently slow compared to the plant, or it would not be fed through the plant properly. The filters give an estimate of the gradient update law, implying that their time constants are required to be the slower than those of both the plant and the perturbation signal.

The encounter frequency (11.24) depends among others on the ship’s forward speed and heading angle which are controllable. The best estimate of the optimal encounter frequency is therefore mapped to the desired surge speed u d and the desired heading angle ψd by a (nonlinear) control allocation as depicted by the control block in Fig. 11.2. Speed and heading controllers are then used to compute the required control force in surge τu and the rudder deflection δ.

It is noteworthy that the optimal setpoint of the encounter frequency – and as a matter of fact, the ship’s speed and heading angle – is a priori not known. There lies the power of the ES control which iteratively tunes the encounter frequency, as the parameter of the feedback loop, to its optimal value which minimizes a defined objective functional. Hence, the vital role of the choice of the objective function is apparent for the performance of the ES control applied to parametric roll resonance.

Treating the encounter frequency as the sole parameter in the proposed ES control scheme seems advantageous compared to the formulation as a multiparameter ES method. In particular, control allocation allows to take into account restrictions on the ship’s speed and heading angle as well as on their variation rate.

3.2 Objective Function

The objective function is one of the key factors with respect to the performance of the proposed ES control method applied to ships in parametric roll resonance, as depicted in Fig. 11.2. Its choice determines the ability to regulate the roll motion as well as it accounts for mission dependent restrictions.

It is well known that certain ships are prone to experience parametric roll resonance when the encounter frequency is close to double the natural roll frequency of the ship, that is, see Nayfeh and Mook [23]:

$${\omega }_{\mathrm{e}} \approx 2{\omega }_{\phi }.$$
(11.25)

The objective function is constructed as the weighted superposition of two cost functionals, accounting for the frequency condition (11.25) and the deviation from the nominal cruise condition, respectively:

$$J = {w}_{1}{J}_{1} + {w}_{2}{J}_{2},$$
(11.26)

where w 1 and w 2 are the weights. The two cost functionals are expressed by:

$$\begin{array}{rcl}{ J}_{1}& = {c}_{1}\mathrm{{e}}^{-{c}_{2}{\left ({\omega }_{e}-2{\omega }_{\phi }\right )}^{2} }&\end{array}$$
(11.27)
$$\begin{array}{rcl}{ J}_{2}& = {c}_{3}{\left ({\omega }_{e} - {\omega }_{e,0}\right )}^{2},&\end{array}$$
(11.28)

where c i > 0, i ∈ 1, 2, 3 are constants. Equation (11.27) represents the penalty of the ship not violating the frequency condition (11.25). Equation (11.28), on the other hand, penalizes the deviation of the ship from its nominal cruise condition expressed by the nominal encounter frequency ωe, 0, that is, the encounter frequency (11.24) with the nominal setpoints for the ship’s surge speed u 0 and heading angle ψ0. By the choice of the constant parameters c i, i ∈ 1, 2, 3 in (11.27) and (11.28), the shape of the cost functionals can be adjusted.

It is apparent from the definition of the objective function (11.26) that in order to avoid parametric roll resonance the objective has to be minimized. Thus, the ES loop is designed such that its parameter ωe, d is iteratively tuned to the optimal value ωe, d  ∗ , resulting in a minimum of the objective function.

3.3 Control Allocation

The control allocation block depicted in Fig. 11.2 maps the parameter of the ES loop ωe, d – the desired encounter frequency – to the desired trajectory of the control variables, that is the ship’s desired surge speed u d and heading angle ψd. Revisiting (11.24), the desired encounter frequency is approximated by a first-order Taylor expansion, taking into account small variations of the ship’s forward speed and heading angle:

$$\begin{array}{rcl}{ \omega }_{e,d}\left (u + \Delta u,\psi + \Delta \psi, \cdot \right )& = {\omega }_{0} -\frac{{\omega }_{0}^{2}} {g} \cos \left ({\beta }_{\mathrm{w}}^{n} - \psi \right )u -\frac{{\omega }_{0}^{2}} {g} \cos \left ({\beta }_{\mathrm{w}}^{n} - \psi \right )\Delta u& \\ & \quad -\frac{{\omega }_{0}^{2}} {g} \sin \left ({\beta }_{\mathrm{w}}^{n} - \psi \right )u\Delta \psi. &\end{array}$$
(11.29)

Here, it is assumed that the desired encounter frequency can be achieved by a deviation of Δu and Δψ from the ship’s forward speed and heading angle, respectively. Equation (11.29) suggest that the virtual control input can be chosen as:

$$\begin{array}{rcl}{ \tau }_{v}& = - \frac{g} {{\omega }_{0}^{2}} \left [{\omega }_{e,d}\left (u + \Delta u,\psi + \Delta \psi, \cdot \right ) -\left ({\omega }_{0} -\frac{{\omega }_{0}^{2}} {g} \cos \left ({\beta }_{\mathrm{w}}^{n} - \psi \right )u\right )\right ]& \\ & = - \frac{g} {{\omega }_{0}^{2}} \left [{\omega }_{e,d}\left (u + \Delta u,\psi + \Delta \psi, \cdot \right ) - {\omega }_{\mathrm{e}}\left (u,\psi, \cdot \right )\right ] &\end{array}$$
(11.30)

The relation between the virtual control input (11.30) and the variations in surge speed and heading angle can be expressed by the constrained linear mapping

$$\begin{array}{rcl}{ \tau }_{v}& = \mathbf{B}\left (u,\psi, {\beta }_{\mathrm{w}}^{n}\right )\zeta, &\end{array}$$
(11.31)
$$\begin{array}{rcl}{ \zeta }_{\min }& \leq \zeta \leq { \zeta }_{\max }&\end{array}$$
(11.32)

where the control effectiveness matrix Bu, ψ, βw n and the variation vector ζ are given by:

$$\mathbf{B}\left (u,\psi, {\beta }_{\mathrm{w}}^{n}\right ) = \left [\begin{array}{*{10}c} \cos \left ({\beta }_{\mathrm{w}}^{n} - \psi \right ) \\ \sin \left ({\beta }_{\mathrm{w}}^{n} - \psi \right )u \end{array} \right ]\;,\quad \zeta = \left [\begin{array}{*{10}c} \Delta u\\ \Delta \psi \\ \end{array} \right ].$$
(11.33)

The constraints are expressed in (11.32) where ζmin and ζmax denote the lower and upper bounds on ζ, respectively. The desired ship’s surge speed and heading angle are then merely

$$\begin{array}{rcl}{ u}_{\mathrm{d}}& = u + \Delta u&\end{array}$$
(11.34)
$$\begin{array}{rcl}{ \psi }_{\mathrm{d}}& = \psi + \Delta \psi.&\end{array}$$
(11.35)

According to [11, 30], the control allocation problem (11.31) and (11.32) can be split up into a two-step sequential least-squares problem to find the variation of the ship’s forward speed and heading angle:

$$\begin{array}{rcl} S& {=\arg \min }_{{\zeta }_{\min }\leq \zeta \leq {\zeta }_{\max }}\Vert {\mathbf{W}}_{{\tau }_{v}}\left (\mathbf{B}\left (u,\psi, {\beta }_{\mathrm{w}}^{n}\right )\zeta - {\tau }_{v}\right )\Vert &\end{array}$$
(11.36)
$$\begin{array}{rcl}{ \zeta }_{\mathrm{opt}}& {=\arg \min }_{\zeta \in S}\Vert {\mathbf{W}}_{\zeta }\left (\zeta -{ \zeta }_{d}\right )\Vert, &\end{array}$$
(11.37)

where \({\mathbf{W}}_{{\tau }_{v}}\) and W ζ are weight matrices. First, the set of feasible solutions S that minimize Bu, ψ, βw nζ − τv is computed. Then, the best solution – the solution which minimizes W ζζ − ζd – is determined. ζd is the vector of desired variations in ship’s surge speed and heading angle and is presumably null.

The sequential least-squares problem (11.36) and (11.37) is solved in Matlab using the Quadratic Programming Control Allocation Toolbox (QCAT) (see Härkegård [12]).

3.4 Speed and Heading Controllers

The speed and heading controllers determine the appropriate control force in surge and the rudder deflection from the desired surge speed and heading angle, respectively, see Fig. 11.2.

By assumption, the inner control loop, consisting of the ship and the control block in Fig. 11.2, is designed such that its dynamics can be neglected for the ES loop. Thus, the inner control loop needs to be considerably faster than the overall closed-loop system, yielding that the controllers are required to be fast in comparison to the perturbation signal and the filters of the ES loop.

3.4.1 Speed Controller

The surge dynamics is given by the first row in (11.12). Assuming, that the mass and the damping terms are perfectly known, the speed controller can be designed by using feedback linearization:

$${\tau }_{u} = \left (m + {A}_{11}\left (0\right )\right ){v}_{u} + \left (-{X}_{u} - {X}_{\vert u\vert u}\vert u\vert \right )u.$$
(11.38)

By taking the virtual control input v u as an ordinary proportional controller, the closed-loop surge dynamics becomes

$$\dot{u} = {v}_{u} = -{k}_{u,p}\left (u - {u}_{d}\right )\;,\quad {k}_{u,p} > 0$$
(11.39)

where k u, p is the controller gain, chosen such that the error dynamics is globally exponentially stable (GES); see Fossen [5] or Khalil [20].

3.4.2 Heading Controller

The yaw dynamics is represented by the first-order Nomoto model (11.14). To design the heading controller, is is assumed that \(\dot{\psi } \approx r\) and that the rudder deflection δ is the control input:

$$\delta = -{k}_{\psi, p}\left (\psi - {\psi }_{d}\right ) - {k}_{\psi, d}\left (\dot{\psi } -\dot{ {\psi }}_{\mathrm{d}}\right )\;,\quad {k}_{\psi, p},\;{k}_{\psi, d} > 0.$$
(11.40)

The desired yaw rate \(\dot{{\psi }}_{\mathrm{d}}\) is generated by using a third-order reference model. The proportional and derivative gains, k ψ, p and \({k}_{{\psi }_{\mathrm{d}}}\), in (11.40) are determined such that the error dynamics of the closed-loop system

$$T\ddot{\psi } + \left (1 + K{k}_{\psi, d}\right )\dot{\psi } + K{k}_{\psi, p}\psi = K{k}_{\psi, p}{\psi }_{d} + K{k}_{\psi, d}\dot{{\psi }}_{\mathrm{d}}$$
(11.41)

is GES (Fossen [5] or Khalil [20]).

3.5 Stability Considerations

It can be proven that the ES parameter converges to a neighborhood of its optimal value and that the ES algorithm is exponentially stable (see Krstić and Wang [21] and Breu and Fossen [2]). Consider the single-input, single-output nonlinear system:

$$\begin{array}{rcl} \dot{\vec{x}}& =\vec{ f}\left (\vec{x},u\right ),&\end{array}$$
(11.42)
$$\begin{array}{rcl} y& = h\left (\vec{x}\right ),&\end{array}$$
(11.43)

where \(\vec{x} \in {\mathbb{R}}^{n}\) is the state vector, u ∈  the input, y ∈  the output; \(\vec{f} : {\mathbb{R}}^{n} \times \mathbb{R} \rightarrow {\mathbb{R}}^{n}\) and h :  n →  are smooth. The control law \(u = \alpha \left (\vec{x},\theta \right )\) is parametrized by θ, and assumed to be smooth. The closed-loop system corresponding to (11.42) and (11.43) then becomes

$$\dot{\vec{x}} =\vec{ f}\left (\vec{x},\alpha \left (\vec{x},\theta \right )\right )$$
(11.44)

and it has equilibria parametrized by θ. For the stability analysis, the following assumptions are made (see Krstić and Wang [21]).

Assumption 11.6.

There exists a smooth function \(\vec{l} : \mathbb{R} \rightarrow {\mathbb{R}}^{n}\) such that:

$$\vec{f}\left (\vec{x},\alpha \left (\vec{x},\theta \right )\right ) =\vec{ 0}\quad \mbox{ if and only if}\quad \vec{x} =\vec{ l}\left (\theta \right ).$$
(11.45)

Assumption 11.7.

The equilibrium \(\vec{x} =\vec{ l}\left (\theta \right )\) of (11.44) is locally exponentially stable (LES) with decay and overshoot constants uniform in θ for each θ ∈ .

Assumption 11.8.

There exists θ ∗  ∈  such that:

$$\begin{array}{rcl} \left (h \circ l\right )\left ({\theta }^{{_\ast}}\right )& = 0&\end{array}$$
(11.46a)
$$\begin{array}{rcl} \left (h \circ l\right )\left ({\theta }^{{_\ast}}\right )& > 0.&\end{array}$$
(11.46b)

Assumptions (11.6) and (11.7) guarantee the robustness of the control law with respect to θ, i.e., any equilibria produced by θ can be stabilized by the control law. Assumption 11.8 implies that the output equilibrium map has a minimum when θ = θ ∗ .

It was proven by averaging for a static system and by the singular perturbation method for a dynamic system that (11.44) converges to a unique, exponentially stable, periodic solution in a neighborhood of the origin [21]. The perturbation signal and the filters in the ES loop determine the size of this neighborhood.

Due to the three different time scales in the proposed ES control (see Sect. 11.3.1) the plant – the surge and yaw subsystems – can be viewed as a static map. The ES parameter ωe, determined from the ship’s forward speed and heading angle, parametrizes the equilibria of the plant. The speed and heading controllers ensure local exponential stability of the equilibria which may be produced by the ES parameter ωe, see Sect. 11.3.4, and the objective function defined in Sect. 11.3.2 fulfills locally Assumption 11.8. Thus, the parameter ωe converges to a neighborhood of its optimal value ωe  ∗ .

4 Model Predictive Control

Model predictive control (MPC) is a rather recent control methodology which is characterized by the usage of an explicit plant model to predict the output of the process. This prediction is consequently used to find an optimal control signal which minimizes a specified objective function. The MPC formulation allows to address the constraints of the states and the input explicitly. MPC has been successfully applied to a wide variety of control problems and the increasing availability of computing power has only added to its popularity in both academia and industry, see, for example, Camacho and Bordons [3]. In ship control, MPC formulation has been applied among others to autopilot control design, roll stabilization, fault-tolerant control of a propulsion system, tracking, and control of ship fin stabilizers, see Kerrigan and Maciejowski [19], Naeem et al. [22], Perez [25], and Perez and Goodwin [26].

4.1 Model Predictive Control Applied to Ships in Parametric Roll Resonance

The basic structure of a MPC setup is depicted in Fig. 11.3. The MPC algorithm consists generally of the following elements, see Camacho and Bordons [3]:

  • Prediction model

  • Objective function

  • Optimizer to obtain the control law

Fig. 11.3
figure 3

Basic structure of a model predictive controller [3]

The strategy of MPCs can be summarized in a three step loop which is performed at each time instant, see, for example, Camacho and Bordons [3]:

  1. 1.

    The future process outputs are predicted for a prediction horizon N, depending on the past inputs and outputs and on the future control signals.

  2. 2.

    An optimization problem is solved to determine the set of future control signals, minimizing the objective function.

  3. 3.

    The first control signal is sent to the process and the steps 13 are repeated at the next time instant.

In the context of the control of parametric roll resonance of ships, an approach featuring the MPC formulation to control the ship’s forward speed and heading angle simultaneously in order to damp the roll motion is used. Furthermore, it is assumed that no control input affects the roll dynamics, that is, τϕ = 0. The ship’s surge speed and heading angle can however be changed. This results in a time-varying encounter frequency and the transients due to heading and speed changes must be taken into account. By changing the speed and heading actively it is possible to violate a condition for parametric roll resonance. To that matter, the MPC formulation is adapted to find the optimal surge speed and heading angle to achieve a regulation of the roll motion while taking into account constraints on the inputs as well as on the states.

4.2 State-Space Model

Consider the 3-DOF ship model (11.12) in Sect. 11.2.2. The encounter frequency (11.24) couples the roll dynamics to the surge and yaw dynamics, respectively, as derived in Sect. 11.2.3. For convenience the system dynamics is expressed as

$$\begin{array}{rcl} \dot{\vec{x}}& =\vec{ f}\left (\vec{x},\tau \right )&\end{array}$$
(11.47)
$$\begin{array}{rcl} \vec{y}& =\vec{ g}\left (\vec{x}\right ),&\end{array}$$
(11.48)

where \(\vec{x} ={ \left [{\eta }^{\left \{1,4,6\right \}},{\nu }^{\left \{1,4,6\right \}}\right ]}^{\top }\) and

$$\begin{array}{rcl} \vec{f}\left (\vec{x},\tau \right )& = \left [\begin{array}{*{10}c} { \mathbf{J}}^{\left \{1,4,6\right \}}\left ({\eta }^{\left \{1,4,6\right \}}\right ){\nu }^{\left \{1,4,6\right \}} \\ {\mathbf{M}}^{-1}\left [\tau -\mathbf{C}\left ({\nu }^{\left \{1,4,6\right \}}\right ){\nu }^{\left \{1,4,6\right \}} -\mathbf{D}\left ({\nu }^{\left \{1,4,6\right \}}\right ){\nu }^{\left \{1,4,6\right \}} -\vec{ g}\left ({\eta }^{\left \{1,4,6\right \}}\right )\right ] \end{array} \right ]& \\ \vec{g}\left (\vec{x}\right )& =\vec{ x} & \\ \end{array}$$

4.3 Objective Function

The MPC objective function is constructed similar to the one in Sect. 11.3.2, that is, as the weighted sum of cost functionals. Following the reasoning in Sect. 11.3.2, the following objective function is proposed:

$$J = {w}_{1}{J}_{1} + {w}_{2}{J}_{2},$$
(11.49)

where the weights are w i, i ∈ 1, 2 and

$$\begin{array}{rcl}{ J}_{1}& = {c}_{1}\mathrm{{e}}^{-{c}_{2}{\left ({\omega }_{\mathrm{e}}-2{\omega }_{\phi }\right )}^{2} }&\end{array}$$
(11.50)
$$\begin{array}{rcl}{ J}_{2}& = {c}_{3}{\left ({\omega }_{\mathrm{e}} - {\omega }_{e,0}\right )}^{2},&\end{array}$$
(11.51)

where c i > 0, i ∈ 1, 2, 3 are constants. As in Sect. 11.3.2, (11.50) represents the penalty of the ship not violating the frequency condition (11.25), and (11.51) penalizes the deviation of the ship from its nominal cruise condition given by ωe, 0 – the encounter frequency (11.24) with the nominal setpoints for the ship’s surge speed u 0 and heading angle ψ0.

4.4 Obtaining the Control Law

To obtain the control signal, the objective function (11.49) has to be minimized at each time instant. The minimization of (11.49) is subject to equality constraints which, for a state space model as presented in Sect. 11.4.2 and 11.2.2, respectively, are the model constraints given by (see Camacho and Bordons [3]):

$$\begin{array}{rcl} \vec{f}\left (\vec{x},\tau \right )& =\vec{ 0}&\end{array}$$
(11.52)
$$\begin{array}{rcl} \vec{y} -\vec{ g}\left (\vec{x}\right )& =\vec{ 0}.&\end{array}$$
(11.53)

Furthermore, the minimization of (11.49) is as well subject to inequality constraints expressed as

$$\begin{array}{rcl} \underline{\vec{y}}& \leq & \vec{y}\left (t + j\right ) \leq \overline{\vec{y}},\qquad \forall j = 1,N\end{array}$$
(11.54)
$$\begin{array}{rcl} \underline{\tau }& \leq & \tau \left (t + j\right ) \leq \overline{\tau },\qquad \forall j = 1,M - 1\end{array}$$
(11.55)
$$\begin{array}{rcl} \Delta \underline{\tau }& \leq & \Delta \tau \left (t + j\right ) \leq \Delta \overline{\tau },\quad \forall j = 1,M - 1,\end{array}$$
(11.56)

where N and M are the prediction horizon and the control horizon, respectively. The solution of the problem to minimize the objective function (11.49) with the model constraints (11.52) and (11.53) and the inequality constraints (11.54)–(11.56) is not a trivial one. It generally involves solving a nonconvex, nonlinear problem.

The nonlinear MPC (NMPC) problem in the form of a general nonlinear programming problem with \(\vec{w} ={ \left [{\tau }^{\top },\vec{{x}}^{\top },\vec{{y}}^{\top }\right ]}^{\top }\) is, see Camacho and Bordons [3],

$$\begin{array}{rcl}{ \min }_{\vec{w}}\ \ J\left (\vec{w}\right ) \\ \text{ subject to:}\ \ \vec{c}\left (\vec{w}\right ) =\vec{ 0},\ \vec{h}\left (\vec{w}\right ) \leq 0.\end{array}$$
(11.57)

Here, c corresponds to the equality constraints (11.52) and (11.53) and h to the inequality constraints >(11.54)–(11.56).

The optimization (11.57) is performed by using the TOMLAB Optimization Environment (TOMLAB/NPSOL),Footnote 1 see Holmström et al. [16].

Table 11.1 Model parameters, adopted from [13]

5 Simulation Results

The ship is simulated by applying both the ES control methodology and the nonlinear MPC to the system. The initial values for the simulations are chosen such that the ship is experiencing parametrically excited rolling. The nominal cruise condition is chosen as \({u}_{0} = 7.5\,\mathrm{m}/\mathrm{s}\) and ψ0 = 0 ∘ . We assume that the ship is initially in head sea condition, that is, βw n = π. Table 11.1 lists the model parameters. In the simulation results, the controlled variables are denoted by the subscript c.

5.1 Extremum Seeking

The ES control is initially deactivated but is turned on the time instant when the roll amplitude exceeds ϕ = 3 ∘  for the first time.

The roll angle and frequency ratio with and without the ES control is shown in Fig. 11.4. Note that, in the uncontrolled scenario, the ship is experiencing parametric roll resonance with high roll amplitudes; see Fig. 11.4a. It is furthermore apparent that, when the ES control is activated, the ship is driven out of the frequency ratio relevant for parametric rolling and consequently the roll motion is reduced significantly.

Fig. 11.4
figure 4

Extremum seeking – Roll angle, frequency ratio

The frequency ratios ωe, d ∕ ωϕ and ωe, c ∕ ωϕ in Fig. 11.4b denote the desired frequency ratio as output of the ES feedback loop and the actual, controlled, frequency ratio, thus indicating the ability of the controllers to track the desired encounter frequency.

Figure 11.5 shows the ship’s surge speed and the control force in surge, whereas Fig. 11.6 depicts the ship’s heading angle and the rudder deflection for both the uncontrolled and the controlled scenario.

Fig. 11.5
figure 5

Extremum seeking – Surge speed, control force τu

Fig. 11.6
figure 6

Extremum seeking – Heading angle, rudder deflection

Both the ship’s surge speed and heading angle follow the reference trajectory, determined by the control allocation block. Due to the perturbation signal in the ES control, the ship’s surge speed and heading angle show an expected oscillatory behavior.

The cost as defined in the objective function is shown in Fig. 11.7 and Fig. 11.8 shows a comparison of the roll angle, when the ES control is activated at different roll angles, that is, at 3 ∘ , 5 ∘ , and 10 ∘ , respectively.

Fig. 11.7
figure 7

Extremum seeking – Cost

Fig. 11.8
figure 8

Extremum seeking – Roll angle: Comparison when the controller is activated at 3 ∘ , 5 ∘ , and 10 ∘ , respectively

5.2 Model Predictive Control

The MPC control, initially turned off, is activated when the roll amplitude exceeds ϕ = 3 ∘  for the first time. In Fig. 11.9, the roll angle and the frequency ratio is shown for the controlled and the uncontrolled scenario. Figure 11.9a depicts that the ship is experiencing large roll angles due to parametric roll resonance in the uncontrolled scenario. However, the reduction of the frequency ratio reduces the roll angle quickly when the MPC is active.

Fig. 11.9
figure 9

MPC – Roll angle, frequency ratio

The ship’s forward speed and the control force in surge are shown in Fig. 11.10 and the ship’s heading angle and the rudder deflection are depicted in Fig. 11.11. Again, the controlled and the uncontrolled scenario is shown.

Fig. 11.10
figure 10

MPC – Surge speed, control force τu

Fig. 11.11
figure 11

MPC – Heading angle, rudder deflection

Figure 11.12 shows the cost defined by the proposed objective function. Finally, in Fig. 11.13, the roll angle is shown, when the MPC is activated at different time instants, corresponding to roll angles of 3 ∘ , 5 ∘ , and 10 ∘ , respectively.

Fig. 11.12
figure 12

MPC – Cost

Fig. 11.13
figure 13

MPC – Roll angle: Comparison when the controller is activated at 3 ∘ , 5 ∘ , and 10 ∘ , respectively

6 Conclusions

In this chapter, two active control approaches for the stabilization of parametric oscillations in ships by frequency detuning have been proposed. This is done by violating one of the conditions for the onset of parametric roll resonance by varying the ship’s forward speed and heading angle simultaneously and thus controlling the frequency of encounter. The proposed control strategies feature optimality considerations with respect to the optimal speed and heading changes to stabilize parametrically excited roll motion.

The methodology of ES control has been applied to control ships exhibiting parametric roll resonance. The encounter frequency is tuned in real time to its optimal setpoint by defining an appropriate objective function. The encounter frequency commands are mapped to the ship’s forward speed and heading angle by formulating the control allocation problem in the sequential least-squares framework, taking into account constraints on the actuators. The speed and heading controllers guarantee exponentially stable origins of the tracking error dynamics.

Furthermore, MPC is considered as a second approach for the stabilization of parametric roll resonance. By explicitly formulating both constraints on the input and the states as well as an objective function which accounts for the parametric roll resonance condition, a controller has been presented that effectively drives the ship out of parametric resonance and reduces the roll motion significantly.

Both the ES and the model predictive controllers have been successfully verified in computer simulations and it has been shown that the combined variation of the ship’s forward speed and heading angle in both control approaches is efficient to stabilize the roll motion of a ship experiencing parametric roll resonance.