# Path Following of  Autonomous Vehicle in 2D Space Using Multivariable Sliding Mode Control

Authors: Daxiong Ji; Jian Liu; Hongyu Zhao; Yiqun Wang
Journal: Journal of Robotics
 (2014)

---

## Abstract

A solution to the path following problem for underactuated autonomous vehicles in the presence of possibly large modeling parametric uncertainty is proposed. For a general class of vehicles moving in 2D space, we demonstrated a path following control law based on multiple variable sliding mode that yields global boundedness and convergence of the position tracking error to a small neighborhood and robustness to parametric modeling uncertainty. An error integration element is added into the “tanh” function of the traditional sliding mode control. We illustrated our results in the context of the vehicle control applications that an underwater vehicle moves along with the desired paths in 2D space. Simulations show that the control objectives were accomplished.


---

## Body

## 1. Introduction

The past few decades have witnessed an increased research effort in the area of motion control of autonomous vehicles. A typical motion control problem is trajectory-tracking, which is concerned with the design of control laws that force a vehicle to reach and follow a time parameterized reference (i.e., a geometric path with an associated timing law). The degree of difficulty involved in solving this problem is highly dependent on the configuration of the vehicle. For fully actuated systems, the trajectory-tracking problem is now reasonably well understood.For underactuated vehicles, that is, systems with fewer actuators than degrees-of-freedom, trajectory-tracking is still an active research topic. The study of these systems is motivated by the fact that it is usually costly and often not practical to fully actuate autonomous vehicles due to weight, reliability, complexity, and efficiency considerations. Typical examples of underactuated systems include wheeled robots, hovercraft, spacecraft, aircraft, helicopters, missiles, surface vessels, and underwater vehicles. The tracking problem for underactuated vehicles is especially challenging because most of these systems are not fully feedback linearizable and exhibit nonholonomic constraints. The reader is refereed to [1] for a survey of these concepts and to [2] for a framework to study the controllability and the design of motion algorithms for underactuated Lagrangian systems on Lie groups.The classical approach for trajectory-tracking of underactuated vehicles utilizes local linearization and decoupling of the multivariable model to steer the same number of degrees of freedom as the number of available control inputs, which can be done using standard linear (or nonlinear) control methods. Alternative approaches include the linearization of the vehicle error dynamics around trajectories that lead to a time-invariant linear system (also known as trimming trajectories) combined with gain scheduling and/or linear parameter varying (LPV) design methodologies [3–5]. The basic limitation of these approaches is that stability is only guaranteed in a neighborhood of the selected operating points. Moreover, performance can suffer significantly when the vehicle executes maneuvers that emphasize its nonlinearity and cross couplings. A different approach is to use output feedback linearization methods [6–8]. The major challenge in this approach is that a straightforward application of this methodology, which in general involves dynamic inversion, is not always possible because certain involutivity conditions must hold [9]. In addition, even when dynamic inversion is possible, the resulting controller may not render the zero-dynamics stable.Nonlinear Lyapunov-based designs can overcome some of the limitations mentioned above. Several examples of nonlinear trajectory-tracking controllers for marine underactuated vehicles have been reported in the literature [10–17]. Typically, tracking problems for autonomous vehicles are solved by designing control laws that make the vehicles track prespecified feasible “state-space” trajectories, that is, trajectories that specify the time evolution of the position, orientation, and the linear and angular velocities, all consistent with the vehicles’ dynamics [6, 11, 13–18], even though in practical applications one often only needs to track a desired position. This approach suffers from the drawback that usually the vehicles’ dynamics exhibit complex nonlinear terms and significant uncertainty, which makes the task of computing a feasible trajectory difficult. Reference [19] presented a path following and trajectory tracking method combined with a nonlinear Lyapunov-based tracking control law to solve the problem of global boundedness and convergence of the position tracking error to a neighborhood of the origin that can be made arbitrarily small. Line-of-sight is a traditional method in the path following problem. Reference [20] proposed a 3-degree-of-freedom nonlinear controller for path following of marine craft based on a line-of-sight projection algorithm for minimization of the cross track error to the path. The desired speed along the path can be specified independently. The control laws in surge and yaw are derived using backstepping. Reference [21] considered a maneuvering problem solved by line-of-sight algorithm, which is used to steer a simplified vessel to and along a desired parameterized path.In this paper, a path following method in 2D space using sliding mode approach with line-of-sight (LOS) projection algorithm is proposed here. Generally, this type of marine vehicle has to cope with a path in 3D space because waves always exist. The vehicle we use, however, is the underwater vehicle in the deep sea where there is few waves. Thus we limit the problem setting to 2D space. The desired geometric path consists of straight line segments connected by way points. The second control objective, speed assignment, is defined in terms of a prescribed speed along the body fixedx-axis of the ship. This speed will be identical to the path speed once the ship has converged to the path. Hence, the desired speed profile can be assigned dynamically.


