MPC-Based Collaborative Control of Sail and Rudder for Unmanned Sailboat

: In the traditional motion control method of an unmanned sailboat, the sail and rudder are divided into two independent controllers. The sail is used to obtain the thrust and the rudder is used to adjust the yaw angle. The traditional control method does not consider the synergy between the two controllers and ignores the influence of the roll angle on sailing. It is easy for these methods to cause an excessive roll angle and large yaw angle error, which will weaken the safe navigation and accurate path tracking of an unmanned sailboat. This paper presents a collaborative control method of sail and rudder based on model predictive control. A four-degree-of-freedom kinematics and dynamics model of the unmanned sailboat considering roll angle was established, with the yaw angle and roll angle as the control objectives at the same time. The collaborative control method outputs sail angle and rudder angle simultaneously. By comparing the motion of this method and the separation control of sail and rudder under the same wind field conditions, it is verified that the collaborative control has better effects of yaw angle control and roll angle limitation and can obtain a more accurate path tracking effect.


Introduction
Unlimited by carried fuel, an unmanned sailboat is powered by wind and solar energy and has the advantages of long-duration and wide-range cruising on the sea surface [1].In recent years, unmanned sailboats have played a unique advantage in broad applications such as marine data collection, environmental monitoring, ocean observation, etc. [2].In the traditional rudder control of an unmanned sailboat, the most common method is PID control.However, PID control is prone to steady-state error and oscillation in actual unmanned sailboat control.The sail control is usually the maximum thrust sail angle method, and the control goal is to maximize the speed.However, the maximum thrust sail angle method does not take into account the limitation of roll angle and lateral displacement, which will cause the excessive roll angle.Excessive roll angle will affect navigation safety and cause a poor path tracking effect in actual control.
In recent years, many domestic and foreign scholars have conducted a lot of research on the improvement of traditional motion control strategies.Dong et al. [3] proposed a Gaussian process model predictive control (GPMPC) method based on data-driven learning technology for rudder control, which improved the control effect of yaw angle.Jouffroy et al. [4] designed a nonlinear rudder controller using the integrator backstepping method and achieved a good heading control effect.Shen ZP et al. [5] proposed a rudder control strategy of the adaptive recursive sliding mode dynamic surface for unmanned sailboats' course control.In addition, neural networks with memory and prediction functions have begun to enter the field of surface ship control [6].Based on the kinematics model, Astrov [7] designed a seven-layer neural network predictive rudder controller to control the course of unmanned sailboats.In the later research, scholars gradually began to pay attention to the problem of sail control and put forward some methods of speed adjustment and roll angle limitation.Zhang et al. [8] proposed a robust fuzzy speed regulator by integrating dynamic surface control and robust fuzzy damping technology, which lost speed in exchange for a smaller roll angle.Corno et al. [9] proposed an optimized sail controller based on the improved extreme search method to keep unmanned sailboats at the best speed in a changing wind.Saoud et al. [10] proposed a method of sail angle control that maximizes speed based on limiting the roll angle, effectively limiting the roll angle in sailing.Deng et al. [11] designed an event-triggered composite adaptive fuzzy control law, which added the roll angle constraint method into the sail control law to prevent unmanned sailboats from capsizing.
The above methods all consider the control of rudder and sail separately and do not consider the synergy between the action of rudder and sail.In order to achieve the comprehensive best effect of the control of an unmanned sailboat, the sail and rudder cooperation provides a new way of thinking.Sun et al. [12] proposed a control strategy for windsurfing navigation based on force polar coordinates.In this algorithm, the sail angle and rudder angle are output through the same control algorithm, and they cooperate with each other to obtain the maximum speed in the course of wind-surfing navigation.However, this collaborative control method is not used for yaw angle control and path tracking.
Collaborative sail and rudder control is required to solve multi-input multi-output control problems as well as to be capable of adapting to the complex nonlinear motion of an unmanned sailboat.MPC is suited to deal with complex nonlinear model problems, allowing one algorithm to simultaneously output rudder control signals and sail control signals.MPC is an optimization control algorithm firstly proposed by Richalet [13] in 1979.It uses the known model and current state quantity to predict the future output of the system and determines the current optimal control target value of the system through online time-domain rolling optimization and feedback correction methods.Gao et al. [14] combined MPC controllers with neural network adaptive controllers for positioning control and tracking optimization of underwater robots.Zhang et al. [15] established a kinematic dynamics model of AUV with six degrees of freedom and proposed a 3D underwater trajectory tracking method for AUV based on MPC.
Inspired by the above research, this paper proposes an MPC-based collaborative control method for the sail and rudder of an unmanned sailboat with the goal of simultaneously controlling the yaw angle and limiting the roll angle.
Based on the four-degree-of-freedom kinematics and dynamics model of the unmanned sailboat, this method converts the problem of yaw angle and roll angle control into an optimization problem with constraints.The constraints include input constraints and state constraints, and then the optimization problem is transformed into a standard convex quadratic programming problem that can be calculated online.When the unmanned sailboat reaches a new state, the optimal input of the next moment is recalculated according to the current state and expected state, and the rolling optimization is carried out according to this cycle.Finally, based on the mature MMG dynamics model and the four-degree-of-freedom kinematics model of the unmanned sailboat, the simulation study verifies the effectiveness of the control method.The innovative aspects of this paper can be summarized as: (1) The tracking of yaw angle and the restriction of roll angle are considered in the control target.It is beneficial to reduce the error of path tracking and is more suitable for the actual motion control of ocean observation unmanned sailboats.
(2) Considering the role of roll angle in the motion control of the unmanned sailboat, the rudder and sail are combined to achieve the control goal by using the multi-input and multi-output characteristics of MPC.
This paper is divided into the following sections.The second section presents the kinematic dynamics model of the unmanned sailboat.The third section presents the MPCbased sail and rudder cooperative control strategy.Simulation results are given in the fourth section.The fifth section provides a summary and an outlook for future work.

