# Switched Finite-Time Source Seeking of an Underactuated Ship

Authors: Yiwen Yang; Jingming Zhang; Yingjie Zhang
Journal: Mathematical Problems in Engineering
 (2021)

---

## Abstract

In this paper, a switched finite-time source-seeking strategy is proposed for underactuated ships with a signal sensor. In practical application, for sensors in some complex environment, due to the lack of the ability to perceive the location of the source or its own position, we use the nonmodel gradient estimation of extremum seeking algorithm. This paper presents a three-step switching control method for the first time. In the first step, we prove that the closed-loop system of the underactuated ship is stable in a finite time with a constant yaw angular acceleration. In the second step, under the yaw angle acceleration controller, one of the position coordinates of the underactuated ship sensor is realized to be close to the center of the signal source through the average method. The third step is to drive the other position coordinates of the underactuated ship sensor to the center of the signal source under the action of the surge line speed controller. Simulation results show the effectiveness of the proposed strategy.


---

## Body

## 1. Introduction

A lot of research has been done in the field of source tracking. In caves or urban environments without GPS or where INS systems are too expensive to use, extreme search source control can provide a better solution to direct vehicles to signal source. As in [1], a nonholonomic source search method based on rotational angular velocity is proposed. The controller uses nonmodel-based gradient estimation to drive the aircraft to the source direction by combining the motion of the aircraft sensor in space with the estimated gradient. This is a search method based on the constant forward speed of a single sensor.In [2], a nonholonomic source-seeking method without position measurement is proposed. By adjusting its forward speed, the extremum source finding strategy is adopted. Some groups have also discussed the control law for obtaining the extremum of a three-dimensional scalar potential field on the basis of the two-dimensional rule in [3]. In view of the limitations of the source search results of unicycles, some research groups proposed to combine the two control laws existing in [4], which are effective when approaching the source with good behavior. For the control of an underactuated ship, there are many tracking and control results [5–7]. In [7], an innovative method combining backstepping technology and appropriate sway speed filter is proposed. The design of the controller enables the ship to travel on the track at an adjustable forward speed. In order to avoid the singularity problem that may occur in the design of antithrust control, some researchers have introduced a concept of asymptotic direction correction in [3], which transformed tracking kinematics and dynamics of the ship into some form of nonlinear feedback. In [5], a dynamic surface control (DSC) method and a global tracking control method for underactuated ships with input constraints and speed constraints are proposed, and global tracking control under input constraints and speed constraints is realized. In another article [6], according to the characteristics of the underactuated system of hovercraft with the friction disturbance, the author creatively put forward pseudo-force and the pseudo-heading angle for tracking control and disturbance compensation. That three attitude variables of the hovercraft can converge to the reference variable by two control inputs. In the performance index of the control system, the convergence performance is a key index. In most control systems, infinite time stability is considered. However, in recent years, it has been found that the finite-time convergence control system has good robustness and antidisturbance and is a better choice for time optimization. In [8], an improved Chua oscillator is added to the base station and sensor nodes to generate chaotic signals. Lyapunov stability theory is used to realize the finite-time chaotic synchronization by using the control law. Sliding mode controller is applied to wireless sensor network to improve the robustness of the controller. In other studies, some scholars designed a robust terminal sliding mode controller based on the Lyapunov stability theory and the concept of finite-time synchronization and proposed a chaotic secure communication system between base station and mobile devices [9]. In [10], some scholars found that the adaptive finite-time tuning law eliminated the requirement of disturbance boundary information and proposed an adaptive finite-time stabilization technique based on global sliding mode for disturbed chaotic flow at a single unstable node. A new chaotic system with regular motion and chaotic motion is proposed in [11]. In this paper, the dynamic characteristics of the chaotic system are analyzed theoretically, and a new random number generator and encryption algorithm are designed. In [12], an adaptive terminal sliding mode tracking method with fast approaching condition is designed to synchronize the chaotic system at the transmitter and receiver in a finite time. Then, a chaotic cryptographic system with synchronous chaotic system as key generator is proposed to improve the security of medical image transmission and storage. In this context, our research group has carried out a series of studies on finite-time stability. Our research group has considered two decoupled subsystems and combined the finite-time stability control theory with the design strategy without buffeting sliding mode, proposing an anti-interference controller in the presence of uncertainty, nonlinearity, and perturbation in [13]. In addition, we also study the finite-time tracking problem of a nonholonomic mobile robot to the moving target via switching controller in [14]. The piecewise continuous bounded control law is proposed by applying the multistep switching control strategy and the finite-time stability theory to drive the nonholonomic robot to the moving target in a finite time [15, 16].However, the above nonholonomic source search [1, 2, 4, 17] is carried out under certain constraints, most of which are controlled by a single nonholonomic robot sensor to achieve the purpose of source seeking. These methods of source-seeking control can meet the requirements of general land demand. However, in the working environment with water such as ocean rescue and river pollutant cleaning, due to the different environmental constraints and vehicle movement mode, similar nonholonomic source search is difficult to meet the requirements of source search. For existing source-seeking algorithms of underactuated ships, there are usually some hypothetical constraints on forward speed or yaw angular speed. The related research studies from 2019 to 2021 mostly adopted the two-step switching control strategy. On this basis, this paper adopted the nonmodel gradient estimation extremum seeking algorithm and proposed a three-step switching control method. With the help of the switch, the center of the underactuated ship sensor controller can be closer to the signal source more effectively.Based on the improvement of the source finding method of nonholonomic mobile robot and combining with the existing work in the classroom, this paper creatively proposes a finite-time source-seeking method suitable for underactuated ship. The main innovations and contributions of our research can be summarized as the following three points in this paper:(1)
Most of the existing underactuated ship source search algorithms have assumed constraints on forward velocity or yaw angular velocity. In this paper, according to the surge line velocity and yaw acceleration of the underactuated ship when approaching the source, a finite-time switching controller is set and the tracking error converges to zero in a finite time.(2)
In this paper, the great difference between the dynamic and kinematic constraints of ships and the classical nonholonomic robots is fully considered. The traditional extremum search method based on nonmodel gradient estimation is improved, and the source finding robot is extended from the nonholonomic robot to the underactuated ship which can be applied in the working environment with water.(3)
The rigorous mathematical formula proves the reliability of the finite-time control law proposed in this paper. Further numerical simulation results also verify the effectiveness of the control law.This paper is organized as follows. Section 2 gives a formalization of the problem considered in this paper. Section 3 introduces the three-step switching design process of the underactuated ships. The simulation results of this method are given in Section 4. Finally, the conclusion is given in Section 5.