## 2. Path following Controller Using Sliding Mode

The three-dimensional equations of motion for hydrodynamically shaped underwater vehicles have been described in general terms and are most conveniently developed using a body fixed coordinate frame and a global reference frame. The body fixed frame has components of motion given by the six velocity components relative to a constant velocity coordinate frame moving with the ocean current, and the velocity vector is represented as(1)v=[u,v,w,p,q,r]T,while the six components of position in the global reference frame are(2)η=[n,e,d,ϕ,θ,φ]T,
where
(3)η.=J(η)v.The anglesϕ,θ, and φ (spin, elevation, and azimuth) are related through Euler transformations to the body yaw, pitch, and roll motions. Control inputs from control surfaces, propeller speeds, thruster forces, and buoyancy adjustment in general may be considered as the vector, τ(t). The vehicle motion may be described in terms of the nonlinear system equations of underwater robot:
(4)Mv˙+C(v)v+D(v)v+g(η)=τ,τ=Bu,
where M is the inertia matrix including the added mass, C(v)v is the vector of Coriolis and centripetal terms including the effects of the added mass, D(v)v is the vector of the hydrodynamic damping terms, g(η) is the vector of gravitational and buoyant generalized forces, τ is the vector of forces and moments acting on the vehicle, and B is the force distribution matrix. The mathematical model and specifications of the vehicle are given with standard unit as below:
(5)ρ=1027.77;L=3.5;m=1952;xg=-0.048;zg=0.019;Iz=1351;Iy=1476;zB=-0.006;W=19127;B=19177;Xu˙=-154.2518;R=-30.4557;Nr˙=-1380;Mq˙=-861.8;B=19177;Nr=(-24.106·10-3)·ρL42·u;Mq=(-45.493·10-3)L4ρ2·u.Under the assumptions that (i) the body-fixed coordinate axis coincides with the center of gravity (CG), (ii) the mass distribution is homogeneous, (iii) the hydrodynamic damping terms of order higher than one are negligible, (iv) changes in the inertia are negligible, and (v) the heave, pitch, and roll modes can be neglected, the horizontal dynamics of the underactuated underwater vehicle can be illustrated in Figure1 where v1, v2, and v3 denote the surge, sway, and yaw velocities (see Figure 1) of the vehicle, F denotes a control force that is applied to produce a forward thrust, and τ denotes a torque that is applied about the CG. It is noticed that there are only 2 actuators but 3 degrees-of-freedom. Thus it is an underactuated underwater vehicle.Figure 1
Actuator diagram for an underactuated underwater vehicle in horizontal plane.The sliding mode controller is used for steering control and PI feedback controller is used for speed control. The linearized steering system dynamics are given by the third-order system:(6)[ψ˙iψ˙r˙]=[01000100(Nr-mxGud)(Iz-Nr˙)][ψiψr]+[001(Iz-Nr˙)]τN,
where the subscript i means integral in this paper. According to hydrodynamic parameters of the robot, the values to place the sliding poles of the steering system arbitrarily at [-0.1,-0.2,0] become
(7)σ=54.6(ψi-ψid)+819.3(ψ-ψd(t))+2731(r-rd(t))
and let ψd be the objective heading, ψ˙ei=ψe=ψ-ψd, and ψ˙e=r; the steering control law results in
(8)τN=-54.6(ψ-ψd)+989(r-rd)+4tanh(σ0.2).We use a continuous function to define “practical” sliding surface dynamics using a “tanh” function. The powerful result of (8) means that if the coefficient of “tanh” function is large enough, then in spite of modeling uncertainty, nonlinear terms, and disturbances, the system response will be governed by the response of the σ and by the choice of the sliding surface parameters: it is less influenced by the parameters of the vehicle dynamics as is more usual with linear feedback controllers. The denominator in the brackets of “tanh” function is sliding surface boundary layer parameters used to retain continuity of control as motion trajectories cross the sliding surface and prevent chattering. This makes it possible to apply the sliding mode controller to actual systems.The linearized speed system dynamics are given by the second-order system:(9)[U˙u˙]=[0100][Uu]+[01(m-Xu˙)]XT+[0Ru2(m-Xu˙)].According to hydrodynamic parameters of the robot and lettingud be the objective speed, U˙e=ue, ue=u-ud, the speed control law to place the poles of the speed system arbitrarily at [-1+i,-1-i] becomes
(10)XT=-30.4557Ue-4212.5ue.To follow a set of straight line tracks that form the basis of many guidance requirements, a sliding mode controller is presented that has been experimentally validated under a wide variety of conditions. We use a combination of a line-of-sight (LOS) guidance [22] and a cross track error (CTE) control. With large heading errors, the CTE control cannot be guaranteed stable, while an LOS heading control will reduce heading errors to zero. Switching between these two controllers allows for reduction of both cross track and heading errors under all conditions. The variable of interest to minimize is the cross track error and is defined as the perpendicular distance between the center of the vehicle and the adjacent track line. The total track length between two way points i and i-1 is given by [22]
(11)Li=(Xwpt(i)-Xwpt(i-1))2+(Ywpt(i)-Ywpt(i-1))2.
The track angle φtrk(i) is defined by
(12)φtrk(i)=tan2-1(Ywpt(i)-Ywpt(i-1),Xwpt(i)-Xwpt(i-1))
and is a constant for a given set of adjacent way points. The cross track heading error φ~(t)CET(i) for the ith segment is defined as
(13)φ~(t)CET(i)=φ(t)-φtrk(i)+β(t),
where β(t) is the angle of sideslip and φ~(t)CET(i) must be normalized to lie between −180 and 180 in degree. The difference between the current vehicle position and the next way point is
(14)X~(t)wpt(i)=Xwpt(i)-X(t),Y~(t)wpt(i)=Ywpt(i)-Y(t).With the above definitions, the distance to theith way point projected to the track line S(t)i can be calculated using
(15)S(t)i=[X~(t)wpt(i)Y~(t)wpt(i)]·[(Xwpt(i)-Xwpt(i-1))(Ywpt(i)-Ywpt(i-1))]Li.
Therefore, S(t)i ranges from 0 to 100% of Li.The CTE may now be defined as(16)ε(t)=S(t)isin(δp(t)),
where δp(t) is the angle between the LOS to the next way point and the current track line given by
(17)δp(t)=tan2-1(Ywpt(i)-Ywpt(i-1),Xwpt(i)-Xwpt(i-1))-tan2-1(Y~(t)wpt(i)-X~(t)wpt(i))
and must be normalized to lie between −180 and 180 in degree, and tan 2−1 is the inverse tangent function tan 2.With the CTE defined, the sliding surface can be cast in terms of derivatives of the errors such that(18)ε˙(t)=usin(φ~(t)CTE⁡(i)),ε..(t)=u(r(t)+β.(t))cos⁡(φ~(t)CET(i)),ε…(t)=u(r.(t)+β..(t))cos⁡(φ~(t)CET(i))-u(r(t)+β.(t))2sin(φ~(t)CET(i)).
Recalling that u is the nominal longitudinal speed of the vehicle. The sliding surface for the CTE controller becomes a second-order polynomial of the form
(19)σ(t)=ε..(t)+λ1ε.(t)+λ2ε(t).
The condition for stability of the sliding mode controller is
(20)σ.(t)=ε…(t)+λ1ε..(t)+λ2ε.(t)=-ηtanh(σϕ+0.04∫ε(t)).
The error integration element 0.04∫ε(t) is added into the “tanh” function to play a role of integration. This addition guarantees the following accuracy. To recover the input for control, the heading dynamics (6) may be substituted into (20) to obtain
(21)τN=(Iz-Nr˙)(1ucos⁡(ψ~(t)))×((σϕ+0.04∫ε(t))-uarcos⁡(ψ~(t))+ur2sin(ψ~(t))-λ1urcos⁡(ψ~(t))-λ2usin(ψ~(t))-ηtanh(σϕ+0.04∫ε(t))),
where
(22)σ=urcos⁡(ψ~(t))+λ1usin(ψ~(t))+λ2ε(t),a=(Nr-mxgu)(Iz-Nr˙)
and λ1=6.0, λ2=0.1, η=8, and ϕ=0.5.To avoid division by zero, in the rare case wherecos⁡(ψ~(t))=0, the rudder command is set to zero since this condition is transient in nature. In addition, a bound of 30 degrees is used as a switch to LOS control which was described in [22].


