**2. System Modeling**

Consider a STS consisting of a tugboat, a towed ship, and a towline, as depicted in Figure 1. The tugboat is equipped with two motors, and the towed ship is connected passively with the tugboat. *O*<sup>0</sup> and *O*<sup>1</sup> represent the midpoints of the tugboat and the towed ship, respectively. Both the tugboat and the towed ship are connected with a rigid towline. That is, one end of the towline is flexibly connected to the towing hook of the tugboat at *Op*0, and the other end is flexibly hinged to the joint of the towed ship at *Op*1. The length of the towline *Op*0*Op*<sup>1</sup> is defined as *a*. Then, definitions of symbols used in the text are presented in Table 1.


**Table 1.** Parameters and variables of the ship towing system.

The goal of the paper is to design two robust torque controllers for the tugboat, so that both the tugboat and the towed ship are able to follow the desired trajectory curve precisely. As such, we introduce a passive steering angle for the towed ship, so that it can follow the trajectory of the tugboat. The steering angle *Ψ* is defined as the angle between vector −−−−→ *Op*0*Op*<sup>1</sup> and <sup>−</sup>*<sup>v</sup>* <sup>→</sup>*p*1. For convenience, we further assume *<sup>Ψ</sup>* <sup>=</sup> *<sup>μ</sup>*(*ϕ*<sup>0</sup> <sup>−</sup> *<sup>ϕ</sup>*1), where *<sup>μ</sup>* is an appropriate steering coefficient which makes the towed ship follow well the trajectory of the tugboat. In modeling of the STS, some assumptions are considered, as follows:


**Figure 1.** Model of a ship towing system.

## *2.1. Kinematics Modeling*

The generalized coordinate of the STS is defined as **p** = (*x*0, *y*0, *ϕ*0, *θ*)T, and the system state is described by (**p**, **p**˙). Then, the motion states of other degrees of freedom can be deduced by its constraint equations.

For the STS, the motion of the tugboat and the towed ship is subject to the following nonholonomic constraints, respectively,

$$\begin{cases} -\dot{\mathfrak{x}}\_0 \text{sin}\varrho\_0 + \dot{\mathfrak{y}}\_0 \text{cos}\varrho\_0 = 0, \\ \upsilon\_0 = \dot{\mathfrak{x}}\_0 \text{cos}\varrho\_0 + \dot{\mathfrak{y}}\_0 \text{sin}\varrho\_0. \end{cases} \tag{1}$$

and

$$\begin{cases} -\dot{\mathfrak{x}}\_1 \sin \mathfrak{q}\_1 + \dot{\mathfrak{y}}\_1 \cos \mathfrak{q}\_1 = 0, \\ \upsilon\_1 = \dot{\mathfrak{x}}\_1 \cos \mathfrak{q}\_1 + \dot{\mathfrak{y}}\_1 \sin \mathfrak{q}\_1. \end{cases} \tag{2}$$

As shown in Figure 1, the speed relation between the tugboat and the towed ship is expressed as

$$\begin{cases} \upsilon\_{p1}\cos\Psi = \cos(\theta - \Psi)\upsilon\_{p0\_\prime} \\ \upsilon\_{p0}\sin(\theta - \Psi) + \upsilon\_{p1}\sin\Psi = a(\Psi - \theta + \phi\_0). \end{cases} \tag{3}$$

Here, the first equation denotes that the velocity of joints *Op*<sup>0</sup> and *Op*<sup>1</sup> along the towline direction are equal. The second equation desribes the speed relation between the joints *Op*<sup>0</sup> and *Op*<sup>1</sup> in the vertical direction. Such speed relation causes coupling motion between the adjacent structures.

Substituting Ψ = *μθ* and the first equation of (3) into the second equation of (3), we obtain

$$\theta = -\frac{\sin \theta}{a(1-\mu)\cos \Psi} \upsilon\_{p0} + \frac{1}{1-\mu} \dot{\varphi}\_0. \tag{4}$$

Define <sup>Ω</sup> <sup>=</sup> sin*<sup>θ</sup>* cos*<sup>Ψ</sup>* , and then (4) can be rewritten as

$$\theta = -\frac{\Omega}{a(1-\mu)}v\_{\mu 0} + \frac{1}{1-\mu}\phi\_0. \tag{5}$$

