Adaptive Auto-Berthing Control of Underactuated Vessel Based on Barrier Lyapunov Function

: This paper investigates the automatic berthing problem of underactuated surface vessels in the case of uncertain dynamics and yaw rate limitation, given the importance of yaw rate control and the unmeasurable hydrodynamic parameters of the vessel at low speeds. First, we use the differential homeomorphism coordinate transformation to solve the problem of underactuation. Second, a radial basis function network (RBF) is introduced to approximate unknown nonlinear functions. Third, we apply the barrier Lyapunov function (BLF) approach to limit the yaw rate within a safe range. Fourth, we use dynamic surface control (DSC) technology and minimum learning parameters (MLP) to tackle the differential explosion problems in backstepping and computational complexity. Finally, Lyapunov stability theory proves that signals produced by the designed control scheme are bounded and effective. The simulation results show that, compared with the control scheme without BLF, the proposed method can effectively limit the yaw rate within a speciﬁc range and effectively solves the inﬂuence of the model uncertainly.


Introduction
Generally, vessels berth with the assistance of thrusters or tugs. However, most ships sailing at sea are only equipped with main propellers and rudder devices, while some ships are equipped with either two independent aft thrusters or one main aft thruster and a rudder without any bow or side thrusters. The insufficient force on the sway direction makes it difficult to control the vessel, especially when berthing at a low speed. Therefore, solving this problem will help save investment and construction costs, reduce the weight of the system, and increase its flexibility and operating reliability during the design process of the ship [1,2]. Researchers usually regard the underactuated vessel mentioned above as a multi-input multi-output underactuated system [3].
Solving the problem of underactuated vessel auto-berthing means stabilizing the ship at the pier by controlling its rudder and propeller. During this process, precisely controlling the vessel's position and speed is the key to realizing safe berthing, especially the speed control. Due to the massive inertia of the ship, excessive speed margin will cause huge damage to the wharf and hull. Therefore, limiting the yaw rate within a certain range during berthing will be meaningful. Meanwhile, the underactuated vessel system will be affected by dynamic uncertainty due to low-speed ships, diving effects, and quay wall effects. Accurately estimating the dynamic uncertainty of the vessel motion system will bring the model closer to reality and make the test results more referential.
Intelligent algorithms, classic control, and a combination of the two are the most common way to tackle the problem of underactuated vessels auto-berthing. In terms of the intelligent algorithms, Artificial Neural Network (ANN) and Proximal Policy Optimization (PPO) [4] are already used in auto-berthing research. As for the former, the training data are usually obtained manually by controlling the ship to a specific pier in advance and training the weights and biases of the ANN, which could help realize auto-berthing control in a specific wharf [5]. However, this method cannot achieve vessel auto-berthing control in different ports without training data. To solve this problem, the works in [6,7] use coordinate conversion controller switching technology and a distance measurement system and controller with ship sub-routes to tackle the problems of geographic coordinate limitation, measurement accuracy, and repeated network training and improve the adaptability of ANN berthing controllers.
In terms of the classical control methods, the auto-berthing problem tends to be classified as a stabilization control problem, i.e., to design a control scheme that makes the vessel stable in a certain position and state. Direct Liapunov method [8,9] and sliding mode control [10] are the most common methods applied to realize auto berthing. In [8], an auto-berthing controller based on concise backstepping was proposed. Bu [10] designed a dynamic feedback controller and applied the recursive decomposition iterative method to tackle the underactuated vessel control problem. However, classical control theories are all based on the precise model of the controlled object. Thus, when the vessel berths at a low speed, the underactuated vessel system is affected by dynamic uncertainty.
In summary, whether intelligent algorithms are applied to implement ship berthing controllers or simple classical control methods are limited by the need for accurate mathematical models of ships, offline data training, or data consistency issues will occur, thus causing certain limitations to the engineering application of the controller. Therefore, researchers have been trying to combine the advantages of the two methods, which mainly focus on the control itself and berthing path planning. From the perspective of ship berthing control, in [11], proportional derivative (PD) control was introduced into the ANN berthing controller designation to tackle the problem of training data consistency during auto berthing. In [12], controllers are proposed that realized ship auto-berthing in a turn-around way and solved the dynamic uncertainty with RBF. From the perspective of berthing path planning, a controller based on Immune Memory-Particle Swarm Optimization (IM-PSO) is proposed to optimize the proportional integral derivative control parameters of berthing path tracking [13]. An extended dynamic window approach for the automatic berthing of underactuated surface vessels [14] could realize the automatic berthing under the influence of wind loads and obstacles. Han [15] introduced a layered artificial potential field method to the berthing trajectory planning to tackle the problem of excessive turning of the berthing trajectory. The research mentioned above mainly focuses on the steady-state characteristics of the underactuated vessel motion control system but pays less attention to the transient performance, which might cause a collision with nearby vessels as discussed in [16]. Dai et al. [17] pointed out that when a ship is operating in a narrow waterway, the force will change. The system state will be restricted, i.e., the output or state of the ship is not allowed to exceed a certain constraint distance of the reference trajectory path, which is similar to a finite time control method [18] proposed based on barrier Lyapunov function realized course keeping to improve control performance significantly. Tee, K.P., et al. [19] used barrier Lyapunov to tackle the problem of restricted location during berthing. With the full-drive system with state constraints or output constraints as the research object [20], the barrier Lyapunov function is used to reach infinity when its parameters are close to the constraint boundary, and stable control of the constraint system is realized. However, the above research does not involve the attempt to limit the speed in automatic berthing, which is very important for safe berthing.
Given the above, this paper focuses on solving the auto-berthing of underactuated surface vessels in the presence of uncertain dynamics and yaw rate limitation. The differential homeomorphism transformation approach is applied to convert the vessel to a cascade form. The RBF network estimates the unknown nonlinear functions. Furthermore, a filter based on dynamic surface control (DSC) is constructed. An auto-berthing control scheme is derived by combining minimum learning parameters technique (MLP), RBF, DSC, and applying the BLF method. The Lyapunov theory proves the stability. The significance of this paper can be summarized as follows.
(1) A novel auto-berthing control scheme considering BLF is proposed to successfully restrict the yaw rate within a smaller range during ship berthing, which has essential safety significance for real ship berthing. (2) The vessel model dynamic uncertainty caused by underactuation has been fully solved using the RBF. This is compared with the research in [8] that, without considering vessel model dynamic uncertainty, showed that an adaptive control scheme based on RBF can effectively approximate the unknown term and keep the output bounded.
The rest of this paper is organized as follows. The Section 2 is the preliminary introduction. The Section 3 introduces the process of the underactuated problem of the ship motion model with uncertain dynamics. The Section 4 presents the design of the automatic berthing controller using the BLF, RBF, DSC, and MLP. The Section 5 shows the simulation results and discussion. The last part presents conclusions and prospects for further research. For

