Keywords

1 Introduction

In recent years, automatic systems have become essential in many different applications and areas. In the maritime field, there is a demand for an even greater level of complexity and autonomy in onboard systems with the increase of the computational power needed, which leads to moving towards an ever higher level of automation. The process towards full automation goes through several steps and over the years several classifications with different levels of automation have been proposed, from the first one proposed by Sheridan in 1978 [24] to the one proposed in [22] that also evaluates the transport environment. Also the International Maritime Organization (IMO) during the \(99^{th}\), [14], and \(100^{th}\), [15], sessions of the Marine Safety Committee (MSC) proposed four level of autonomy. Since the 1990s s several Autonomous Surface Vehicles (ASV) with different levels of autonomy have been developed and an exhaustive analysis of the existing model is shown in [23]. During the years lots of progress has been made and lots of names have been used for identifying the smart/autonomous ships, hence to clarify at the \(98^{th}\) MSC session, [16], the IMO defined the concept of Maritime Autonomous Surface Ships (MASS).

Increasing the automation level all ship systems need to be re-thinked and modified, but a focus needs to be paid to the autonomous handling of the units, hence it is the motion control system that becomes paramount. It is usually designed as three independent modules: Guidance, Navigation, and Control (GNC) systems [9]. Such systems have been developed together with the diffusion of the inertial system [8] and interact with each other. A review of the GNC systems is shown in [17] and a review of the state of the art of the MASS is given in [28].

In fact, this paper is focusing on testing a guidance law for a target tracking scenario for surface navigation thanks to a simulation architecture, hence it lies within the guidance system. The Guidance system has the role of computing the path processing the reference data of the ship together with the data collected from the Navigation system and other information. Usually, this system can be split into several sub-systems. The first one is a high-level path planner that defines a route based on geometrical parameters, the weather, or user-defined mission, [26]. The second one is a collision-avoidance system, that avoids the risk of collision, [13] and [27]. At this stage, the Guidance system demands the use of different motion control scenarios, the last sub-system. Clearly, there are lots of motion control scenarios, like the path following, without the temporal constrain [10] and with [2], the dynamic positioning, [1], the follow-the-leader, [21], the target tracking, [5, 11], etc. The last one is the one investigated in this paper and regards following a target of which only the instantaneous position and velocity are known; hence the motion evolution is unknown. In [4, 9] three different guidance logics to satisfy the target tracking scenario have been proposed: the Line-Of-Sight, the Pure Pursuit, and the Constant Bearing guidance. This paper focuses on the last one, in particular, it has adopted a properly modified Constant bearing guidance law (proposed in [11]) that tends to converge to a path parallel to the target one. Such laws have been derived from the missile guidance studies, [25].

The logic has been implemented into a properly developed simulation platform that reproduces the dynamic behaviour of the model-scale tugboat named “Tito Neri”, fully validated and presented in [12]. Simulation allows for estimating the performance of a system under any operating condition. The behaviour of the system in the time-domain is described by using mathematical and logical models on a digital computer, [6]. Traditionally, the simulation is used as the digital copy of the system for the design and testing of a new improvement or control logic, in this way a simulator is a stand-alone object. Subsequently, the introduction inside the simulation loop of a real part has been introduced for testing the functionality of the specific system or for the development of a mathematical model, these are the hardware in the loop and software in the loop techniques. A new trend is the introduction of the human inside the loop [20]. In this way, the human interacts with the simulator, and he can make some errors, hence it is possible to test the reaction of the system to the wrong input. An additional benefit of this technique is the use of the simulator for training purposes. This paper proposes manually controlling the target, which tries to leave behind the automatically controlled interceptor. In this way, it is possible to test the guidance logic and it is possible to have more realistic results.

The paper is organised as follows. The simulation platform and the guidance laws adopted are presented in Sect. 2. The Human-In-the-Loop architecture is shown in Sect. 3. The simulation results for validating the guidance law are shown in Sect. 4 and the conclusion are drawn in Section 5.

Fig. 1.
figure 1

Tugboat Layout

2 Simulation Platform