## 3. Simulation Experimental Results

The simulation experiments were conducted to show the performances of presented approach of path following control for the underwater vehicle in 2D space. The planned trajectory was a rectangle area with300m×5000m. The vehicle’s initial position was (0,-250). The speed of the vehicle was set at 2 knots. Two different conditions were applied to the simulation experiments. One is no sea current and the other is northern current with the speed of 0.5 knot. The trajectory following control with no current is given in Figure 2. The vehicle closely approaches the planned trajectory from the start point and then gradually coincides with the planned trajectory after a shrink vibration to slight extent. The vehicle trajectory also produces a small vibration at the corner as a result of the vehicle’s turning radius itself. The following error is approximately 0.8 m. The trajectory following control performance is illustrated in Figure 3 under the condition of 0.5 knot current. The vehicle approaches the planned trajectory fast from the start point and gradually coincides with the planned trajectory after a shrink vibration except a little longer stabilizing process. The vehicle trajectory also produces a slightly greater vibration at the corner in Figure 3 than in Figure 2. This is because when the vehicle is moving forward, it is suffering from the 0.5 knot current with side direction. The following error in Figure 3 is approximately 1.1 m.Figure 2
The trajectory following control with no current.Figure 3
The trajectory following control with 0.5 knot current.


## 4. Conclusions

We proposed a solution to the path following problem for underactuated autonomous vehicles in the presence of possibly large modeling parametric uncertainty. For a general class of vehicles moving in 2D space, we demonstrated a following control law of multiple variable sliding mode that yields global boundedness and convergence of the position following error to a small neighborhood and robustness to parametric modeling uncertainty. The error integration element is added into “tanh” function in the sliding mode control. We illustrated our results in the context of the vehicle control applications: an underwater vehicle moves along with the desired paths in 2D space. Simulations show that the control objectives were accomplished.


## 5. Discussion

In Section3, simulation experiments are shown, in which a step disturbance, that is, northern current with the speed of 0.5 knot, is constantly given. An I-action loop, compared with the complicated sliding mode controller proposed in this paper, may be more effective for such a disturbance. But the direct I-action loop may lead to instability in terms of modeling uncertainty. In future, we will design I-action loop as a suitable part in the sliding controller to not only reduce the following error but also keep the robustness. Besides, a problem that warrants further research is the control of underactuated vehicles with noise and in the presence of disturbances. For instance, the varied current is a considerable influence. This is our next research work.



---

*Source: 217875-2014-08-20.xml*