## 2. Problem Statement

In this paper, the classical underactuated ship model [18] is adopted, that is, the general six-degree-of-freedom underactuated ship, as shown in Figure 1. The ship model can be simplified to surge, swing, and yaw motion control. Degree of freedom must be considered in the control design of the the dynamics of the underactuated kinematic device, and it is assumed that the driven degree of freedom is controlled by the internal control loop. The following is the kinematic and dynamic model of the underactuated ship given by us:(1)x˙c=cosφu−sinφv,y˙c=sinφu+cosφv,φ˙=r,(2)v˙=−cur−kv,where xc,yc is the center of the ship, φ is the yaw angle of the ship in the geodetic coordinate system reference, the fixed initial angle is 0, u and v are surge linear velocity and swing velocity, and r is yaw angular velocity. The two mechanical coefficients of the dynamic equation are c>0 and k>0. The degree of freedom driven in this paper will be controlled by the corresponding u, r, and v. At the same time, we assume that the ship is equipped with a sensor that cannot measure the position of the signal source and its own position, and the coordinates of the reference geodetic coordinate system are xs,ys, and its distance from the center is d. It can be obtained that(3)xs=xc+dcosφ,(4)ys=yc+dsinφ.Figure 1
6-DOF coordinate system of the underactuated ship.In order to improve the accuracy of source search and some design requirements, it is generally taken thatd≥0.We assume that the source center of the signal field is the strongest and the signal field gradually decreases from the source center. It is assumed that the tracked signal source is distributed in an unknown nonlinear mappingJ=fx,y, which has an isolated local maximum value f∗=fx∗,y∗atx∗,y∗ [2], which is the source of the signal field. Our goal is to converge to the maximum region without knowing the shape of f (x, y). For nonholonomic vehicles, it cannot be directly guided in the horizontal direction, and all its movements must be generated by the forward and angular velocity inputs. Because the controller of the underactuated ship is more complex than that of a single robot, the corresponding surge speed and yaw angular velocity u and r should be taken as control input, which makes the source search more challenging.Here, we give the distribution of the signal source.(5)J=fx,y=f∗−qxx−x∗2−qyy−y∗2,where x∗,y∗ is maximizer, f∗=fx∗,y∗ is an unknown maximum, and qxqy is unknown positive number.For the next operation, we define the output error variable as follows:(6)e=hs+hJ−f∗.And after the filter processing, it can be expressed as follows:(7)Δ=ss+hJ=J−hs+hJ=J−f∗−e.In this paper, the task of our control design is to approach the signal field source of an underactuated ship in a finite-time using switched controllers. We divide the process into three steps. In the first step, the controlleru is designed to stabilize the ship’s dynamic equation in a finite time and make the swing velocity v go to zero. In the second step, the controller r is designed, and our goal is to make the y-direction position of the underactuated ship close to the corresponding position y∗ of the source in a finite time under the action of the controller u and r. In the last step, design the controller u again to make the x-direction position of the underactuated ship tend to corresponding position x∗ of the source. At this point, the whole seeking process is completed.