Simulation is a technique that allows the prediction of the vehicle response in both design and off-design conditions. This means that system behaviour can be simulated for all conditions and sets of input parameters without full-scale tests. The ship simulator implements a mathematical model, i.e. a set of differential or algebraic equations, which represents the various elements of the physical systems. It is like a digital copy of the real model. The simulation model used in the present work represents the dynamics of a tugboat model called “Tito Neri” with the overall length (\(L_{OA}\)) equal to \(0.97\,m\) in three degrees of freedom. Indeed, only the motion in the horizontal plane has been taken into account, or rather, the motions of surge, sway, and yaw.

The tugboat propulsion model implemented in this simulator is composed of two DC motors that drive two azimuth ducted propellers, one for each shaft-line. In addition, a bow-thruster, driven by a separate DC motor, is present and it is necessary to improve the manoeuvrability at slow speed. Within the simulation platform, the bow-thruster model is not implemented. Hence, the model is an underactuated one in the horizontal plane with two independent actuators.

The layout of the whole simulation platform is shown in Fig. 1. Here, inside the dotted line, there is the ship model, essential for the development of the presented guidance logic and explained below.

2.1 Ship Model

The dynamic of the ship can be solved with the equation of motion 1, which is derived from the Newton-Euler formulation.

$$\begin{aligned} (M_{RB}+M_A) \dot{\nu } + C(\nu ) \nu = \tau _{stbd} + \tau _{port} + \tau _{hull} \end{aligned}$$
(1)

where \(M_{RB}\) and \(M_A\) are the inertial and added mass matrices, respectively; \(C(\nu )\) is the Coriolis matrix; \(\nu \) is the velocity \(\nu = [u,v,r]\); \(\tau \) represent the external forces and moment, the general \(\tau \) is defined as \(\tau =[X,Y,N]^T\) and the subscripts stbd, port, and hull refer to the starboard azimuthal thruster, to the port azimuthal thruster, and to the hull force, respectively. Hence, the Eq. (1) gives as output the kinematics of the model in terms of the velocity \(\nu \) and, after an appropriate integration, of the position \(\eta =[x,y,\psi ]\). Hence, it is necessary to determine the hull and the propeller forces.

The hull forces and moment have been evaluated with the Oltmann & Sharma model [19]. As presented in [18], this method for evaluating the hull forces is comparable to the use of Computational Fluid Dynamics (CFD) techniques for the control design. In this model the total hydrodynamic force is composed of three main contributions: the Ideal Fluid Force, which is assessed by using the potential theory, i.e. neglecting the effects of viscosity; the Lift Force, which is assessed by comparing the hull with a low aspect ratio wing; and the Cross Flow Drag, it represents the resistance due to the viscous forces generated by a moving body in a real fluid. Besides, the hull resistance is considered as a separate term. The formulation of the hull forces and moments is presented in Eq. (2).