Preliminaries
is asymmetrical barrier Lyapunov function, in which, Υ a and Υ b are constraint value of output error e, r c andῩ c are the constraint value of the control systems' output satisfies Lemma 1 ([14]). For any error variable |e| < Υ b , Υ b ∈ R is a positive constant, and the following inequality (1) holds.
Lemma 2 ([18]). For any constant Υ b1 , let S i : is open set, consider the following system (2): where η = [w, e 1 ] τ ∈ N is state value of the system, h : R + × N → R l+1 is piecewise continuous function about t and satisfies local Lipschitz condition, l is a positive integer. For |e i | → Υ b1 , the following inequality (3) holds: where γ 1 and γ 2 are K ∞ functions. U : R l → R + and V i : e i → R + , i = 1, · · · , n are continuously derivable and positive trigonometric functions. Let V(η) = ∑ n i=1 V i (e i ) + U(w) and e i (0) ∈ S i . If the following inequality holds:V where η ∈ N, µ and λ are positive constants. Then, for ∀t ∈ [0, ∞), e i (t) ∈ S i .

Lemma 3 ([21]
). For compact set X ⊂ Ω x ∈ R n → R, there must be an RBF that makes the following equation true.
where F(X) is a continuous nonlinear function. ω * = [ω 1 , ω 2 , · · · ω l ] T is an ideal matrix that represent the weights of the RBF, S(X) = [S 1 (x), S 2 (x) · · · S l (x)] T is the matrix of activation function. S i (x) is the Gaussian kernel function, and S i ( . ε is the matrix of the approximation error. where f (0) = 0. If there is a scalar function V(x) with continuous first derivative, V(0) = 0, and for all non-zero points x in the state space X the following conditions are satisfied: Then, the original equilibrium state of the system is asymptotically stable in an extensive range. In the process of the controller design, the following assumptions are made for the desired value of the system.
is the disturbance upper bound, and all of them are normal numbers.

Problem Formulation
In general, the three degrees of freedom (3-DOF) underactuated marine surface vessel motion model can be described as in [24], as shown in Figure 1.
where x, y, ψ-denotes the vehicles' position and heading. u, v, r denotes the surge, sway, and yaw velocities in the body-fixed frame. τ u , τ r denotes the actual input vector.
To solve the underactuated problem of the marine surface vessel model, the following differential homeomorphism transformation is introduced [25]: Taking the time derivative of Equation (8), one can geṫ J(ψ) satisfies the following properties: where Furthermore, the mathematical model of underactuated marine surface vessel after differential homeomorphism transformation can be obtained as (11) can be written as Further, convert system Equation (12) into a chain structure system by introducing the following variable substitution and feedback transformation [26]: Next, Let (14) can be described as As Equation (15) is converted from Equation (11), so if the stability of the system Equation (15) and system Equation (11) are same. In other words, when t → ∞, if lim t→∞ z i = 0(1 ≤ i ≤ 6), (x, y, ψ, u, v, r), will gradually stable at the origin. (15), when t → ∞, if z i (i = 2, 5, 6), converges to zero, we have lim t→∞ z i = 0(i = 1, 4) Then, Equation (14) can be simplified as

Controller Design and Stability Analysis
The control design will be divided into two subsystems: subsystem 1 and subsystem 2. Subsystem 1: Subsystem 2: where α op is the virtual filtering function DSC is introduced to the control design to eliminate the differential explosion.
where α 1 and α op are the input and output of the filter, respectively. The filtering error is defined as Taking the derivative of both sides of Equation (23), one can geṫ where Γ 1 (x 1 , x 1d ,ẋ 1d ,ẍ 1d ) = −α 1 is continuous, bounded, which will be abbreviated as Γ 1 in subsequent articles and |Γ 1 | ≤ L 1 .
Define the Lyapunov equation as Taking the derivative of both sides of Equation (25), one can obtaiṅ Design the virtual control scheme as α 1 = −k 1 e 1 +ẋ 1exp . Define the second Lyapunov equation as Then, According to Lemma 3, using RBF to estimate unknown nonlinear functions − ∆ f r m 33 as follows: where ω * T r is the ideal weight matrix, S r (v) is the activation function of RBF, theṅ The control scheme of subsystem 1 is designed as where α 2op is the virtual filtering function Here, we introduce DSC to the control design to eliminate the differential explosion.
where α 2 and α 2op is the input and output of the filter, respectively. The filtering error is defined as Take the derivative both side of of Equation (35), one can geṫ where Γ 2 x 3 , x 3exp ,ẋ 3exp ,ẍ 3exp = −α 2 is continuous, bounded, which will be abbreviated as Γ 2 in subsequent articles, |Γ 2 | ≤ L 2 .
Define the third Lyapunov equation as Then, take the derivative both side of Equation (37), one can obtaiṅ Design the virtual control scheme α 2 = −k 3 e 3 x 2 +ẋ 3exp x 2 theṅ Define the forth Lyapunov equation as Take the derivative both side of Equation (40), one can geṫ Substituting Equations (43) and (44) into Equation (42), one can geṫ The control scheme of subsystem 2 is designed as Overall, the following underactuated marine surface vessel automatic berthing control scheme is designed as

Stability Analysis
For the underactuated vessels steering motion model Equation (7), under Assumptions 1-3, by design the control scheme, and choose the design parameters, the vessel can finish berthing task and the proposed control protocol can sure that 1. all signals of the closed-loop system are bounded, 2. the constrained state variables do not exceed the constraint bounds, and 3. the tracking error signal can converge to an arbitrarily small neighborhood of the origin when appropriate design parameters are chosen.

Simulation
In the simulation studies, model vessel named "Cyber ship I" is used to verify the effectiveness of the proposed control scheme. The parameters of "Cyber ship I" can be found in [29]: m = 17. In addition, to verify the effectiveness of the control scheme designed in this paper, a comparison is made between the adaptive control considering BLF and the adaptive control without BLF. The adaptive control scheme without BLF is listed in Equation (62). The initial states of the vessel model system setting are taken to be the same as the control scheme designed in this paper, and the parameters are k 1 = 2.8, k 2 = 0.08, k 3 = 7.5, k 4 = 1.5, c 1 = 0.018, c 3 = 0.001. The result of the simulation is shown in Figures 2 and 3.
(62) Figure 2 shows the trajectory comparison of the vessel with control scheme Equation (49) and control scheme Equation (62). It can be seen from this graph that both schemes helped the vessel realize berthing successfully. , it can be seen that the vessel controlled by the control scheme (49) reaches a stable position in 26 s, and the value of r is within (−0.15 rad/s − 0.15 rad/s) during the whole process, while the yaw rate of vessel controlled by the control scheme Equation (62) exceeds 0.15 rad/s at around 0.16 s and reaches its peak value of 0.35 rad/s at around 0.6 s. Obviously, from the comparison result of the yaw rate, it can be seen that the control scheme with BLF can better limit the yaw rate within a certain range which verifies the effectiveness of our proposed control scheme. Figure 3c illustrates the curves change of force and control force moment. It can be seen from the simulation image that the surge control force with control scheme Equation (49) changes sharply increase from −959.8 N to 869.2 N and then gradually stabilize at 0 N in 10.9 s. The yaw control force moment changes from −1089 Nm to 22.97 Nm within approximately 2.4 s and gradually decreases to 0 Nm at 11.83 s. In contrast, the simulation image that the surge control force with control scheme Equation (62) changes from 4653 N to −10 N in 6.5 s and gradually stabilizes at 0 N. The yaw control force moment reaches a peak value of 127 Nm at around 1.78 s and gradually decreases to 0 Nm at 9.7 s. The change of control force and torque is reasonable and bounded, which shows the effectiveness of the control rate designed in this paper. Figure 3d shows the change of the adaptive parameters. It can be seen from the figure that the adaptive parameters are bounded and stable. In short, it can be seen from Figures 2 and 3 that the control scheme designed in this paper can effectively limit the yaw rate in a particular range, which meets the project's needs.
In order to further verify the robustness of the control scheme, under the condition that the initial state of the ship and the design parameters of the control scheme remain unchanged, the bounded disturbance is selected for simulation test, and the disturbance vector is selected as 0.05 * [sin(1.5 * π * t + π/6); cos(0.2 * π * t − π/4); sin(0.3 * π * t + π/3)]. Figures 4 and 5 present the simulation results, which are used to analyze the control performance and system robustness.   It can be seen that in the case of interference, the berthing speed curve can still be stabilized within a small range. It is very close to the curve without interference, indicating that the system has certain robustness. Figure 5c illustrates the curves change of force and control force moment of the vessel controlled by control scheme Equation (49) without disturbance and control scheme Equation (49) with disturbance. It can be seen from the image that the surge control force, which is indicated by a blue line, sharply increases from −2789 N to 876.7 N and then gradually stabilizes in a small bounded range between −0.01 N to 0.01 N after approximately 12 s. The yaw control force moment changes from −1089 Nm to 22.73 Nm within around 2.94 s and gradually decreases the small bounded range between −0.014 Nm to 0.014 Nm. Figure 5d shows the change of the adaptive parameters. It can be seen that the (with disturbance indicated by a blue line) reaches 0.367 and keep it steady after 9.93 s, which is a little higher as compared to that without disturbance. Under the influence of disturbance, it begins to fluctuate and stabilizes in a small bounded range between 1.58 × 10 −5 to 4.29 × 10 −6 . In short, it can be seen from Figures 4 and 5 that under the disturbance, The control scheme still shows good performance when vessel berthing.
Furthermore, simulation is done between different original statuses with the same control parameters. In this study, different initial conditions of ship position and heading angle. In simulation, the initial states are taken as x(0) = −8 L, y(0) = −5.78 L, ψ(0) = π/4, u(0) = 0.2 m/s, v(0) = 0, r(0) = 0. Figures 5 and 6 show the simulation results. It can be seen that the berthing task is successful with the new initial position. Figure 7a shows that the lateral position reaches the desired position x = 0 at 15.58 s, and the longitudinal position reaches the desired position y = 0 at 14.59 s. Figure 7b illustrations that the yaw rate does not exceed the limitation. Figure 7c shows the curves change of control force and control force moment of the vessel with new initial states. It can be seen from the portrait that the surge control force with new initial states increases from −1.731 N to 609.3 N and then gradually stabilizes at 0 N in 10.1 s. The yaw control force moment changes from −816.8 Nm to 9.614 Nm within around 2.7 s and gradually decreases to 0 Nm at 9.4 s. Figure 7d shows that the adaptive control schemes are all bounded and stable, which proves the effectiveness and practicability of the control scheme designed in this paper.  We clearly illustrate the effectiveness of the proposed control rate in Table 1.

Conclusions
The BLF-based auto-berthing control scheme has been proposed for an underactuated vessel system with 3-DOF considering model uncertain dynamics and yaw rate limitation. The control design applies a differential homeomorphism transformation approach to convert the vessel to a cascade form to solve the underactuated problem. An auto-berthing control scheme is derived based on the backstepping framework, combining BLF, RBF, MLP, and DSC methods. By applying RBF, the uncertain factors affected by the low speed, shallow water, and quay-wall effects are efficiently approximated. Furthermore, a DSC filter is constructed to avoid the differential explosion, and MLP is adopted to improve calculation efficiency. Compared with the auto-berthing control scheme without considering BLF, this method successfully stints the yaw rate in a relatively small range. The Lyapunovbased theoretical analysis indicates that all signals under the proposed auto berthing control scheme are bounded.
However, the proposed method does not solve the problem of the general applicability of the port, and it can only realize automatic berthing from a specific location. In addition, this study does not consider input nonlinearities that may lead to input saturation, hysteresis, dead zones, the effect of communication loads on the system, sway-yaw coupling of vessel model, and tests on actual vessels. The above aspects will be considered in the automatic berthing control design in the future.