## 3. Main Results

In this section, we will show how the underactuated ship can achieve the source-seeking objective in a finite time by switching controllers. First, we will introduce some lemmas which will be used in the later parts.Lemma 1 (see [19]).
Considering the systemx˙=fx, the solution of the system can be denoted as xt,x0. When t∈0,Tx0, limt⟶Tx0xt,x0=0. When t>Tx0, xt,x0=0. The time Tx0 for the system is called finite time.Lemma 2 (see [19–23]).
Consider the systemx˙=fx where x is a positive value function of time. And, there is a positive number F satisfying f≤F. For a certain number x0, there is always a positive number M0 satisfying x0≤M0. Set continuous and saturated control law fx=−κsgnxxς, and there is a finite time T0 satisfying T0=x01−ζ/κ1−ζ≤M01−ζ/κ1−ζ.


### 3.1. Switching Controllers Design

In order to solve the problem of source seeking, we simplify the control procedure and divide it into three steps by using switching controllers. Finally, the senior position coordinatesxs,ys of the underactuated ship are close to the signal source x∗,y∗.Step 1.
Take the control law as follows:(8)u=sgnv,r=c,in which we consider v as a positive function with respect to time t and c as an unknown constant.
In order to facilitate the calculation, we do the coefficient transformationcr=k1 and k=k2 of the known underactuated ship dynamics equation (2), and it can be obtained that(9)v˙=−k1u−k2v,k1>0,k2>0.Theorem 1.
The statev in system (2) can always be stabilized to the origin in a finite time under the control law (8).Proof.
Substituting (8) into (9), it can be obtained that v˙=−k1sgnv−k2v.
Here, we consider the Lyapunov decision function,S=1/2v2, because v is a function of time and S is also a function of time.
Taking the derivative ofS with respect to time,(10)S˙=v˙v=−k1sgnvv−k2v2.
It is easy to get(11)S˙≤−k1v=−k12S≤0.
From (11), it can be seen that S is a decreasing function of time, and then (11) can be converted to(12)dSS≤−2k1dt.
Integrating both sides,(13)∫S0SS−1/2dS≤∫0t−2k1dt.
After simplification,(14)S1/2≤−22k1t+S01/2⟹St≤0,whent≥T0=−2k1S01/2.
SinceSt≥0, we have St=0,t≥T0.
It can be found from (14) that when t converges to T0=−2/k1S01/2, S converges to zero. According to Lemma [5, 6], it can be seen that the time function S converges to zero in a finite time and then time function v also converges to zero in a finite time.
So, in the later step,v≡0 as t≥T0, and we will design the controllers u and r directly.Step 2.
Becausev converges to zero, the underactuated ship model is relatively simplified. We use the extremum seeking algorithm of nonmodel gradient estimation and take the control law to achieve that the underactuated ship sensor ys also approaches to y∗.(15)u=sgnv,r˙=αωcosωt+cΔsinωt−bΔ2sinωt,where α,ω,c, and b are control parameters.
In order to clearly represent the process of extremum seeking, we give Figure2.Figure 2
Block diagram of source seeking via extreme seeking controllers.Proof.
We start this part by defining the shifted variables.(16)ϒ^c=ϒc−ϒ∗,r^=r−asinωt,τ=ωt,where ϒc is the center of the underactuated ship and ϒ∗ is the strongest source of the signal field represented in complex fields.
And, a new parameterr∗ is given by(17)r∗=argϒ∗−ϒc.
We next define variablesϒ˜c and r˜ that are the distance to the source and the difference between the ship’s optimal heading and heading as follows:(18)ϒ˜c=ϒ^c,r˜=r^−r∗.
Motivated from [1], the dynamics system for the above variables is as follows:(19)dϒ˜cdτ=−uωcosr˜+asinτ,(20)dr˜dτ=1ωc−bΔΔsinτ+uωsinr˜+asinτϒ˜c,(21)dedτ=1ωhΔ,(22)Δ=−qrd2+ϒ˜c2−2dϒ˜ccosr˜+asinτ+e,where qr is the representation of parameters qx and qy in complex fields and d is the distance between the center and the sensor.
Next, the average system of (19)–(21) can be obtained as follows:(23)dϒ˜cavedτ=−uG0aωcosr˜ave,(24)dr˜avedτ=1ωsinr˜aveuG0aϒ˜ave−2qrdG1aϒ˜cave×c+2dqrd2+ϒ˜cave2+eave+1ω2bqr2d2ϒ˜cave2G12asin2r˜ave,(25)deavedτ=hω2qrdG0aϒ˜cavecosr˜ave−qrd2−qrϒ˜cave2−eave,G0a and G1a are the first kind of Bessel function, and the appropriate parameter a is selected so that G0a, G1a>0. And, sensor reading Gt converges exponentially to a periodic function within O1/ω of(26)f∗−qrd2−uG0a2bcG1a.
There are two equilibria of the average system (23)–(25), respectively.(27)ϒ˜caveeq1,r˜aveeq1,eaveeq1=ρ,+π2,−qrd2+ρ2,(28)ϒ˜caveeq2,r˜aveeq2,eaveeq2=ρ,−π2,−qrd2+ρ2,where ρ=uG0a/2cqrdG1a.
And, the Jacobians of these two equilibria can be obtained as follows:(29)Aeq1=−1ω0−uG0a04ϒG1ac+2bqrρ24bϒ2G12aρ22bϒG1aρ22hqrρ2hϒG0aρh,Aeq2=1ω0−uG0a04ϒG1ac+2bqrρ2−4bϒ2G12aρ22bϒG1aρ2−2hqrρ2hϒG0aρ−h,where ϒ=qrd.
According to the Hurwitz criterion, these two equilibria (27) and (28) are stable when each coefficient is greater than zero and satisfy some assumption from [1]. And then, we conclude that there are two stable periodic solutions within O1/ω of the equilibria (27) and (28) by applying Theorem 10.4 from [21].(30)ϒ˜cattriτ=ρ+ϒ˜c2πeqiτ,(31)r˜attriτ=−1i−1π2+r˜2πeqiτ,(32)eattriτ=−qrd2+ρ2+e2πeqiτ,where ϒ˜cattriτ, θ˜attriτ, and eattriτ are periodic and are O1/ω.
From (30)–(32), it is indicated that the distance from the ship’s center ϒc to the source ϒ∗ converges to within O1/ω of the value ρ.
So, the center of the ship’s trajectory converges locally and remains in the very small annular region near the signal source.
That is,(33)ρ−O1ω≤yc−y∗≤ρ+O1ω.
Therefore, it can be obtained by (4) that(34)ρ−O1ω−dsinφ≤yc−y∗−dsinφ≤ys−y∗≤yc−y∗+dsinφ≤ρ+O1ω+dsinφ.
It can be obtained that(35)limsupys−y∗=Oρ+1ω+d.
As long asω is large enough and d is small enough, the underactuated ship can converge in the area near the signal source.Case 1.
If there is an arbitrary positive number,ς1, satisfying ys−y∗<ς1, then go to Step 3.Case 2.
If there is an arbitrary positive number,ς1, satisfying ys−y∗>ς1, then go back to Step 2.Step 3.
Take the control law as follows:(36)r=0,u=αωcosωt+csinωtΔ.
The nonmodel extremum seeking along the gradient is carried out. In order to clearly represent the extremum seeking process, we give Figure3.
After the completion of Step3, we can realize that the underactuated ship can approach the maximum of the signal field as a whole, namely, the signal source.Figure 3
Block diagram of source seeking while input controllerr = 0.Theorem 2.
Under the control lawr=0, the result that the sensor ys can approach to y∗ is still valid after Step 2.Proof.
The sensor position of the underactuated ship is controlled by the following functions from (4):(37)y˙s=y˙c+drcosφ=usinφ+vcosφ+drcosφ.
Assume that the sensor coordinateys approaches the signal source coordinate y∗ at T0 and ϕ keeps the initial zero state. When Step 3 control law is met, it can be obtained that(38)y˙s=v.
When the control lawr=0 is taken, it is available form (2).(39)v˙=−kv.
It is easy to know that(40)v=e−kt+c′,k>0.
So, there is a numberε1=e−kT0+c′ that satisfies limt⟶T0y˙s−0≤ε1, and the function of y coordinate stays in the same state in Step 2; that is, ys is still close enough to the surrounding area of signal source coordinate y∗.Lemma 3 (see [2]).
As the extremum seeking process of Figure3, when a position function f (x) is averaged and the averaged system is locally exponentially stable, then there is a w¯ for all 1/w∈1,1/w¯ satisfying that there is a unique exponential stable periodic solution x˜2π/w of the system equation in the period 2π/w. And, the solution satisfies(41)x˜2π/w≤O1w.Theorem 3.
The senor coordinatexs of the underactuated ship is also approaching x∗ under the control law so that it can be obtained that fxs,ys converges to fx∗,y∗.Proof.
First of all, we can make a new coordinate transformation as follows:(42)x˜=xs−x∗−αsinωt−d.
And then, at the time scaleτ=ωt, it can be obtained that(43)dx˜dτ=1ωdx˜dt=1ωucosφ−αωcosωt=1ωu−αωcosωt=Δωcsinτ,(44)Δ=−qxx˜+αsinωt2−qyy2−e.
System (43) can be averaged as long as 1/ω is guaranteed small enough. Next, we average system (43) in a large period of 2πk as follows:(45)dx˜avgdτ=12kπ∫02kπΔωcsinτdτ=cω12π∫02πsinkτΔdτ=cω12π−∫02πsinkτqxx˜2+qyy˜2+e−∫02πsinkτqxα2sin2τdτ−∫02πqx2αx˜sin2τsinkτdτ.
After a series of calculations, it can be obtained that(46)dx˜avgdτ=−cω12π2αx˜avgqxπ=−cωαqxx˜avg.
The equilibrium point of the averaged system (45) can be obtained as follows:(47)x˜avge=0.
We can obtain the Jacobian of the averaged system atx˜avge as follows:(48)Javg=1ω−αcqx.
Considering that the extreme value is the maximum, we give a positive numberqx and select positive parameters α and c, and according to the Hurwitz criterion, we can obtain that the equilibrium of the equalizing system is locally exponential stable.
According to Lemma3, then,(49)xs−x∗=x˜+αsinωt+d=x˜−x˜2π/w+x˜2π/w+αsinωt+d.
So, we can get that(50)limτ⟶∞supxs−x∗=Ο1w+α+d.
Therefore, as long as the vibration frequency is large enough and the vibration amplitude and sensor distance are small enough, the underactuated ship can be limited to a small enough area around the signal source. In order to represent the whole process clearly, we make a flow chart, as shown in Figure4.Figure 4
The flow chart of the switching controller.