Model
Most of the traditional motion control studies consider the motion of an unmanned sailboat as a three-degree-of-freedom planar motion, i.e., only surge, sway and yaw are considered.However, in the actual ocean navigation, an unmanned sailboat will be subjected to wind and waves, and it is more reasonable to describe it by a four-degree-offreedom motion model including the roll angle.

Reference Coordinate System
In order to clearly describe the four-degree-of-freedom motion of the unmanned sailboat, the inertial coordinate system (i-frame) O-XYZ and the appendage coordinate system (b-frame) o-xyz are defined as shown in Figure 1.O is the origin of the inertial coordinate system.OX points due east, OY points due north and OZ is perpendicular to the Earth's surface and points down.The wind direction and boat direction in the inertial coordinate system are in the angular range [0°,360°), with the OX positive direction as 0° and increasing clockwise.o is the origin of the appendage coordinate system.ox points to the bow, oy points to starboard and oz points to the bottom of the sailboat.The wind direction in the appendage coordinate system takes values in the interval [0°,180°], 0° for perfectly upwind and 180° for perfectly downwind.The wind from the starboard side is positive and the wind from the port side is negative.Sail angle is defined as positive for sail to starboard and negative for sail to port.The rudder angle is defined as positive for rudder to starboard and negative for rudder to port.

Kinematic Model
In the inertial coordinate system, x denotes the displacement in the X-axis direction, y denotes the displacement in the Y-axis direction and ψ denotes the yaw angle.ψ is 0° in the positive direction of the Y-axis and increases clockwise, 0 ≤  < 2π.ϕ denotes the roll angle, − .In the appendage coordinate system, u denotes the velocity in the xaxis direction, v denotes the velocity in the y-axis direction, r denotes the yaw angle angular velocity and p denotes the roll angular velocity.
In this paper, a four-degree-of-freedom kinematic model considering the roll angle is used: where ̇ denotes the velocity in the -axis direction, ̇ denotes the velocity in the -axis direction,  ̇ denotes the angular velocity in the yaw angle direction and  ̇ denotes the angular velocity in the roll angle direction.The wind observed in the inertial coordinate system is the true wind.The true wind speed is defined as   and the true wind direction is defined as   .The wind observed in the appositional coordinate system is the apparent wind.The apparent wind speed is defined as   and the apparent wind direction is defined as   .V is the actual speed of the sailboat and satisfies  2 =  2 +  2 , where V,   and   satisfy the vector triangle.The sail angle   is defined as the angle between the chord of the sail and the longitudinal axis of the sailboat.The angle of attack   is defined as the angle between the apparent wind and the chord of the sail, satisfying   =   −   , and the rudder angle is defined as   .