$$\begin{aligned} \tau _{hull} = {\left\{ \begin{array}{ll} X_{hull} =&{} X_I + X_{HL} - R_T \\ Y_{hull} =&{} Y_I + Y_{HL} + Y_{HC} \\ N_{hull} =&{} N_I + N_{HL} + N_{HC} \end{array}\right. } \end{aligned}$$
(2)

where \(R_T\) is the hull resistance and the subscript I, HL, and HC refer to the Ideal Fluid Force, to the Lift Force, and to the Cross Flow Drag, respectively.

The propeller forces and moment, \(\tau _{port,stbd}\), have been evaluated inside the “Main propulsion system” blocks in Fig. 1. The model is equipped with two symmetric propulsion lines that can be decomposed into an electric motor, shaft line, and propeller. To find the forces and moment due to the propeller, it is necessary to find the revolution regime of the shaft line with the shaft line equation in (3).

$$\begin{aligned} I_T \dot{n} = Q_{eng}-Q_{fric}-Q_o \end{aligned}$$
(3)

where \(Q_{eng}\), \(Q_{fric}\), \(Q_o\) are the engine, friction and propeller torque, respectively, \(I_T\) is the total moment of inertia, and n is the revolution regime of the shaft line.

The behaviour of the engine is described using the differential equation in (4). With this, it is possible to find the current and, as a consequence, the engine torque.

$$\begin{aligned} \frac{di}{dt} = \frac{R}{L} i - \frac{1}{L} K_e \omega +\frac{1}{L} V_a \end{aligned}$$
(4)

where R is the resistance, L is the inductance, i is the current, \(K_e\) is a constant of the electric engine, \(\omega \) is the engine speed, and \(V_a\) is the applied voltage.

With the revolution regime n it is possible to find the value of the advance angle and, as a consequence, the working point of the propeller inside the open water diagram that gives as output the propeller torque \(Q_o\) and thrust T with the formulations in (5).

$$\begin{aligned} C_T = \frac{T}{\frac{1}{2} \rho \pi \frac{D^2}{4} V_r^2} \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, C_Q = \frac{Q}{\frac{1}{2} \rho \pi \frac{D^3}{4} V_r^2} \end{aligned}$$
(5)

where \(\rho \) is the water density, D is the propeller diameter, and \(V_r\) is the incoming velocity.

The azimuth angle \(\delta \) is modelled with a limit on the first derivative of the signal to take into account that the azimuthal thruster can rotate with a maximum given speed. At this point, with the knowledge of the azimuth angle \(\delta \), it is possible to find the propeller forces and moment as shown in (6).

$$\begin{aligned} \tau _{port,stbd} = {\left\{ \begin{array}{ll} X_p =&{} T \cos {\delta }\\ Y_p =&{} T \sin {\delta }\\ N_p =&{} x_p Y_p - y_p X_p \end{array}\right. } \end{aligned}$$
(6)

At this stage, all the terms inside Eq. (1) have been defined and it is possible to solve it and to give as output the kinematics of the model. It is the output of the Ship model put inside the dotted line in Fig. 1.

However, a dynamic system, besides the process part, has a controller. Hence, there is an additional differential equation that describes the model. The aim of it is to find the correct input for the processing system that nullifies the error between the set-point and the feedback values. In this ship model, besides the control system block in Fig. 1, a local governor is also present inside the engine system. All the governors inside the model are Proportional Integrative Derivative (PID) controllers represented with the equation in (7).

$$\begin{aligned} u = K_P e + K_I \int _0^t e d\tau + K_D \frac{de}{dt} \end{aligned}$$
(7)

where e is the generic error defined as the difference between the set-point and the feedback, \(K_P\), \(K_I\), and \(K_D\) are the proportional, integral and derivative gains, respectively.

2.2 Speed Pilot and Autopilot

The control system determines the proper action to be provided by the ship to satisfy the control objective provided by the guidance. In this case, the guidance outputs are the desired heading angle \(\psi \) and the desired speed \(V_{des}\), as will be shown in Sect. 2.3. Indeed, the target tracking scenario’s control objective tends to nullify the distance between the target and the interceptor. The interceptor is considered to be an under-actuated ship in the horizontal plane and an autopilot with a speed controller has been developed to obtain the target tracking motion control objective. The controller has been developed as proposed in [7] and as the one in [3], here proof of the controller’s stability has been shown. The two controllers are modelled as PID controllers with the equation shown in (7). The output of this equation is the value that nullifies the error between the feedback and the desired value.

The first controller is a speed pilot. The speed controller aims to maintain a desirable ship speed and correct the difference from this value. The second one is an Autopilot, for the heading control. Hence, the controllers need as input two time-varying set-points, the desired heading angle \(\psi _{des}\) and the desired ship speed \(V_{des}\), and give as output the speed and heading angle that nullifies the errors. Since the ship model requires the voltage value, as shown in Fig. 1, the set-point value of the speed is transformed, with a suitable gain, into a voltage value.

2.3 Guidance

The motion control scenario is the target tracking one, where the aim is following a moving object without information on the future motion and the control objective tends to nullify the distance between the target and the interceptor. The necessary condition to fulfil the mission’s goal is that the chasing ship’s full speed, named interceptor, is greater than the chased one’s full speed, called target. The scenario can be divided into two parts: the first one regards the approach phase, where the interceptor needs to reach the target, while the second one is the following phase, where the interceptor has reached the target and is required to follow it. In this paper, the Constant Bearing guidance law has been adopted.

The Constant Bearing guidance law is based on parallel navigation. Indeed, the interceptor is required to keep a path parallel to the target one and the required distance vector is a user-defined input that can be chosen as desired. In this logic, the interceptor corrects the path as long as the distance between the target and the interceptor is greater than the desired. A speed and a heading law have been implemented to give as input the desired distances \(e_{des} \in \mathbb {R}\) and \(s_{des} \in \mathbb {R}\) along \(\underline{f}\) basis. The guidance geometrical scheme is shown in Fig. 2.

Fig. 2.
figure 2

Geometrical Sketch of the CB Guidance.

In this case, the relative interceptor-target velocity is the key control variable and is along the vector between the target and the interceptor. Hence, in the following part, the interceptor perceives the target at a constant bearing and a constant distance.

The speed law is defined as the module of the velocity in Eq. (8). This law consists of the sum of two components: the target velocity \(\underline{V}_T\), which nullifies the relative velocity between the interceptor and the target, and the relative interceptor-target velocity \(\underline{V}_{T,I}\), that is the key control variable of this law. Indeed, the relative interceptor-target velocity lets to reach the target with a smooth behaviour thanks to the \(\xi _{CB}\) parameter and, when the desired distance is reached, this part is equal to zero and the following phase begin.

$$\begin{aligned} \begin{gathered} \begin{aligned} \underline{V}_{des}&= \underline{V}_{T} +\underline{V}_{T,I} =\underline{V}_{T} + K_{CB}\frac{\underline{d}_{T,I}}{\sqrt{\underline{d}_{T,I}^2 + \xi _{CB}^2}}\\ \underline{d}_{T,I}&= (x_T -x_I)\, \underline{n}_1 + (y_T-y_I)\, \underline{n}_2+ e_{des} \,\underline{f}_2 + s_{des}\, \underline{f}_1 \\ K_{CB}&= V_{I_{max}}-V_T^* \end{aligned} \end{gathered} \end{aligned}$$
(8)

where \(\underline{V}_T\) is the target velocity, \(\underline{V}_{T,I}\) is the velocity aligned along the LOS vector, \(\underline{d}_{T,I}\) is the vector between the interceptor and the target, \(K_{CB} \in \mathbb {R}^+\) is a speed gain and is set equal to the maximum speed (\(V_{I_{max}}\)) minus the maximum target speed in a previous time interval (\(V_T^*\)), \(\xi _{CB} \in \mathbb {R}^+\) is the main parameter that affects the chasing phase, \(\varOmega _T = (x_T,y_T)\) is the target position, and \(\varOmega _I = (x_I,y_I)\) is the interceptor position.

The heading law is taken according to the law in (9) and is outlined in Fig. 3. It is obtained as the difference between the desired course angle \(\chi _{des}\) and the drift angle of the interceptor \(\beta \). The core of the heading law is the angle \(\chi _{corr}\) that depends on the desired distance \(e_{des}\). Indeed, until the distance along \(\underline{f}_2\) is different from the desired one, it corrects the heading, while when it is equal, the following phase on the parallel path begins.

$$\begin{aligned} \begin{gathered} \begin{aligned} \psi _{des}&= \chi _{des} -\beta \\ \beta = \arctan {\frac{v}{u}}\,\,\,\,\,\,\,\,&\,\,\,\,\,\,\,\,\, \chi _{des} = \chi _T +\chi _{corr}\\ \chi _T = \arctan {\frac{\dot{y}_T}{\dot{x}_T}}\,\,\,\,\,\,\,\,&\,\,\,\,\,\,\,\,\, \chi _{corr} = \arctan {\frac{e_{corr}}{\varDelta }} \\ e_{corr} = e + e_{des} \,\,\,\,\,\,\,\,&\,\,\,\,\,\,\,\,\, e = (\varOmega _T - \varOmega _I)\cdot \underline{f}_2 \end{aligned} \end{gathered} \end{aligned}$$
(9)

where \(\chi _{corr}\) is defined according to the sketch in Fig. 3, e is the geometrical distance between the interceptor and the target along \(\underline{f}_2\), and \(\varDelta \in \mathbb {R}^+\) is a constant that guarantee the smooth behaviour of the interceptor.

3 Human-in-the-loop Architecture

The architecture used to simulate the scenario is drawn in Fig. 4. The human is introduced inside the simulation loop in this architecture, however, he interacts with the simulator and the reaction of the autonomous system can be tested. In particular, in this architecture, the target is manually controlled and tries to leave behind the automatically controlled interceptor. In this way, it is possible to test the guidance logic and have more realistic results.

Here, the target set-points are given manually by an operator via a human-machine interface. Since the target has two azimuthal thrusters, the manual set-points are the voltage and the azimuthal angle of each azimuthal. The signals are processed through the ship model of Sect. 2.1 that computes the trajectory of the target and sends it to the interceptor.

Fig. 3.
figure 3

CB heading law.

The interceptor, instead, is an autonomous ship model like the one in Fig. 1. It automatically computes the course through the guidance module described in Sect. 2.3, and computes a speed and heading set-points to be sent to the control module. At this stage, the interceptor implements the guidance outputs through the control module described in Sect. 2.2. In the end, the ship model described in Sect. 2.1 computes the interceptor trajectory that follows the target.

Fig. 4.
figure 4

Simulation Loop Framework

4 Simulation Results

The guidance law described in Sect. 2.3 is tested through the architecture shown in Sect. 3. The target is remotely controlled by an operator and it tries to leave behind the chasing vehicle, which operates autonomously. In this simulation the distances \(e_{des}\) and \(s_{des}\) along the \(\underline{f}\) basis are set equal to \(2\,L_{PP}\) and \(-2\,L_{PP}\), respectively, where \(L_{PP}\) is the length between the perpendiculars. Below the simulation results are shown.

In Fig. 5 it is possible to note the trajectory covered during the simulation by the target, in red, and the interceptor, in blue, while the yellow lines are used to connect the target and interceptor positions at the same time step.

In Fig. 6 and Fig. 7 the inputs given manually to the target are shown. As shown in Fig. 1 the inputs required by the two shaft lines are the voltages, required for setting the speed, and the azimuth angles \(\delta \), required for setting the heading angles. The inputs are required for the starboard and portside azimuth thrusters, but in this case, the choice was to couple the starboard and portside signals, and mimic a navigation situation.

In Fig. 8 the speeds of the target and the interceptor have been shown. In particular, in red is shown the target speed as the result of the manual inputs, in green is shown the maximum speed available for the interceptor, in orange, the desired value finds by the guidance law, and in blue is the speed assumed by the interceptor in reaction to the set-point given by the guidance.

In Fig. 9 the heading set-point given by the guidance law, in orange, and the real value, in blue, have been shown.

In Fig. 10 the distances between the interceptor and the target have been shown. The distances are taken according to Sect. 2.3 and in particular, the distance e is shown in yellow, while the distance s is shown in purple.

The simulation has a duration of 1000  s and, as it is possible to see in Fig. 7, it has been tried to keep the maximum speed available for the target to leave behind the interceptor, and to stop the voltage inputs of the target, about around 700 s, to see how the guidance logic reacts when the target stops. As it is possible to see from the target path in Fig. 5, the trajectory given as input through the azimuth angles in Fig. 6 has several changes of direction and ends with a straight path to see the following part. Indeed in the final part, the interceptor speed is set equal to the target one, as shown in Fig. 8, and the distances are set equal to the desired values, as shown in Fig. 10. From the results, it is also possible to note that when the speed target goes to zero, also the interceptor stops to wait for the target, as highlighted in Fig. 8, and that the interceptor, thanks to the guidance law, reacts at each change of direction in a proper manner.

Fig. 5.
figure 5

Non dimensional ship trajectory (Color figure online)

Fig. 6.
figure 6

Target manual input - Azimuth angles (Color figure online)

Fig. 7.
figure 7

Target manual input - Voltages

Fig. 8.
figure 8

Interceptor and Target speed (Color figure online)

Fig. 9.
figure 9

Interceptor heading angle (Color figure online)

Fig. 10.
figure 10

Interceptor distances (Color figure online)

5 Conclusion

In this paper, a simulation architecture to test the effectiveness of the constant bearing guidance law in a target tracking scenario for surface vessels has been shown. The adopted guidance law aims to reach and follow a moving object of which it is only possible to know the instantaneous position and speed. Hence, there are two objects: the chasing vehicle (target) and the chased one (interceptor). In this architecture, the target is manually controlled, while the interceptor is autonomously controlled. In several simulations conducted the human operator never leaves behind the interceptor and one of these simulations is shown in Sect. 4 as an example; this demonstrates an autonomous interceptor’s capability to always reach a human-handled marine vehicle (if the maximum speed allows that). The architecture is developed inside a customizable simulation scenario where the interceptor and the target are modelled through detailed mathematical models. Simulation outputs are reported to show the validity of the guidance law, and they can be used for debriefing after a training session. Future activities will regard the testing in a relevant environment by using a remote control station and two drones to get feedback on the guidance module behaviour under disturbances.