## 3.1. Switching Controllers Design

In order to solve the problem of source seeking, we simplify the control procedure and divide it into three steps by using switching controllers. Finally, the senior position coordinatesxs,ys of the underactuated ship are close to the signal source x∗,y∗.Step 1.
Take the control law as follows:(8)u=sgnv,r=c,in which we consider v as a positive function with respect to time t and c as an unknown constant.
In order to facilitate the calculation, we do the coefficient transformationcr=k1 and k=k2 of the known underactuated ship dynamics equation (2), and it can be obtained that(9)v˙=−k1u−k2v,k1>0,k2>0.Theorem 1.
The statev in system (2) can always be stabilized to the origin in a finite time under the control law (8).Proof.
Substituting (8) into (9), it can be obtained that v˙=−k1sgnv−k2v.
Here, we consider the Lyapunov decision function,S=1/2v2, because v is a function of time and S is also a function of time.
Taking the derivative ofS with respect to time,(10)S˙=v˙v=−k1sgnvv−k2v2.
It is easy to get(11)S˙≤−k1v=−k12S≤0.
From (11), it can be seen that S is a decreasing function of time, and then (11) can be converted to(12)dSS≤−2k1dt.
Integrating both sides,(13)∫S0SS−1/2dS≤∫0t−2k1dt.
After simplification,(14)S1/2≤−22k1t+S01/2⟹St≤0,whent≥T0=−2k1S01/2.
SinceSt≥0, we have St=0,t≥T0.
It can be found from (14) that when t converges to T0=−2/k1S01/2, S converges to zero. According to Lemma [5, 6], it can be seen that the time function S converges to zero in a finite time and then time function v also converges to zero in a finite time.
So, in the later step,v≡0 as t≥T0, and we will design the controllers u and r directly.Step 2.
Becausev converges to zero, the underactuated ship model is relatively simplified. We use the extremum seeking algorithm of nonmodel gradient estimation and take the control law to achieve that the underactuated ship sensor ys also approaches to y∗.(15)u=sgnv,r˙=αωcosωt+cΔsinωt−bΔ2sinωt,where α,ω,c, and b are control parameters.
In order to clearly represent the process of extremum seeking, we give Figure2.Figure 2
Block diagram of source seeking via extreme seeking controllers.Proof.
We start this part by defining the shifted variables.(16)ϒ^c=ϒc−ϒ∗,r^=r−asinωt,τ=ωt,where ϒc is the center of the underactuated ship and ϒ∗ is the strongest source of the signal field represented in complex fields.
And, a new parameterr∗ is given by(17)r∗=argϒ∗−ϒc.
We next define variablesϒ˜c and r˜ that are the distance to the source and the difference between the ship’s optimal heading and heading as follows:(18)ϒ˜c=ϒ^c,r˜=r^−r∗.
Motivated from [1], the dynamics system for the above variables is as follows:(19)dϒ˜cdτ=−uωcosr˜+asinτ,(20)dr˜dτ=1ωc−bΔΔsinτ+uωsinr˜+asinτϒ˜c,(21)dedτ=1ωhΔ,(22)Δ=−qrd2+ϒ˜c2−2dϒ˜ccosr˜+asinτ+e,where qr is the representation of parameters qx and qy in complex fields and d is the distance between the center and the sensor.
Next, the average system of (19)–(21) can be obtained as follows:(23)dϒ˜cavedτ=−uG0aωcosr˜ave,(24)dr˜avedτ=1ωsinr˜aveuG0aϒ˜ave−2qrdG1aϒ˜cave×c+2dqrd2+ϒ˜cave2+eave+1ω2bqr2d2ϒ˜cave2G12asin2r˜ave,(25)deavedτ=hω2qrdG0aϒ˜cavecosr˜ave−qrd2−qrϒ˜cave2−eave,G0a and G1a are the first kind of Bessel function, and the appropriate parameter a is selected so that G0a, G1a>0. And, sensor reading Gt converges exponentially to a periodic function within O1/ω of(26)f∗−qrd2−uG0a2bcG1a.
There are two equilibria of the average system (23)–(25), respectively.(27)ϒ˜caveeq1,r˜aveeq1,eaveeq1=ρ,+π2,−qrd2+ρ2,(28)ϒ˜caveeq2,r˜aveeq2,eaveeq2=ρ,−π2,−qrd2+ρ2,where ρ=uG0a/2cqrdG1a.
And, the Jacobians of these two equilibria can be obtained as follows:(29)Aeq1=−1ω0−uG0a04ϒG1ac+2bqrρ24bϒ2G12aρ22bϒG1aρ22hqrρ2hϒG0aρh,Aeq2=1ω0−uG0a04ϒG1ac+2bqrρ2−4bϒ2G12aρ22bϒG1aρ2−2hqrρ2hϒG0aρ−h,where ϒ=qrd.
According to the Hurwitz criterion, these two equilibria (27) and (28) are stable when each coefficient is greater than zero and satisfy some assumption from [1]. And then, we conclude that there are two stable periodic solutions within O1/ω of the equilibria (27) and (28) by applying Theorem 10.4 from [21].(30)ϒ˜cattriτ=ρ+ϒ˜c2πeqiτ,(31)r˜attriτ=−1i−1π2+r˜2πeqiτ,(32)eattriτ=−qrd2+ρ2+e2πeqiτ,where ϒ˜cattriτ, θ˜attriτ, and eattriτ are periodic and are O1/ω.
From (30)–(32), it is indicated that the distance from the ship’s center ϒc to the source ϒ∗ converges to within O1/ω of the value ρ.
So, the center of the ship’s trajectory converges locally and remains in the very small annular region near the signal source.
That is,(33)ρ−O1ω≤yc−y∗≤ρ+O1ω.
Therefore, it can be obtained by (4) that(34)ρ−O1ω−dsinφ≤yc−y∗−dsinφ≤ys−y∗≤yc−y∗+dsinφ≤ρ+O1ω+dsinφ.
It can be obtained that(35)limsupys−y∗=Oρ+1ω+d.
As long asω is large enough and d is small enough, the underactuated ship can converge in the area near the signal source.Case 1.
If there is an arbitrary positive number,ς1, satisfying ys−y∗<ς1, then go to Step 3.Case 2.
If there is an arbitrary positive number,ς1, satisfying ys−y∗>ς1, then go back to Step 2.Step 3.
Take the control law as follows:(36)r=0,u=αωcosωt+csinωtΔ.
The nonmodel extremum seeking along the gradient is carried out. In order to clearly represent the extremum seeking process, we give Figure3.
After the completion of Step3, we can realize that the underactuated ship can approach the maximum of the signal field as a whole, namely, the signal source.Figure 3
Block diagram of source seeking while input controllerr = 0.Theorem 2.
Under the control lawr=0, the result that the sensor ys can approach to y∗ is still valid after Step 2.Proof.
The sensor position of the underactuated ship is controlled by the following functions from (4):(37)y˙s=y˙c+drcosφ=usinφ+vcosφ+drcosφ.
Assume that the sensor coordinateys approaches the signal source coordinate y∗ at T0 and ϕ keeps the initial zero state. When Step 3 control law is met, it can be obtained that(38)y˙s=v.
When the control lawr=0 is taken, it is available form (2).(39)v˙=−kv.
It is easy to know that(40)v=e−kt+c′,k>0.
So, there is a numberε1=e−kT0+c′ that satisfies limt⟶T0y˙s−0≤ε1, and the function of y coordinate stays in the same state in Step 2; that is, ys is still close enough to the surrounding area of signal source coordinate y∗.Lemma 3 (see [2]).
As the extremum seeking process of Figure3, when a position function f (x) is averaged and the averaged system is locally exponentially stable, then there is a w¯ for all 1/w∈1,1/w¯ satisfying that there is a unique exponential stable periodic solution x˜2π/w of the system equation in the period 2π/w. And, the solution satisfies(41)x˜2π/w≤O1w.Theorem 3.
The senor coordinatexs of the underactuated ship is also approaching x∗ under the control law so that it can be obtained that fxs,ys converges to fx∗,y∗.Proof.
First of all, we can make a new coordinate transformation as follows:(42)x˜=xs−x∗−αsinωt−d.
And then, at the time scaleτ=ωt, it can be obtained that(43)dx˜dτ=1ωdx˜dt=1ωucosφ−αωcosωt=1ωu−αωcosωt=Δωcsinτ,(44)Δ=−qxx˜+αsinωt2−qyy2−e.
System (43) can be averaged as long as 1/ω is guaranteed small enough. Next, we average system (43) in a large period of 2πk as follows:(45)dx˜avgdτ=12kπ∫02kπΔωcsinτdτ=cω12π∫02πsinkτΔdτ=cω12π−∫02πsinkτqxx˜2+qyy˜2+e−∫02πsinkτqxα2sin2τdτ−∫02πqx2αx˜sin2τsinkτdτ.
After a series of calculations, it can be obtained that(46)dx˜avgdτ=−cω12π2αx˜avgqxπ=−cωαqxx˜avg.
The equilibrium point of the averaged system (45) can be obtained as follows:(47)x˜avge=0.
We can obtain the Jacobian of the averaged system atx˜avge as follows:(48)Javg=1ω−αcqx.
Considering that the extreme value is the maximum, we give a positive numberqx and select positive parameters α and c, and according to the Hurwitz criterion, we can obtain that the equilibrium of the equalizing system is locally exponential stable.
According to Lemma3, then,(49)xs−x∗=x˜+αsinωt+d=x˜−x˜2π/w+x˜2π/w+αsinωt+d.
So, we can get that(50)limτ⟶∞supxs−x∗=Ο1w+α+d.
Therefore, as long as the vibration frequency is large enough and the vibration amplitude and sensor distance are small enough, the underactuated ship can be limited to a small enough area around the signal source. In order to represent the whole process clearly, we make a flow chart, as shown in Figure4.Figure 4
The flow chart of the switching controller.