Dynamics Model
The dynamics model uses the MMG model proposed by the Ship Manoeuvring Mathematical Model Group of the Japan Towing Tank Committee (JTTC) [16].The MMG model is a well-established model of sailboat dynamics built according to the physical sense.Its main feature is the decomposition of the hydrodynamic forces and moments acting on an unmanned sailboat into hydrostatic resistance, additional resistance on the hull, rudder force and sail force.In addition, the forces and moments coupled between them are also considered.
Based on the MMG model, the dynamics model of the unmanned sailboat in this paper can be expressed as: { (̇−  ̇) =   +  ℎ +   +   (̇+  ̇) =  ℎ +   +   (  +   ) ̈=  ℎ +   +   +   (  +   ) ̈=  ℎ +   +   (2) where  ̈ denotes the angular acceleration of the yaw angle,  ̈ denotes the angular acceleration of the roll angle,   denotes the rotational inertia around the x-axis in the attachment coordinate system,   denotes the additional rotational inertia around the x-axis in the attachment coordinate system,   denotes the rotational inertia around the z-axis in the attachment coordinate system and   denotes the additional rotational inertia around the z-axis in the attachment coordinate system.  denotes the residuary resistance of hull. ℎ ,  ℎ ,  ℎ and  ℎ denote the force and moment from additional hull resistance, and they can be expressed as where denote the hydrodynamic coefficient of additional hull resistance. ′ denotes the sine function of the drift angle. ′ = , and  denotes drift angle.  denotes the speed of the sailboat, and   = √ 2 +  2 . denotes the length of the sailboat. denotes the draft of the sailboat.  ,   ,   and   denote the force and moment on the rudder, and they can be expressed as where   ,   ,   and   denote the rudder force coefficient. denotes rudder angle.  denotes the angle of attack of the rudder, and   = δ + β.   denotes the restoring moment of initial stability, and it can be expressed as where  denotes the mass of the sailboat,  denotes gravitational acceleration and  ̅̅̅̅̅ denotes initial stability height.Among them, this paper focuses on the forces and moments acting on the sail, with particular attention to the roll moments of the sail.  ,   ,   and   denote the forces and moments on the sail, and they can be expressed as where   denotes the sail longitudinal thrust coefficient,   denotes the sail transverse thrust coefficient,   denotes the density of air and   denotes the wind area of the sail.   and    denote the coordinates of the sail force point relative to the center of gravity.The longitudinal and lateral thrust coefficients of the sail are determined by the dynamic coefficient, drag coefficient and relative wind angle of the sail itself.The dynamic coefficient and drag coefficient of the sail are obtained from the sail test.They can be expressed as where   denotes the power coefficient of the sail and   denotes the drag coefficient of the sail.

Collaborative Control Strategy
MPC is a control strategy based on numerical optimization, which designs a system model to predict future control inputs and future state responses.MPC has a good theoretical basis.It optimizes the state response of the system at each cycle interval by calculating the sequence of future system input adjustments.By minimizing the cost function, the optimal control input sequence for the next N sampling interval is obtained.When solving optimization problems, input constraints and state constraints can be explicitly dealt with to improve the robustness of the system.The main characteristics of MPC are rolling optimization and feedback correction, which can effectively reduce the error in the closed-loop system.Therefore, the MPC control system can achieve good stability, optimality and robustness.
The unmanned sailboat kinematic model (1) and dynamics model (2) correspond to eight nonlinear functions, denoted as  1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 .We define the state quantities as  = [       ]  in the inertial coordinate system.We define the control quantities as  = [    ]  in the appendage coordinate system.The nonlinear equation of the kinematic and dynamics model can be written as: In this paper, the state quantities we want to control are the yaw angle  and the roll angle , so we define the output quantities as  = [ ]  , satisfying  = , where  = [ 2 * 2  2  2 * 4 ].We assume that the desired yaw angle   and the desired roll angle   are known in advance.The desired output quantities can be expressed as   = [    ]  .Let the target state quantities be   = [                ]  .From  = , we can deduce that   =   .From   =   , we can deduce that the target state quantities are   =  +   , and  + is the pseudo-inverse matrix of .From  ̃=  −   , which represents the increment of the output quantities, then we obtain the increment of state quantities:  ̃=  −   .The desired sail angle   and the desired rudder angle   can be calculated from the desired yaw angle, roll angle and real-time motion state.We define the desired control quantities as   = [    ]  , and define the quantities vector increment as  ̃=  −   .
The controller design is divided into the following steps: prediction, constraint conditions, optimization and rolling time domain optimization.

Prediction
This part is the key step of model predictive control.Through the kinematics and dynamics model of the unmanned sailing boat and the current state quantity, the output quantity for the limited time in the future can be predicted.
The inputs of this part are target yaw   , target roll   and apparent wind angle   .Through the target yaw   and apparent wind angle   , the optimal sail angle strategy can calculate the desired sail angle   .The desired rudder angle   is usually set to 0. From   = [    ]  , we can calculate   .From   = [    ]  , we can calculate   .From   =  +   , we can calculate   .According to the sailboat state vector  and control vector  measured by the sensor,  ̃ and  ̃ can be calculated.
We generate the prediction matrix for the state volume increments: where We define the predicted output vector as  ̃ .

Constraint Conditions
In actual unmanned sailboat sailing, both the sail controller and rudder controller have their own action limits, i.e., upper limit   and lower limit   .The range of the sail angle can be adjusted 0~90°, so the lower limit of the sail angle is 0 and the upper limit is 90°.The limit of both left and right rudder angle actions is 35°, so the lower limit is −35° for the left full rudder and the upper limit is 35° for the right full rudder.The upper limit vector is   = [ 90 °35 °] and the upper limit vector is We define the predictive control vector (), and () satisfies the following   ≤ () ≤   , where and . We define the control vector increment  ̃() , with  ̃() satisfying   −   () ≤  ̃() ≤   −   () , where

Optimization
The inputs of this part are the state quantity prediction matrix  ̃() and control quantity prediction matrix  ̃(k),  ̅ (),  ̅ () and (k).The cost function of MPC-based sail and rudder collaborative control contains the output quantity deviation and the control quantity deviation, which are defined as follows: where   denotes the weight of the output quantity in the cost function and   denotes the weight of the control quantity in the cost function.Since  =  and  =  + ,  + is the pseudoinverse matrix of  .From   =      =  +    , we can derive . By expanding the formula, we can have where ] can be simplified as: where (k) = 2( ̅  () ̅   ̅ () +  ̅  ) and () = 2 ̅  () ̅   ̅ ().

