## 4 Methods
### Improved GA Considering Thrust Saturation Constraints  
In the field of robotics control, thrust saturation constraints refer to the situation where the output of a robot's thrust system (such as motors or servos) is limited by physical or electrical factors. These constraints are typically expressed as the thrust system's output being unable to exceed a maximum or minimum value. This is due to physical and electrical limitations in the actual thrusts, such as power, current, and speed, preventing infinite increases in output.  
The impacts of thrust saturation constraints include the following aspects: (1) When the thrust reaches saturation, the control system may no longer effectively adjust the robot's motion, leading to increased control errors, slower system response, or instability; (2) Thrust saturation can lead to system instability, particularly in high-dynamic response applications; (3) When the thrust operates in saturation, its efficiency is typically lower, which can result in energy waste and a decrease in the overall system's efficiency; (4) To address saturation constraints, the design and tuning of the control system become more complex.  
Thrust saturation constraints are a significant issue in robot control, with a notable impact on the performance and stability of the control system. Effectively handling these constraints requires considering the relevant factors during the control system design and employing appropriate control strategies. By optimizing the control method and introducing anti-saturation mechanisms, the negative effects of saturation on system performance can be mitigated. In the MATC system, thrust saturation constraints refer to the maximum thrust each AUV unit can provide.  
If the thrust saturation limit for each AUV unit is denoted as \(T_{\max}\), the thrust assigned to each AUV unit should satisfy the condition: \(u_{i}\leq T_{\max}\). Since the GA is difficult to deal with the constraints in optimization, it is necessary to convert the constraint into an unconstrained expression. This can be achieved by creating a penalty function that penalizes the thrust allocation results exceeding the saturation limits (\(u_{i}>T_{\max}\)), and adding it to the objective function of the GA for thrust optimization. This allows the determination of the actual thrust each AUV unit will use in the next execution cycle.  
The penalty function is also formulated in a quadratic form. Considering the minimization optimization approach of the objective function, the specific term can be expressed as follows:  
\[\gamma\sum_{i=1}^{n}[\max(0,u_{i}-T_{\max})]^{2} \tag{4}\]  
where \(\gamma\) is the penalty factor.  
For this penalty function: when \(u_{i}\leq T_{\max}\), its value is 0, resulting in no penalty and a smaller objective function value; when \(u_{i}>T_{\max}\), the value becomes \(u_{i}-T_{\max}\), introducing a penalty and leading to a larger objective function value.  
The objective function with the penalty term is expressed as follows:  
\[J_{a}^{\prime}=\alpha\sum_{i=1}^{n-1}\left[\widetilde{x}_{i(i+1)}-L_{b}\right] ^{2}+\beta\left(\widetilde{x}_{p}-v_{0}\right)^{2}+\gamma\sum_{i=1}^{n}[\max (0,u_{i}-T_{\max})]^{2} \tag{5}\]  
By introducing the penalty function, the MATC system can effectively address the thrust allocation problem under thrust constraints and uncertain ocean current disturbances, significantly enhancing the reliability of stable straight-line sailing.