1. Introduction
Marine environment sensing, monitoring, and management are essential to protect the ocean. In this regard, autonomous surface vehicles (ASVs) or unmanned surface vehicles (USVs) (hereafter, ASVs or USVs can be used interchangeably) play a crucial role in sensing and monitoring the ocean, providing essential information [
1,
2,
3,
4]. The ocean covers two-thirds of the Earth’s surface and has a substantial impact on weather patterns, marine ecosystems, coastal regions, and the dynamics of climate change [
1]. It is a source of energy, food, and materials; moreover, it is used for transportation and recreational purposes [
5]. Marine ecosystem degradation, ocean temperature rise, plastic waste contamination, and pollution, etc are posing a threat to mankind [
1]. To address this problem, surface vehicles equipped with sensors can be applied to collect data. For autonomous, efficient, and accurate sensing of marine environments, following a desired sensing trajectory is essential. Moreover, autonomous trajectory following of USVs has been utilized in various application areas, including military operations, transportation, surveillance, and offshore infrastructure [
6,
7,
8,
9]. This paper focuses on the trajectory following control of USVs.
Different types of USVs are used depending on the application area; however, all USVs share some basic components, such as the hull, data collection equipment, communication systems, guidance, navigation and control (GNC), and propulsion and power systems [
10]. The GNC system plays a significant role in a vehicle’s capability of accomplishing a given mission. One of the main challenges to develop USVs is the lack of a reliable and automated GNC that can operate in sophisticated and hazardous operating conditions, and overcome the possible failures in sensors, actuators, and communication [
10,
11]. The general block diagram of GNC is shown in
Figure 1. In the navigation system, different onboard sensors, such as global positioning system (GPS), inertial measurement unit (IMU), compass, sonars, and cameras can be incorporated to measure the states of the vehicle, that is, position, orientation, velocity, and acceleration, as well as to gather data regarding the environment for scientific research. Additionally, state estimator or observer can be used to estimate the states of the vehicle if there are no adequate sensors or to estimate the unmeasurable states of the system.
The guidance system generates a continuous and smooth trajectory to the control system based on the information provided by the navigation system, desired mission, and environmental conditions. In this study, we focus on developing the control system as part of the GNC, assuming that the navigation system provides the necessary states, which are the vehicle’s position, orientation, velocity, and acceleration. The control system operates to drive the vehicle to follow the command velocity provided by the guidance module, utilizing information provided by the navigation systems and minimizing the position trajectory error [
10]. Therefore, the tracking error in the research indicates the difference between the controlled velocity and the commanded velocity. The tracking error in the position is considered by the guidance system.
Trajectory following for surface vehicles is challenging, owing to the complexity and nonlinearity of vehicle models and various environmental disturbances such as wind, waves, and currents [
12]. To this end, researchers have employed various control strategies. One of the most widely used controllers is the proportional, integral, and derivative (PID) controller [
13,
14,
15,
16], but it lacks robustness and is highly dependent on the accuracy of the system dynamics [
17]. Model predictive control (MPC) was applied in [
18,
19], which is sufficient for handling system constraints; but it is computationally intensive when the prediction horizon increases, making practical implementation difficult [
12]. Other control methods that have been applied include linear quadratic regulator (LQR) [
20,
21,
22], feedback linearization [
21,
23], backstepping control [
24,
25], fuzzy logic and its variants [
26], neural networks [
27], adaptive control [
28] and other well-known control algorithm commonly used for trajectory-following applications is sliding mode controller [
24].
Sliding mode control (SMC) is a robust control strategy that ensures insensitivity to matched uncertainties in line with the control input. This allows the straightforward implementation of a robust controller, provided the uncertainties are bounded [
29,
30]. The fundamental principle of the SMC is to select a sliding surface within the state space in which the system has the desired characteristics. Subsequently, a controller can be designed to force the system trajectories from any initial condition within the state space to the sliding surface within finite time. Additionally, the trajectories can be maintained on the surface afterwards. In essence, SMC comprises two parts: equivalent control responsible for bringing the state trajectories from any initial condition to the sliding manifold, and discontinuous control that keeps the trajectories on the surface after they are brought to the manifold. Thus, the system is insensitive to model uncertainty and bounded exogenous disturbances [
29].
However, SMC does not preserve the theoretical sliding motion formulation; rather, it switches to an infinitely high frequency for the sliding manifold. This high-frequency switching is not practically feasible due to the limitations of the actuator bandwidth. Hence, an ideal sliding mode cannot be achieved. Additionally, high-frequency switching of the control signal results in a phenomenon known as the chattering effect. Chattering can result in wear and tear of mechanical actuators as well as high energy consumption. The possible reasons for chattering, according to [
30,
31], are: (i) even though high-frequency switching is achievable, the existence of “parasitic dynamics“, that is, unmodeled actuator and sensor dynamics, in series with the system could result in a small oscillation around the sliding manifold, and (ii) non-ideal sliding motion causes a high-frequency oscillation.
Continuous-time second-order SMCs have been proposed to alleviate the chattering problem [
32,
33]. However, when continuous-time SMCs are discretized using a sample and held for digital implementation, they may lose their robustness, leading to instability. To address this limitation of continuous-time sliding mode controllers, researchers introduced discrete-time sliding mode controllers (DSMC). Moreover, implementing a DSMC is more straightforward owing to the advancement and widespread availability of computers and microcontrollers. However, the robustness of DSMC is undermined owing to the finite sampling time. In DSMC, the state trajectories converge to a bounded region near the sliding surface called the ultimate band. They exhibit a zigzag motion, termed quasi-sliding mode (QSM). Furthermore, unlike continuous-time SMC, the width of the ultimate band of a DSMC can be determined, which indicates the robustness of the controller. As noted in [
34], given the desired ultimate band, the desired controller parameters can be determined; however, the limitations of the controller must be considered. Hence, by manipulating this band, the insensitivity of DSMC to uncertainties can be varied. To increase the robustness and mitigate the chattering effect of conventional DSMC, a second-order DSMC was proposed in [
35,
36]; however, the controller gains are not optimal.
Although there are a number of research works on DSMC, particularly based on the reaching law [
37], its application to USVs has received less attention. This could be because of the difficulty in finding a discretized model of the vehicle [
38]. In Ref. [
39], a cascaded conventional DSMC and PI-based gain-scheduling controller were used for a straight line following ASV. Different numerical tests were conducted with and without ocean current disturbances. Although the results were satisfactory, the rudder experienced significant chattering.
Therefore, in this study, we propose a discrete-time super-twisting sliding mode controller [
35], which is a robust second-order SMC, to address chattering. To the best of our knowledge, DSTA has not been applied to trajectory following for USVs. Additionally, owing to the complexity of obtaining an exact discrete-time model of the vehicle, we assumed certain hydrodynamic parameters and external disturbances, such as ocean currents, waves, and wind, as unknown perturbation. Hence, we applied a time delay estimator (TDE) to estimate the unknown system dynamics.
The TDE estimates the unknown system dynamics based on the past states of the system and control input. It was first introduced by [
40] to estimate disturbances in robotic manipulators, and was later applied to underwater control [
41,
42]. Then, based on this estimation, the controller cancels the uncertainties.
In many previous studies, the effectiveness of the time delay estimator has been experimentally verified in the presence of model uncertainties and external disturbances [
36,
41,
42]. The purpose of the time delay estimator is to assess perturbation by utilizing data from a sufficiently short time ago, aiming to enhance control performance in terms of robustness and control energy. As will be detailed by using equations, the time delay estimator operates under the assumption that the perturbation does not change drastically within one sampling period, even though it dynamically evolves. In our research, the sampling period is 0.01 s, and the derivative of the perturbation remains fairly constant for this duration. This assumption is reflected in the TDE formulation, which can be regarded as the first-order approximation of the Taylor series expansion of the disturbance.
If the time delay estimator is not utilized, higher bounds on uncertainties should be assumed for robust control, leading to an increased control signal. A higher control signal, in turn, indicates higher control energy. Moreover, if the perturbation is not estimated, the controller becomes computationally intensive due to the need to adapt a large number of uncertain parameters. This restricts the real-time use of the control algorithm due to the limited onboard computational resources [
43]. These limitations can be addressed using a time delay estimator, which provides information about perturbation to improve the robustness and reduce the control signal [
36,
41].
Furthermore, the TDE minimizes the time delay, which affects the performance of the sliding mode controller [
31]. Finally, we apply a genetic algorithm (GA) to determine the optimal gains of the proposed controller. A quadratic cost function, which is the sum of the tracking error and control energy, was selected. The block diagram of the proposed method is shown in
Figure 2. The main contributions of this study are summarized as follows.
A robust DSTA has been applied for trajectory following of an ASV. Moreover, a TDE algorithm has been used to estimate the unknown dynamics of the system, which in turn, improves the robustness of the proposed controller.
A GA is used to tune the controller parameters based on a quadratic objective function, which is the sum of the tracking error and control energy.
A linear matrix inequality (LMI) based Lyapunov approach was employed to validate the stability of the closed-loop system.
Finally, simulation results are presented for two scenarios, with and without the presence of exogenous disturbance. Moreover, the performance of the proposed GA based DSTA is compared with that of DSTA and a reaching law based DSMC.
The remainder of this paper is structured as follows.
Section 2 describes the mathematical model of the vehicle from which the discretized model is drived using the integral approximation method.
Section 3 describes the design of the proposed DSTA controller and the stability of the closed-loop system. Tuning of the parameters of the proposed controller using the GA is presented in
Section 4. In
Section 5, numerical results and discussions are presented, and finally,
Section 6 presents the conclusions.
4. Controller Gain Optimization Using Genetic Algorithm
In this section, the computation of the optimal gains of the proposed controller using GA is discussed. Setting controller gains, particularly for complex nonlinear systems, is difficult and requires experience. The system response can be made faster with higher controller gains; however, this leads to higher control signals, which in turn increase the energy consumption and actuator saturation. Thus, to address these problems, we applied a GA to tune the controller gains.
To determine optimal gains, an objective or cost function must first be established. In optimal control, the choice of cost function depends on the performance measures that the system must satisfy. These performance measures can be the error, time, and control energy, or a combination of them [
49]. The use of the sum of tracking error and control energy, or a combination of other performance metrics as a cost function, is a common approach and has been applied in real-world applications. Nevertheless, there is always a trade-off between the selections of the performance criteria. After selecting the cost function, a suitable optimization algorithm is chosen to find the optimal parameters of the controller based on the cost function.
In this study, GA was selected because it is convenient for discrete-time optimization [
50]. GA is an evolutionary algorithm based on Darwin’s theory of natural selection. Generally, it uses three operators: selection, crossover, and mutation. The operation of the GA commences by setting an initial random population comprising possible candidate solutions, and the fitness of the individuals is evaluated using the cost function. The selection operator then selects the fittest individuals, from which parents are selected for reproduction. Offsprings are produced by crossing the chromosomes of the parents. To increase the diversity of the next generation, a mutation operator is applied that prevents stagnation, that is, the similarity of the solution after several generations. This operation continues until the stopping criteria are satisfied [
50,
51]. The GA operation is summarized in the flowchart in
Figure 4.
The proposed method avoids real-time use of GA. If employed in real-time, the convergence time of GA significantly impacts control performance. Problems may arise if GA fails to converge within the desired time period corresponding to the control frequency. To address this, we employed GA to tune the controller parameters offline before real-time operation. This tuning is specifically for the nominal case, without external disturbances, and is done prior to the real-time operation of the controller.
Since ASVs can stay on the water surface for long periods of time, they should use energy efficiently apart from following the desired trajectory by minimizing the tracking error. Thus, we employ a quadratic cost function
, which is the sum of the tracking error and control energy, defined as follows:
where
k is the number of time steps and
and
are the vectors of the tracking error and control signal at the
time instant, respectively.
is a positive semi-definite matrix and
is a positive definite matrix. The cost function, as defined in Equation (
42), incorporates weighting matrices
and
for the tracking error index and control energy index, respectively. The values of these matrices depend on the size of the tracking error and the control energy, as mentioned in [
52]. They are selected to strike a balance between tracking performance and control energy consumption. It should be noted the cost function is formulated as an unconstrained optimization problem.
The cost function given by Equation (
42) is coded using MATLAB. The error and control signals are logged into the MATLAB workspace using the Simulink
® model implementation of the vehicle. The cost function is computed from these signals. Then, the cost function and GA options were passed to the built-in MATLAB GA. Finally, the algorithm tunes the controller’s gains until the stopping criteria are reached, which in our case are the maximum number of generations and stall generations.
Figure 5 illustrates our analysis of GA convergence, showing plots of fitness, stopping criteria, and the average distance between individuals. The GA operates with a population size of 250, and its stopping criteria include a maximum of 15 generations and a stall generation of 7, as outlined in
Table 1. Other GA settings are detailed in the same table. The fitness graph in
Figure 5 demonstrates GA convergence to the ‘best’ solution in nearly 6 generations, terminating based on the maximum number of generations criterion. Moreover, the graph depicting the average distance between individuals gradually decreases as the generation advances, indicating the convergence of GA towards a proper solution.