Rolling Time Domain Optimization
Since there are inevitable errors in the system modeling and errors in the first-order Taylor expansion of the system equations, the MPC control algorithm selects only the first set of control vectors  ̃ * () at a time for output.The  ̃ * () selects the first and second elements of  ̃ * (), where  ̃ * () = [  ̃ * () [1]  ̃ * () [2] ].Waiting until the next time step and then recalculating the new control vector based on the feedback state quantity combined with the target state quantity to form a rolling time-domain optimization is as follows: where  * () = [   * ()   * () ].

Controller Design Diagram
The controller design process for collaborative MPC control of the sail and rudder of the unmanned sailboat is shown in Figure 2. The controller design process for collaborative MPC control of the sail and rudder of the unmanned sailboat is shown in Figure 2. The yellow arrow represents the external input quantity, the blue arrow represents the process quantity and the red arrow represents the feedback quantity.The core part of the controller includes prediction, constraint conditions and optimization.The prediction part reads the state quantities increment  ̃() and the control quantities increment  ̃(), and calculates the prediction matrices  ̃(),  ̃(k),  ̅ () and  ̅ () based on the known dynamics model and kinematics model of the unmanned sailboat.Based on the known upper and lower limits of sail angle and rudder angle, combined with the desired control matrix   (k), the constraint conditions part calculates (k).The optimization part reads the prediction matrices and constraint conditions and converts them into a standard convex quadratic programming problem.By solving the quadratic programming problem, the optimization part calculates the optimal control quantities increment  ̃ * ().The controller selects the first set of values as the output sail angle   * () and rudder angle   * ().At the end of a time step, the calculation is repeated through feedback to achieve rolling optimization.