Furthermore, according to the coordinates of point *O*<sup>0</sup> and *O*1, we can get the positional coordinates of *Op*0(*x*<sup>0</sup> <sup>−</sup> *<sup>L</sup>* cos*ϕ*0, *<sup>y</sup>*<sup>0</sup> <sup>−</sup> *<sup>L</sup>* sin*ϕ*0) and *Op*1(*x*<sup>1</sup> <sup>+</sup> *<sup>L</sup>* cos*ϕ*1, *<sup>y</sup>*<sup>1</sup> <sup>+</sup> *<sup>L</sup>* sin*ϕ*1), where

*L* is the length of the tugboat, as shown in Figure 1. In this way, the speed relations of points *Op*<sup>0</sup> and *O*0, *Op*<sup>1</sup> and *O*<sup>1</sup> are expressed as

$$\begin{cases} \upsilon\_{p0}^2 = \dot{\mathfrak{x}}\_0^2 + \dot{\mathfrak{y}}\_0^2 + \frac{l^2}{4} \dot{\mathfrak{q}}\_0^2 + L\dot{\mathfrak{q}}\_0(\dot{\mathfrak{x}}\_0 \sin \mathfrak{q}\_0 - \dot{\mathfrak{y}}\_0 \cos \mathfrak{q}\_0),\\ \upsilon\_{p1}^2 = \dot{\mathfrak{x}}\_1^2 + \dot{\mathfrak{y}}\_1^2 + \frac{l^2}{4} \dot{\mathfrak{q}}\_1^2 + L\dot{\mathfrak{q}}\_1(\dot{\mathfrak{y}}\_1 \cos \mathfrak{q}\_1 - \dot{\mathfrak{x}}\_1 \sin \mathfrak{q}\_1). \end{cases} \tag{6}$$

Squaring both sides of the two equations of (1) and adding the two square equations, we obtain *v*<sup>2</sup> <sup>0</sup> = *x*˙ 2 <sup>0</sup> + *y*˙ 2 <sup>0</sup>. Similarly, from (2), we have *<sup>v</sup>*<sup>2</sup> <sup>1</sup> = *x*˙ 2 <sup>1</sup> + *y*˙ 2 <sup>1</sup>. In this way, (6) becomes

$$\begin{cases} \upsilon\_{p0}^2 = \upsilon\_0^2 + \frac{L^2}{4} \dot{\varrho}\_{0'}^2\\ \upsilon\_{p1}^2 = \upsilon\_1^2 + \frac{L^2}{4} \dot{\varrho}\_1^2 = \upsilon\_1^2 + \frac{L^2}{4} (\dot{\varrho}\_0 - \dot{\theta})^2. \end{cases} \tag{7}$$

Substituting *vp*<sup>0</sup> and *vp*<sup>1</sup> of (7) into(3), one has

$$v\_1 = \sqrt{\frac{\cos^2(\theta - \Psi)}{\cos^2 \Psi} (v\_0^2 + \frac{L^2}{4}\phi\_0^2) - \frac{L^2}{4}(\phi\_0 - \theta)^2}. \tag{8}$$

Then, substituting *vp*<sup>0</sup> of (7) into (5) gives

$$\dot{\theta} = -\frac{\Omega}{a(1-\mu)}\sqrt{v\_0^2 + \frac{L^2}{4}\dot{\phi}\_0^2} + \frac{1}{(1-\mu)}\phi\_0. \tag{9}$$

With these preparations, all constraint equations of the STS are formulated by

$$\begin{cases} -\ddot{x}\_0 \sin q\_0 + \dot{y}\_0 \cos q\_0 = 0, \\ v\_0 = \dot{x}\_0 \cos q\_0 + \dot{y}\_0 \sin q\_0, \\ \dot{\varphi}\_0 = \omega\_{0\prime} \\ \dot{\theta} = -\frac{\Omega}{a(1-\mu)} \sqrt{v\_0^2 + \frac{L^2}{4} \dot{q}\_0^2} + \frac{1}{(1-\mu)} \dot{\varphi}\_0. \end{cases} \tag{10}$$

By using the motion laws derived from (10), the target trajectory curve can be transformed into a speed target of the tugboat [21], so that the dynamics equation of the STS can match the tracking target well. In fact, the towline is flexibly connected with the two ships. The angle between the rigid towline and the forward speed direction of the towed ship can be adjusted by a gear steering equipment. Then, according to the relationship of motion speed between the towed ship and the tugboat, the towed ship can move along the trajectory of the tugboat by choosing an appropriate steering angle coefficient *μ*.
