4.5.1. Algorithm Testing
To verify the effectiveness of the H-BAS, three classic test functions are taken as examples, as shown in
Table 6, in order to analyze and compare the effects of the algorithm [
40]. Moreover, the test results are compared with the ACO [
41], BA [
42], GRO [
43], Se-PSO [
44], DRL, and ANFC algorithms. The Rastrigin function is selected as an example for repeated testing to avoid the lack of diversity in the algorithm and prove its effectiveness.
Table 6 provides a thorough assessment of the optimization algorithm’s performance in tough, multi-modal, and simple unimodal conditions utilizing these three test functions. It can be guaranteed that the chosen optimization algorithm can demonstrate strong performance in a range of circumstances by employing common test functions like Rastrigin, Griewank, and Sphere, as shown in
Figure 8. This increases the algorithm’s applicability and efficacy in real-world conditions.
The following are the data of the average best fitness value (Avg) and the standard deviation of the best fitness value (SD) of each algorithm under three test functions, after 500 iterations, respectively, as shown in
Table 7.
As shown in
Table 7, BAS-PSO-SA consistently outperforms the other algorithms in all three test functions (Rastrigin, Griewank, and Sphere) in terms of both mean best fitness values and standard deviations. This demonstrates its robustness and effectiveness in handling a wide range of optimization problems, from complex multimodal functions to simple unimodal functions. ACO and Se-PSO perform well but are less consistent than BAS-PSO-SA. BA, GRO, DRL, and ANFC have higher mean values and larger standard deviations, indicating that they are less reliable in achieving the optimal solutions for different test functions. These results confirm that the selected optimization algorithm (BAS-PSO-SA) is very effective and applicable to a range of practical optimization problems.
4.5.2. Simulation Analysis
A number of alternative methods are shown and contrasted using variable domain fuzzy heading control in order to demonstrate the optimization algorithm’s superiority. This comparison not only shows the optimization algorithm’s ability to prevent interference under various interference conditions, but it also thoroughly assesses the system’s response time, stability, and control accuracy, demonstrating the algorithm’s efficacy in challenging settings. We perform simulated tests on the heading control of unmanned ships using Simulink on the MATLAB R2022a platform. In the experiment, the “Lanxin” was an unmanned ship, and
Table 8 below displays the data from that ship. The Nomoto model, with parameters
and
, is used in the control model.
The simulation time is set to 100 s and the sampling step is 0.1 s. Through the simulation experiment, we will compare and analyze the result data to obtain the response curve, error curve, and rudder angle change data, respectively.
Based on the data in
Figure 9 and
Table 9 and
Table 10, the BAS-PSO-SA-optimized fuzzy PID outperforms traditional PID, GRO-optimized fuzzy PID, and Se-PSO-optimized fuzzy PID. It demonstrates better control balance, moderate steering time, shorter adjustment and stabilization time, and minimal rudder angle stability. The BAS-PSO-SA algorithm significantly reduces overshoot, flipping action, and optimization iterations by 30%, showcasing superior heading accuracy and control efficiency, making it ideal for high-precision systems. Additionally, under disturbances, BAS-PSO-SA exhibits stronger anti-interference capability, smoother and more precise rudder angle changes, accurate target heading tracking with smaller rudder angles, reduced steering wear, and ensures smoother sailing.
In order to further verify the performance of the algorithm, the target heading was adjusted to 60°, and simulation analysis was carried out under interference conditions, such as wind, waves, and currents, as shown in
Figure 10 [
45]. The process of heading change and rudder angle change was focused on.
Figure 10b shows the change curve of the heading angle under interference at a target heading of 60°, and it can be seen from
Table 11 that although the target heading has changed, the hybrid beetle optimization algorithm still shows the best control effect. Compared with other methods, BAS-PSO-SA has the smallest overshoot and the fastest response speed. It is the most balanced in steering time, adjustment time, stabilization time, and stable rudder angle. It can effectively cope with interference, such as wind, waves, and currents, and maintain high control accuracy and stability, which fully proves the system’s strong anti-interference ability and higher robustness under interference conditions. This algorithm is suitable for complex control environments that require high heading accuracy and fast response.
This study evaluates the performance of five control algorithms—BAS-PSO-SA, DRL, ANFC, ACO, and GA—for path tracking under varying ship dynamics and ITTC sea conditions. Three ship types (small, medium, and large) were tested using an S-curve path, with ITTC sea conditions simulating real-world disturbances like wind and waves. Key metrics, ITAE and IAE, were used to assess steady-state error, dynamic response, and robustness. The path tracking and error curves were analyzed to compare algorithm adaptability and performance across ship types and interference conditions.
The experimental ship in this article is ship type 1 “Blue Signal”, the S-type path tracking experiment is shown in
Figure 11 and
Table 12.
The second vessel, designated as ship type 2, represents the world’s pioneering intelligent unmanned system mother ship. Developed under the leadership of the Guangdong Provincial Laboratory of Southern Marine Science and Engineering, this project was a collaborative effort involving the 708th Institute of China Shipbuilding Industry Corporation and other partners. Named “ZhuHai Yun”, the vessel measures 88.5 m in length, 14 m in width, and 6.1 m in depth, with a displacement of around 2000 tons. It achieves a top speed of 18 knots and operates efficiently at an economic speed of 13 knots [
46,
47]. The effect of use is shown in
Figure 12, and the indicator comparison is shown in
Table 13.
Ship type 3 was jointly developed by Harbin Engineering University and Shenzhen HiSpeed Boat Company and named “TianXing No. 1”. It has a total length of 12.2 m, a full load displacement of 7 tons, a maximum speed of over 50 knots, and adopts a low hull design [
48,
49]. The effect of use is shown in
Figure 13, and the indicator comparison is shown in
Table 14.
The experimental results show that the BAS-PSO-SA algorithm performs best in the S-shaped path tracking of three different ship types (small ship type 1, large mother ship type 2, high-speed boat type 3). Its IAE and ITAE indicators are significantly lower than those of the DRL, ANFC, ACO, and GA algorithms, and it shows stronger robustness and anti-interference ability under ITTC sea condition interference.
4.5.3. Experimental Setup and Procedure
To validate the proposed self-tuning VUF-PID control framework with hybrid BAS-PSO-SA optimization, a series of experiments were conducted under both simulated and real-world conditions. The experimental setup included a 1.22 m unmanned surface vehicle (USV) equipped with a rudder control system, a GPS module for position tracking, and an inertial measurement unit (IMU) for heading and angular velocity measurements.
The USV used in the experiment is 1200 mm (length). The hull weighs 9 kg and has a maximum payload of 30 kg. When fully loaded, the draft of the USV is 10 cm. The maximum speed of the USV can reach 7 m/s. It is driven by an electric brushless motor with a maximum power of 700 W and a maximum speed of 7000 rpm. The USV can be controlled via 2.4 GHz radio, 4G network or bridge communication. It supports multiple satellite systems including BDS, GPS, GLONASS, Galileo, SBAS, and QZSS with 432 channels. The inertial measurement unit (IMU) operates at an update rate of 200 Hz, providing high-frequency data for precise navigation.
The USV was initialized at the starting position with a heading angle of 0°. The target heading was set to 30° in the first set of experiments and 60° in the second set of experiments. The BAS-PSO-SA algorithm was experimentally compared with the current mainstream deep learning algorithm (DRL) and the adaptive fuzzy neural network algorithm (ANFC). During each experiment, the heading angle, rudder angle, and position of the USV were recorded at a frequency of 10 Hz using the onboard GPS and IMU sensors.
The experimental area is in Jingsi Lake, Lianyungang City, as shown in
Figure 14a, and the experimental unmanned surface vessel is shown in
Figure 14b, the red frame is the experimental area. The results of the heading ship experiment are shown in
Figure 15a,b, and its control performance indicators are shown in
Table 15.
Through experimental verification, the self-adjusting VUF-PID control framework based on the BAS-PSO-SA optimization algorithm proposed in this paper shows significant advantages in the unmanned ship heading control. Experimental results show that the BAS-PSO-SA algorithm is superior to the traditional DRL and ANFC algorithms in terms of control accuracy, dynamic response speed, and robustness. The BAS-PSO-SA optimization algorithm has significant advantages in the unmanned ship heading control, and can achieve high precision, fast response, and strong robustness control effects, which is suitable for unmanned ship autonomous navigation tasks in complex marine environments.