Algorithm
The Algorithm 1 in the following table is the process of collaborative MPC control of the sail and rudder of the unmanned sailboat.

Simulation Results
In this section, the MPC-based sail and rudder collaborative control method of the unmanned sailboat is verified by simulation.The simulations were conducted on a desktop computer equipped with an AMD Ryzen5 3.6 GHz processor, using a simulator developed on the Simulink platform based on Matlab R2021a.The first simulation compares the control effect of MPC-based sail and rudder collaborative control with MPC-based separation control during sidewind sailing.The second simulation compares the sailing effect of the above two methods in a four-point sailing simulation experiment in a constant wind field.
The hydrodynamic and aerodynamic parameters of the unmanned sailboat used in the simulation are derived from the Fujin-class unmanned sailboat in the paper [17].The specific parameters involved are shown in Table 1.Each basic parameter of the MPC algorithm is as follows: sampling time T=0.5 s, number of prediction steps n=10, output weight matrix   = (  ,   ) and control weight matrix   = (  ,   ).According to the MPC parameter selection method, a set of weight coefficients with a better control effect is selected among multiple reasonable sets of weights.The output weight matrix   = (1,2) and the control weight matrix   = (0.1,1)are selected for the sail and rudder collaborative control.Since the variation range of the yaw angle is 0~360 ° and the variation range of the roll angle is −90 °~90 °, the yaw angle weight: roll angle weight=1:2.The variation range of the sail angle is 0 °~90 °, and the variation range of the rudder angle is −35 °~35 °.The control weight of the sail angle should be reduced appropriately since the sail angle should take the optimal thrust sail angle as a reference.Set sail control weight: rudder control weight=0.1:1.The flow and parameters of the MPC control algorithm used for separating the control rudder angle are the same as those of collaborative control, but the roll angle part is discarded in the model.The separated control output vector only contains the yaw angle, and the control weight is set as   = [1],   = (0.1,1).The sail angle of the separation control adopts the traditional maximum thrust method, which means that the sail angle of the optimal thrust is selected according to the relative wind angle.The simulation flow of the two control methods is shown in Figure 3.

Comparison of Sail-Rudder Collaborative and Separation Control
The challenge of unmanned sailboat control comes from sidewind sailing, because the roll angle of an unmanned sailboat is the largest when sailing in side wind.When sailing in side wind, the sail lateral force and roll moment are also larger, so the yaw angle control is challenged to some extent.Therefore, a comparison experiment between collaborative control and separation control is carried out for 90° positive sidewind sailing to better visualize the difference between the two control algorithms.The schematic diagram is shown in Figure 4a.The initial yaw angle  is set to 180°, the initial roll angle  is 0°, the initial longitudinal speed  is 2 m/s and the desired yaw angle   is set to 90°.The wind direction is constant as   = 180 °, and the wind speed is gradually increasing:  From Table 2 below, we can see that the roll angle of the collaborative control is smaller than that of the separation control under different wind speeds.In the 90° sidewind sailing, the collaborative control achieves better roll angle control compared with the separation control.Since it is difficult to achieve no error in the yaw angle for positive sidewind navigation, the steady-state error of the yaw angle is adopted as the evaluation index.The smaller the steady-state error is, the better the control effect is.From  = ∫  , it can be seen that the yaw turning angle generated by the rudder is ∫  .The larger the roll angle  is, the larger the yaw angle  error is.From Figure 5a, we can see that the yaw angle of collaborative control converges faster in 0-50 s with a wind speed of 3 m/s, the yaw angle converges in about 24 s and the steady-state error is 6.07°.However, the separation control converges to a stable yaw angle at around 47 s, and the steady-state error is 11.65°.The steady-state error of the yaw angle under different wind speeds is shown in Table 3 below.It is proved that the collaborative control considering the roll angle has a better yaw angle control effect than the separation control without considering the roll.It can be seen from Figure 5a that in the 90° sidewind sailing, the dynamic characteristics of collaborative control are better than that of separate control for yaw angle control.This is because the sail also takes part in the turning action of the sailboat during the collaborative control.However, the separation control can only output the sail angle of the optimal thrust according to the real-time relative wind angle, which does not help the sailboat to turn.In the Figure 5b,   represents the yaw moment generated by the wind acting on the sail.As shown in Figure 5b, the   controlled by the collaborative control is larger than that of the separated control at 0~12 s.The average sail yaw moment   of the collaborative control is 117.04N*m, while the average sail yaw moment   of the separated control is 29.68 N*m.By (  +   ) ̈=  ℎ +   +   , it can be seen that the acceleration of the yaw angle at 0~12 s for the collaborative control is greater than that of the separation control.It shows that the sail in the collaborative control participates in the steering action of the sailboat and provides the moment for the sailboat to steer, which contributes to the rapid convergence of the yaw angle to some extent.
As seen in Figure 6a,b, the longitudinal velocities of the collaborative control and the separation control keep increasing and do not converge within 0~50 s, and the difference between the longitudinal thrust   of the two sails is not significant at this time.At 50~100 s, the longitudinal thrust   of the separated control is 963.