## 4. Simulation

In the following simulations, we will verify the inference of the above three steps to illustrate the reliability of the conclusions of this paper.First, we use control low in (8) to demonstrate that the speed v of the underactuated ship will tend to zero for a limited time. We set the parameters of the sourcing system as k1=3,k2=4,u0=1,andv0=3. Images of speed v that change over time are shown in Figure 5.Figure 5
v trajectory using control law in (8).In the second step, we use the nonlinear extremum search algorithm to realize thatys of the underactuated ship approaches y∗ in a limited time. And, there are some integers ζ, which make ys−y∗≤ζ. In this simulation, we take the parameters as x∗=3,y∗=0,J∗=0,qx=0.5,qy=0.25,ω=40,a=0.5,h=1,c=100,andd=10 and initial point xs,ys=5,15. Using the control law (15), ys gradually tends to y∗, as shown in the images of Figure 6.Figure 6
ys trajectory using control law (15).An unknown nonlinear signalJ=fxs,ys varies over time, and the picture is shown in Figure 7.Figure 7
J=fxs,ys trajectory.Through these two graphs, it is clear that in a limited period of time,ys progressively trend the source y∗, the conclusion is evidenced.Whenys is stable near y∗ (at 6 seconds), under the control law in (36), the underactuated ship conducts a nonmodel extremum search along the gradient. As xs is stable at x∗ for a limited time, the underactuated ship is also stable at the signal field extreme value, i.e., the sourcing control is completed. In this simulation, we take the completion state of the second step as the initial state, the parameters of filter and others remain unchanged, Figure 8 indicates that xs finally stabilizes near x∗ (at 18 seconds), and the algorithm described in this paper is effective.Figure 8
xs trajectory under the control law (36).In [24], the performance of using the REMUS AUV under the control law of the NMPC algorithm to find the maximum point in the chemical signal field is simulated. After about 16 iterations of the algorithm, the AUV reaches around the signal field maximum. The advantage of this method is that the ship does not have to sail too far to accomplish its goal. However, this algorithm is gradient based and requires an estimate of the gradient, which is more of a requirement for the computing chip embedded on the ship. In addition, [24] does not take into account the execution time of the algorithm in the simulation. In this paper, the method used is relatively simple and requires a relatively small workload. In the simulations in this paper, the focus is on the time required to find the source rather than number of times the algorithm is cycled.


## 5. Conclusion

In this paper, the source-seeking problem of underactuated ship in finite time is studied by switching controller. Based on the nongradient extremum seeking method, the underactuated ship is approached to the source step by step by a switching controller. Compared with the traditional nonholonomic source-seeking method, in this paper, we successfully simplify the control of the 6-DO underactuated ship and ensure that the seeking error converges to a zero neighborhood in a finite time. The source-seeking algorithm in each step is proved theoretically and verified by simulation. The dynamic source has not been lucubrated in this paper and will be the focus in the future study.



---

*Source: 9974071-2021-07-12.xml*