Abstract
This paper presents a simulation-based study on PSO-enhanced waypoint tracking and guidance for an autonomous sail-drone under wind, current, and obstacle disturbances. A PID controller combined with ILOS guidance was used as the baseline control framework, while a PSO-tuned PID controller was developed for performance comparison. The proposed framework integrated wind-aware global path planning, local LOS–ILOS guidance, obstacle-avoidance correction, and closed-loop heading control in a 4 DOF sail-drone dynamic model. PSO was used to optimize both guidance parameters and PID gains through a multi-term fitness function. Simulation results showed that the PID + PSO controller achieved better tracking accuracy and route efficiency than the baseline PID-ILOS controller. The maximum cross-track error was reduced from about 12–13 m to mostly below 2 m, and the traveled distance decreased from 192.43 m to 183.17 m. These results demonstrated that PSO-based tuning improved waypoint tracking accuracy, disturbance recovery, and overall path-following performance.
1. Introduction
Autonomous sail-drones have attracted increasing research interest because they can exploit wind energy for long-endurance marine monitoring, environmental observation, and oceanographic missions. Compared with conventional unmanned surface vehicles driven mainly by propellers, sail-drones have the advantage of low energy consumption and extended operating range. However, their motion is strongly constrained by the wind direction, especially because direct upwind sailing is physically infeasible in the no-go zone. In addition, ocean currents, wind variation, obstacle avoidance, and underactuated dynamics make waypoint tracking and path following more difficult than in conventional marine vehicles. Recent studies on autonomous sailboats have therefore emphasized the need for integrated modeling, guidance, path planning, heading control, and energy management strategies [1]. Several guidance and path-following techniques have been developed for marine vehicles and autonomous sailboats. Classical line-of-sight (LOS) guidance is widely used because it has a simple structure and can generate a desired heading angle for marine path following [2]. However, conventional LOS guidance may suffer from steady cross-track error when persistent environmental disturbances exist. Integral line-of-sight (ILOS) guidance overcomes this limitation by introducing an integral action to compensate for accumulated cross-track error, making it suitable for underactuated marine vehicles affected by wind and current disturbances [3,4]. In many marine path-following studies, LOS or ILOS guidance is combined with a low-level PID or PD autopilot because this structure is simple, robust, and convenient for heading-control implementation [3,4,5]. Therefore, in this paper, the PID+ILOS scheme is used as the baseline controller. For autonomous sailboats, path planning must also consider wind direction, obstacle location, and the no-go-zone constraint. Search-based, graph-based, and reinforcement-learning-based approaches, such as Q-learning, have been proposed to generate feasible high-level paths for autonomous sailboat navigation under wind and obstacle constraints [2].
Although these existing techniques have demonstrated promising results, many studies focus mainly on one part of the navigation problem, such as global path planning, local guidance, or low-level heading control. In practical operation, however, these elements are strongly coupled. For example, an unsuitable look-ahead distance may increase cross-track error, an inappropriate obstacle-avoidance gain may cause unnecessary deviation, and manually tuned PID gains may not provide satisfactory heading response when the sail-drone encounters wind or current changes. This limitation motivates the development of an improved controller built upon the baseline PID + ILOS structure. In the present study, a PID + PSO controller is introduced as an enhanced controller and is compared directly with the baseline PID + ILOS controller to demonstrate the effectiveness and novelty of the proposed optimization framework. Particle swarm optimization (PSO) is suitable for this task because it can search for an improved parameter set without requiring an explicit gradient of the nonlinear closed-loop sail-drone model.
To address the issues above, this paper proposes a PSO-enhanced waypoint tracking framework for a sail-drone described by a four-degree-of-freedom dynamic model. The proposed method combines wind-aware global path planning, local LOS-ILOS guidance, obstacle-avoidance correction, and a PSO-tuned PID heading controller. The PID + ILOS controller is treated as the baseline control architecture, whereas the PID+PSO controller is developed as the optimized architecture for comparison. The main contribution of this study is the coordinated PSO-based optimization of both guidance parameters and PID heading-control gains, which enables a clearer evaluation of the performance improvement over the baseline controller. The PSO fitness function, also referred to as the objective function, is formulated to evaluate each candidate parameter set in terms of traveled distance, no-go-zone violation, number of tacking events, terminal distance to the goal, and collision penalty. Thus, the optimization process aims not only to shorten the route but also to improve tracking accuracy, sailing feasibility, obstacle safety, and maneuvering smoothness. In addition to the simulation framework, the simulations in this study are constructed based on the sail-drone prototype shown below rather than on a platform currently under development. The prototype includes a GPS antenna for position feedback, a wind sensor for measuring actual wind information, a LiDAR sensor for frontal obstacle detection, an IMU sensor for motion state measurement, and a Mini PC as the central processing unit. The Mini PC receives sensor data and sends control commands to two 48 V DC motors that actuate the airfoil sail and the rudder through right-angle gearboxes. The onboard electrical system is powered by a 48 V battery, which can be recharged by a solar panel. At the present stage, the proposed method is validated through closed-loop numerical simulations based on this prototype configures.
2. Overview of the 4 DOF Dynamic Model
Figure 1 illustrates the body-fixed coordinate system of the sail-drone and its 4 DOF. The translational motions are surge along the x-axis, sway along the y-axis, and heave along the z-axis. The rotational motions are roll in the x-axis, pitch in the y-axis, and yaw in the z-axis. Four of these motions describe the rigid-body movement of sail-drones in a disturbed marine environment. The sail-drone’s state is written as
where x, y denote position and Φ, ψ denote roll and yaw angles.
Figure 1.
Body-fixed reference frame and four-degree-of-freedom motions of the autonomous sail-drones.
The body-fixed velocities are defined by
where u, v are surge and sway velocities, and p, r are roll and yaw rates.
In compact marine-craft form, the kinematics and dynamics are commonly written as
where M is the inertia matrix, C(v) is the Coriolis/centripetal matrix, D(v) is the hydrodynamic damping matrix, g(η) collects restoring effects, and τ contains control and environmental forces [1].
3. Hardware Design and Guidance Control Algorithm
3.1. Hardware Design
Figure 2 shows the sail-drone prototype configuration used as the hardware basis for the simulations in this study. The reference trajectory or waypoint information is assigned from an onshore PC, while the GPS antenna provides the real-time position of the sail-drone for guidance and path tracking purposes. The wind sensor mounted at the top of the sail measures the actual wind information, and the LiDAR sensor installed at the bow detects frontal obstacles; these signals, together with the GPS and IMU data, are transmitted to the Mini PC as the main control inputs. Based on these sensor inputs, the Mini PC computes the control commands for two 48 V DC motors that actuate the airfoil sail and the rudder. Each motor is coupled with a right-angle gearbox with a reduction ratio of 1:100, reducing the maximum motor speed from 3000 rpm to approximately 30 rpm while increasing the output torque; all electrical devices are powered by a 48 V battery, which can be recharged by the solar panel.
Figure 2.
Sail-drone hardware design.
3.2. Overview of the Control Architecture
Figure 3 illustrates the simulation architecture of the proposed PID+PSO guidance and control system, which was developed from the baseline framework combining a PID heading controller with ILOS guidance. In the baseline structure, the ILOS guidance algorithm generated the desired heading angle based on the cross-track error, while the PID controller produced the rudder command for heading tracking. However, the performance of this baseline controller depended strongly on manually selected guidance parameters and PID gains. Therefore, in the proposed framework, particle swarm optimization (PSO) was introduced to improve both the guidance and control layers. The simulation system received mission and environmental inputs, including wind direction and speed, sail-drone dimensions, obstacle information, and the starting and finishing regions. Environmental disturbances, such as varying wind speed and time-varying ocean current, were also added to evaluate the robustness of the controller. The guidance module consisted of global path planning and local path tracking. The global planner generated a feasible route by considering obstacle avoidance and wind constraints, while the local guidance layer used ILOS, LOS–ILOS blending, tacking logic, and obstacle-avoidance correction to update the desired heading during navigation. Unlike the baseline PID-ILOS controller, the proposed PID-PSO system automatically optimized important parameters, such as the look-ahead distance, LOS–ILOS blending factor, obstacle-avoidance gain, tacking-related parameters, and PID gains. The optimized PID controller then generated the control commands for the rudder and sail actuators. The sail-drone motion was evaluated using a four-degree-of-freedom dynamic model including the surge velocity, sway velocity, roll rate, and yaw rate. The navigation block continuously fed back the sail-drone position, heading, and motion states to update the guidance and control processes. The mission was completed when the sail-drone entered the finishing region.
Figure 3.
Guidance, navigation, and control architecture of the simulation.
3.3. Main Guidance and Control
The proposed method consists of five main steps: global path planning, local guidance generation, guidance parameter optimization using PSO, PSO-tuned heading control, and closed-loop evaluation through the 4 DOF sail-drone model. First, a feasible route is generated from the starting zone to the finishing zone while considering obstacle avoidance and wind constraints. The cost of each feasible edge in the graph is defined as
where dij is the Euclidean distance between nodes i and j, P wind (χij) is the wind-direction penalty associated with the edge heading χij, wwind is the wind-cost weight, wg is the goal-bias coefficient, and pg is the goal point.
For local path tracking, the cross-track error is computed as
where ect is cross-track error; p is the current sail-drone position, p0 is the closest point on the active path, and n is the local normal vector of the path.
Based on this error, the integral line-of-sight (ILOS) guidance law is given by
where χILOS signifies the desired course angle; χpath denotes the reference path angle; ki functions as the integral gain parameter; and Δ represents the look-ahead distance dictating the trajectory convergence behavior.
In parallel, the line-of-sight (LOS) heading is obtained from the look-ahead point as
where x and y are the current position coordinates of the sail-drone in the inertial frame; xlook, ylook are the coordinates of the look-ahead point on the reference path.
The final commanded heading is formed by blending ILOS and LOS and adding a local obstacle-avoidance correction:
where λ is the LOS-ILOS blending factor, β is the CB-LTA blending gain, and ΔχCB−LTA is the local obstacle-avoidance correction.
In the control system, the rudder command is generated by the PID heading controller:
where eψ is the heading error defined with respect to the commanded course and the course-over-ground angle; Kp, Ki and Kd are the proportional coefficient, integral coefficient and derivative coefficient respectively of the nominal PID path.
In the sail controller, the sail command is directly regulated from the apparent wind angle:
In the proposed framework, PSO is used to optimize not only the PID gains but also the guidance-related parameters. The guidance decision vector is defined as
where Lpp is the path look-ahead distance, ΔILOS controls the ILOS convergence behavior, λ balances LOS and ILOS, β weights local obstacle avoidance, Rf and Rloc define local smoothing scales, dtack is the tacking offset, and wwind is the wind-cost weight in the global planner. These parameters directly affect route smoothness, no-go-zone handling, tacking behavior, and tracking accuracy.
The PSO particle update equations are
where and denote the position and velocity of particle i; is the personal best solution of particle i; gk is the global best solution found by the swarm; w is the inertia weight; c1 and c2 are the cognitive and social acceleration coefficients; and r1, r2 ∈ [0, 1] are random numbers.
Equation (15) is the PSO fitness function; it is used to evaluate the quality of each candidate set of guidance and PID control parameters during the PSO process. The purpose of this function is to find the parameter set that allows the sail-drone to reach the goal safely, follow the route efficiently, avoid obstacles, respect the no-go-zone constraint, and reduce unnecessary tacking maneuvers.
Here, J is the overall fitness value used by PSO to evaluate each candidate parameter set; Jlen is the total traveled distance of the sail-drone; Jnogo is the penalty for violating the no-go-zone constraint with respect to the wind direction; Ntack is the number of tacking or heading-switching events; dgoal is the terminal distance between the final sail-drone position and the target region; and Jcoll is the collision or obstacle safety penalty. The coefficients from w1 to w5 are positive weighting factors used to balance route efficiency, sailing feasibility, maneuvering smoothness, terminal accuracy, and obstacle avoidance, respectively. ect(t) is the cross-track error at time t, representing the lateral deviation of the sail-drone position. A smaller value of J indicates better overall waypoint tracking performance.
4. Results and Discussion
Figure 4a,f present a dynamic response comparison between the nominal PID controller and the PSO-optimized PID controller under the same disturbance conditions. In Figure 4a, the surge velocity u of both controllers remains bounded, but the PID+PSO case shows smoother variation and reaches the low-speed region earlier after the disturbance transitions, indicating more responsive adaptation to the updated guidance command. In Figure 4b, the sway velocity (v) of the optimized controller changes more quickly between positive and negative lateral motion and settles earlier, which suggests better lateral response during path correction. In Figure 4c, the roll angle (ϕ) remains within an acceptable range for both methods, while the PID-PSO response returns earlier from large positive roll angles and avoids the prolonged roll excursion observed in the nominal PID case. In Figure 4d, the yaw rate (r) under PID-PSO exhibits stronger switching activity during turning segments, reflecting more aggressive heading correction to follow the guidance route more closely. This behavior is consistent with Figure 4e, where the cross-track error is significantly reduced: the nominal PID reaches large deviations of about 12–13 m, whereas the PID-PSO controller keeps the error mostly below about 2 m over the course of the mission.
Figure 4.
Comparison between the PID-ILOS and PID-PSO optimized ILOS controllers: (a) surge velocity (u) comparison; (b) sway velocity (v) comparison; (c) roll angle (∅) comparison; (d) yaw rate (r) comparison; (e) cross-track error comparison; and (f) comparison of actual traveled distance.
In addition, Figure 4f shows that the actual traveled distance decreases from 192.43 m for the nominal PID to 183.17 m for PID-PSO, confirming that the optimized controller not only improves path-following accuracy but also reduces unnecessary detours. Overall, the results demonstrate that the PID-PSO framework provides better guidance tracking performance, especially in terms of cross-track reduction and travel distance efficiency, while maintaining bounded dynamic responses under wind and current disturbance.
Figure 5 compares the planned path with the actual trajectories obtained using the nominal PID controller and the PSO-PID-optimized controller under wind and current disturbances. Both controllers are able to move from the starting zone to the finishing zone while avoiding the obstacles. However, their path-following performance is clearly different. The nominal PID—ILOS trajectory deviates more strongly from the planned path, especially after the wind disturbance node and around the turning region near the current disturbance node. In these segments, the nominal controller produces wider detours and larger oscillations before returning to the reference route. By contrast, the PID-PSO-optimized ILOS trajectory remains much closer to the planned path over most of the mission. After both disturbance nodes, the optimized controller recovers faster and follows the commanded route with smaller lateral deviation. This improvement is particularly visible in the middle horizontal segment and in the final upward segment toward the goal, where the PID + PSO path nearly overlaps the planned path.
Figure 5.
Planned and actual trajectories under the PID–ILOS and PID–PSO controllers.
5. Conclusions
This paper proposes a PSO-enhanced guidance and control framework for waypoint tracking of an autonomous sail-drone in the presence of wind and current disturbances and obstacles. The proposed framework integrates wind-aware global path planning, local LOS–ILOS guidance, obstacle-avoidance correction, and a PSO-tuned PID heading controller, and it was evaluated using a 4 DOF dynamic model. A conventional PID–ILOS scheme was employed as the baseline, whereas a PSO-tuned PID–ILOS scheme was developed as the enhanced scheme to assess the effectiveness of the proposed optimization strategy. The simulation results demonstrate that the optimized scheme reduces the cross-track error, reduces the path length, and improves trajectory recovery following disturbance transitions compared with the baseline scheme. The PSO fitness function provides a balanced assessment of path efficiency, no-go-zone feasibility, tacking performance, terminal accuracy, and collision avoidance. Moreover, the simulation model was parameterized using the physical specifications of the developed sail-drone prototype, thereby grounding the numerical evaluation in the physical system. Future work will focus on incorporating advanced lumped-disturbance compensation and fixed-time robust control techniques [6,7] into the proposed framework and experimentally validating the resulting system in real time on the developed sail-drone prototype.
Author Contributions
Conceptualization, T.H.N. and H.Q.D.; methodology, T.H.N. and H.Q.D.; software, T.H.N.; validation, T.H.N. and H.Q.D.; formal analysis, T.H.N.; investigation, T.H.N., P.M.N., D.V.T., V.T.A., N.T.H.P. and N.M.C.; resources, T.H.N. and H.Q.D.; data curation, T.H.N.; writing—original draft preparation, T.H.N.; writing—review and editing, T.H.N. and H.Q.D.; visualization, T.H.N.; supervision, H.Q.D.; project administration, T.H.N. and H.Q.D.; funding acquisition, T.H.N. and H.Q.D. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.
Acknowledgments
This work was supported by Vietnam Maritime University.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Tipsuwan, Y.; Sanposh, P.; Techajaroonjit, N. Overview and control strategies of autonomous sailboats—A survey. Ocean Eng. 2023, 281, 114879. [Google Scholar] [CrossRef] [Scilit]
- Junior, A.G.d.S.; dos Santos, D.H.; de Negreiros, A.P.F.; Silva, J.M.V.B.d.S.; Gonçalves, L.M.G. High-Level Path Planning for an Autonomous Sailboat. Sensors 2020, 20, 1550. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Lekkas, A.M.; Fossen, T.I. Line-of-Sight Guidance for Path Following of Marine Vehicles. Adv. Mar. Robot. 2013, 5, 63–92. [Google Scholar]
- Caharija, W. Integral Line-of-Sight Guidance and Control of Underactuated Marine Vehicles. Ph.D. Thesis, Norwegian University of Science and Technology (NTNU), Trondheim, Norway, 2014. [Google Scholar]
- Fossen, T.I. Handbook of Marine Craft Hydrodynamics and Motion Control, 1st ed.; John Wiley & Sons Ltd.: Chichester, UK, 2011. [Google Scholar]
- Dong, H.Q.; Lee, S.-G.; Ha, Q.P.; Tuan, L.A.; Vu, M.T.; Ko, K. Cascade sliding mode control with lumped disturbance compensation for acceleration tracking of electrohydraulic–pneumatic actuators. ISA Trans. 2026, 173, 493–509. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Dong, H.Q.; Sang, N.Q.; Tuan, L.A.; The, T.X.; Hiep, P.M.; Cuong, N.M. Generalized-damping fixed-time fractional-order control with lumped disturbance compensation for underactuated construction robots: Application to autonomous excavators. Autom. Constr. 2026, 188, 106982. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.