Comparison of Sail-Rudder Collaborative and Separation Lateral Shift
In the sailing of the unmanned sailboat, the force of wind can be decomposed into the transverse and longitudinal directions of the hull, so the sailboat must move sideways.This situation is especially obvious when sailing in the side wind, which will make the sailboat deviate from the predetermined path.This is also the main reason for the poor tracking accuracy of unmanned sailboats.In collaborative control, since the set sail angle does not follow the optimal thrust sail angle, the sail angle will be greater than the optimal thrust sail angle.At the same wind angle, the angle of attack will decrease when the sail angle increases.The reduction of the angle of attack will reduce the lateral displacement force in addition to the longitudinal driving force, which can reduce the lateral displacement to a certain extent.
The forward thrust of the sail can be expressed as   =    2  *   This proves that the collaborative control can limit the lateral displacement of the unmanned sailboat to a certain extent.The reason for this can be seen in Figure 9, where the lateral thrust of the separation control is always greater than that of the collaborative control.As shown in Figure 11b, during the whole navigation process, the total lateral shift of separation control is 16.74 m, while the total lateral shift of collaborative control is 8.46 m.As the lateral shift is smaller, the collaborative control reduces the lateral deviation from the target path and achieves a better path tracking effect.
The four-point navigation path diagram is shown in Figure 12.The target area is marked by a red dashed circle.The target path is marked by a blue dashed line.The green solid line is the path navigated by the collaborative control algorithm.The brown solid line is the path navigated by the separation control algorithm.It can be clearly seen that the collaborative control can obtain more accurate path tracking compared with the separation control.The first path is defined as from target point IV to target point I.The second path is defined as from target point I to target point II.The third path is defined as from target point II to target point III.The fourth path is defined as from target point III to target point IV.The straight-line distance between the real-time path point and the target path of the sailing boat is defined as the side-shift deviation, and the maximum side-shift deviation and average side-shift deviation of the sailing boat in the four segments of the path are calculated.The results are shown in Tables 5 and 6.It can be seen that the maximum and average deviations of separation control are larger than those of collaborative control in each segment of the path, mainly because collaborative control has better yaw control and a better side-shift limiting effect than separation control.
The time to reach the target point using the collaborative control and the separation control is shown in Table 7.Since the separation control has a longitudinal speed advantage compared with the collaborative control, the collaborative control is 11.14 s slower than the separation control at the end of the four-point navigation, which is a loss of 4.8%.The speed advantage of the separation control is not obvious, and it is worthwhile to lose a little speed for more accurate path tracking.From Figure 13, it can be seen that the roll angle of the collaborative control is basically smaller than that of the separation control during the whole sailing process.It can be seen from Figure 14 that the sail angle of collaborative control is greater than the sail angle of separate control during the whole navigation process.This is because the separation control uses the optimal thrust sail angle.In order to achieve better yaw angle control and roll angle limitation, the collaborative control increases the sail angle based on the optimal thrust sail angle.The angle of attack decreases with the increase in sail angle, resulting in the reduction of the lateral component of the sail and the reduction of the roll moment.Therefore, the collaborative control has achieved a better control effect with smaller roll angle and better lateral displacement limitation.

Conclusions
This paper considers the coupling relationship between the sail and rudder of the unmanned sailboat and proposes a collaborative control method of the sail and rudder of the unmanned sailboat based on MPC.This algorithm can control the yaw angle and limit the roll angle at the same time.First of all, the four-degree-of-freedom kinematics and dynamics model of the unmanned sailboat is established, and the problem of heading angle and heeling angle control is transformed into an optimization problem with constraints.Secondly, considering input constraints and state constraints, the optimization problem is transformed into a standard convex quadratic programming problem that can be calculated online.Finally, when the unmanned sailboat reaches a new state, the optimal input at the next moment is recalculated according to the current state and expected state, and the rolling optimization is carried out according to this cycle.By comparing the collaborative control with the separation control through simulation experiments, it is proved that the collaborative control can achieve a smaller steady-state error of the yaw angle and smaller roll angle than the separation control.Collaborative control can also achieve smaller side shift limitation and a better path tracking effect in four-point navigation.

Figure 1 .
Figure 1.Coordinate system of the unmanned sailboat.

Figure 2 .
Figure 2. The controller design process diagram.

Figure 3 .
Figure 3. (a) Flow chart of collaborative control; (b) Flow chart of separation control.
The comparison of the roll angle of the sidewind sailing experiments is shown in Figure4b.

Figure 5 .
Figure 5. (a) Comparison curves of yaw angle error for sidewind navigation; (b) Comparison curves of sail angle and turning yaw moment for sidewind sailing.

Figure 8 .
Figure 8.Comparison curves of lateral speed and lateral displacement for sidewind sailing.

4. 3 .
Four-Point Navigation Comparison SimulationThe simulation compares the collaborative control and separation control in fourpoint navigation.As shown in Figure10, four target points are set, and the sailboat starts at (0,0) and passes target point I:(100,100), target point II:(0,200), target point III:(−100,100) and target point IV:(0,0) in turn.The LOS guidance method is used for the yaw angle guidance.It is stipulated that when the sailboat enters the area with the target point as the center and 10 m as the radius, it is regarded as reaching the target point and starts to turn to the next target point for navigation.The initial yaw angle of the unmanned sailboat is 315°.The initial roll angle is 0°.The initial longitudinal speed is u=2 m/s.The wind direction and wind speed are as follows:   = 270 ° and   = 3 m/s.The collaborative control weights are set as follows:   = (1,2) and   = (0.1,1).The separation control weights are set as follows:   =[1] and   = (0.1,1).

Figure 10 .Figure 11 .
Figure 10.Schematic diagram of four-point navigation.The longitudinal velocity comparison between collaborative control and separation control during four-point navigation is shown in Figure11a.The average longitudinal velocity of separation control is 2.65 m/s, and the average longitudinal velocity of collaborative control is 2.35 m/s, with a 12% velocity loss.

Figure 13 .
Figure 13.Comparison curves of roll angle of four-point navigation.

Figure 14 .
Figure 14.Comparison curves of sail angle and rudder angle of four-point navigation.

Table 2 .
Roll angle of the collaborative control and separation control.

Table 3 .
Yaw error of the collaborative control and separation control.

Table 4 .
Lateral speed and lateral displacement of the collaborative control and separation control.

Table 5 .
Maximum deviation of the collaborative control and separation control.

Table 6 .
Average deviation of the collaborative control and separation control.

Table 7 .
Time of arrival at each point of the collaborative control and separation control.The roll angle of the two control methods are shown in Table8.

Table 8 .
Maximum roll angle and average roll angle of the collaborative control and separation control.