1 Introduction

Two-wheeled mobile robots are expected to carry out autonomously various tasks such as transportation and surveillance. To accomplish the tasks, the robots must move to a desired position and orientation avoiding obstacles. For a controller design, both motion planning to avoid the obstacles and stabilization to the desired configuration should be solved simultaneously. The main difficulty in solving them arises from the fact that two-wheeled robots are subject to nonholonomic constraints that the wheels do not skid sideways. The controller has to be designed based on nonlinear control approaches for nonholonomic systems.

The potential field method is a powerful method to solve motion planning with obstacle avoidance for mobile robots, where an artificial potential function is constructed according to obstacles [14]. Rimon and Koditschek proposed an artificial potential function called navigation function for the obstacles that are represented by star-shaped sets [5, 6]. However, when the potential field method is applied to nonholonomic systems, the trajectories generated by the method may be infeasible, because the systems cannot always move along the gradient vector of the potential function owing to the nonholonomic constraints. That is, there are an infinite number of points where the gradient vector is perpendicular to input vector fields. To overcome the drawback, some methods of changing infeasible trajectories to feasible ones have been proposed [79], although they do not make the potential function strictly decrease. Other approaches to obtain feasible collision-free trajectories for nonholonomic mobile robots have been proposed based on differential flatness [10, 11], iterative calculation [1214] and so on [1519]. As a practical approach for obstacle avoidance, sensor-based reactive navigation has also been studied [2022].

Feedback stabilization of a two-wheeled mobile robot has already been studied extensively as a typical example of nonholonomic systems [23]. Since nonholonomic systems cannot be stabilized by any time-invariant smooth state feedback law [24], two types of controller, time-varying controllers [25, 26] and discontinuous time-invariant controllers [2729], have been proposed so far. We have also proposed a discontinuous time-invariant one for a class of nonholonomic systems based on a potential function [36, 37]. For a two-wheeled robot in the absence of obstacles, the potential function is set to be a quadratic form of state variables. As mentioned above, when the control input is derived from the gradient vector, the system has an infinite number of equilibria. In our method, the input has an additional component that does not decrease or increase the potential function, and it makes those equilibria other than the desired point unstable. Consequently, the system converges to the desired point from almost all initial points.

On the other hand, only a few studies deal with simultaneously motion planning for obstacle avoidance and feedback stabilization to a desired position and orientation. Tanner et al. [3033] have proposed a discontinuous feedback controller for a two-wheeled robot in the presence of obstacles by utilizing the gradient vector of a potential function. In their method, to make the orientation of the robot converge to the desired one, a dipolar potential function has been used. LaValle et al. have proposed a motion planning method called RRT in [34], which can be applied to nonholonomic vehicles among obstacles. They have also proposed a feedback motion strategy by using the cost-to-go function as a navigation function in [35]. We have extended our method proposed in [36, 37] to design a controller in the presence of obstacles in [38]. A potential function is constructed by using the navigation function [5, 6]. Unlike the quadratic potential function used in [36, 37], the critical points of the potential function are not only the minimum at the desired point, but also the saddles near isolated obstacles such as pillars. As a result, the stability of the equilibria is different from the one in [36, 37]; in addition to the stable equilibrium located at the minimum of the potential function, the equilibria at the saddles may also be stable. To escape the saddles, a periodic input which decreases the averaged value of the potential function was applied near the saddles.

In this paper, we first consider a nonholonomic system with three states and two inputs in its general form. A feedback controller for the system is constructed based on a potential function that has a minimum and saddles. Similarly to the results in [38], the saddles may be stable equilibria in addition to the stable equilibrium at the minimum. Next, we apply the controller to the feedback stabilization problem of a two-wheeled mobile robot among obstacles and propose a new way of avoiding the convergence to the saddles of the potential function. We make the potential function time-varying near the saddles and guarantee that the time derivative of the potential function is semi-negative definite. The effectiveness of the proposed controller is verified by numerical simulations.

The proposed controller can stabilize a nonholonomic vehicle while achieving obstacle avoidance simultaneously, unlike many other stabilizers for nonholonomic systems. The controller can be easily derived if once the potential function is constructed by the method in [5, 6] or other methods. The system with the controller is guaranteed to be stable in the sense of Lyapunov even among obstacles.

The theoretical contribution of this paper is to analyze the behavior of a nonholonomic system when a potential field method is applied to it. For nonholonomic dynamical systems such as Lagrange’s equations of motion with nonholonomic constraints, it is well known that there is a manifold of equilibrium states, and the stability of an equilibrium located on the manifold is determined by the stability of a subsystem composed of a part of state variables [39, 40]. Although this paper deals with a driftless control-affine system that represents the kinematics with nonholonomic constraints, the system with the proposed state feedback controller is also an autonomous nonholonomic system and has a manifold of equilibria. The stability of each equilibrium is also analyzed in a similar way as in [39, 40]. The equilibrium except the critical points of the potential function is made unstable by a skew-symmetric component of the controller.

2 Time-invariant controller with potential fields

2.1 Nonholonomic system with three states and two inputs

In this paper, we consider the following nonholonomic system:

$$\begin{aligned} {\dot{{\varvec{z}}}}={\varvec{B}}({\varvec{z}}) {\varvec{u}}, \end{aligned}$$
(1)

where

$$\begin{aligned}&{\varvec{z}}=[ z_1 , z_2 , z_3 ]^\mathrm{T} \in {\varvec{R}}^{3}, \end{aligned}$$
(2)
$$\begin{aligned}&{\varvec{B}}=[ {\varvec{b}}_1({\varvec{z}}) , {\varvec{b}}_2({\varvec{z}})] \in {\varvec{R}}^{3\times 2}, \ {\varvec{b}}_1({\varvec{z}}), \ {\varvec{b}}_2({\varvec{z}}) \in {\varvec{R}}^{3},\qquad \end{aligned}$$
(3)
$$\begin{aligned}&{\varvec{u}}=[ u_1 , u_2 ]^\mathrm{T} \in {\varvec{R}}^{2}, \end{aligned}$$
(4)

The state variables \({\varvec{z}}\) are supposed to be in an open subset \({\mathcal {D}}\) in \({\varvec{R}}^3\). We make the following assumptions on the system (1).

Assumptions :

  1. 1.

    \({\varvec{b}}_1({\varvec{z}})\) and \({\varvec{b}}_2({\varvec{z}})\) are linearly independent for \(\forall {\varvec{z}}\in {\mathcal {D}}\).

  2. 2.

    \({\varvec{b}}_1({\varvec{z}})\) and \({\varvec{b}}_2({\varvec{z}})\) are bounded for \(\forall {\varvec{z}}\in {\mathcal {D}}\).

  3. 3.

    \({\partial {\varvec{b}}_i }/{\partial z_k }({\varvec{z}})\) exists and is bounded for \(\forall {\varvec{z}}\in {\mathcal {D}}\) \((i=1,2 , \ k=1,2,3)\).

  4. 4.

    The system (1) satisfies the following controllability rank condition:

    $$\begin{aligned} \text{ rank }({\varvec{C}}({\varvec{z}}))=3 ,\quad \ \hbox {for}\quad \forall {\varvec{z}} \in {\mathcal {D}}, \end{aligned}$$
    (5)

    where

    $$\begin{aligned}&{\varvec{C}}({\varvec{z}})=\left[ {\varvec{b}}_1 , {\varvec{b}}_2 , \text{ ad }_{\small {{\varvec{b}}_1}}{\varvec{b}}_2 \right] , \end{aligned}$$
    (6)
    $$\begin{aligned}&\text{ ad }_{\small {{\varvec{b}}_1}}{\varvec{b}}_2=\frac{\partial {\varvec{b}}_2}{\partial {\varvec{z}}}{\varvec{b}}_1 - \frac{\partial {\varvec{b}}_1}{\partial {\varvec{z}}}{\varvec{b}}_2. \end{aligned}$$
    (7)

    The input vector fields, \({\varvec{b}}_1\) and \({\varvec{b}}_2\), and the first level of the Lie brackets, \(\text{ ad }_{\small {{\varvec{b}}_1}}{\varvec{b}}_2\), span the tangent space at each point of the state space.

2.2 Design of a controller

The desired point is set to be the origin without loss of generality (using a coordinate transformation if necessary). First, we consider a potential function that satisfies the following properties.

Properties of potential function \(V({\varvec{z}})\):

  1. (a)

    The function \(V({\varvec{z}})\) is at least twice continuously differentiable for \(\forall {\varvec{z}}\in {\mathcal {D}}\), and all elements of the gradient vector \(\nabla V ({\varvec{z}})\) and the Hessian matrix \({\varvec{P}}({\varvec{z}})\) are bounded for \(\forall {\varvec{z}} \in {\mathcal {D}}\), where \(\nabla =[\partial /\partial z_1 , \partial /\partial z_2, \, \partial /\partial z_3 ]^\mathrm{T} \) and \({\varvec{P}}({\varvec{z}})={\partial (\nabla V) }/{\partial {\varvec{z}} }\).

  2. (b)

    \(V({\varvec{z}})\ge 0\) for \(\forall {\varvec{z}}\in {\mathcal {D}}\), and \(V({\varvec{z}})=0 \Leftrightarrow {\varvec{z}}=0\).

  3. (c)

    The critical points of \(V({\varvec{z}})\) are a minimum at \({\varvec{z}}=0\) and saddles. \(V({\varvec{z}})\) does not have any critical points other than them.

  4. (d)

    \(V({\varvec{z}})\) is a Morse function. That is, the Hessian matrix \({\varvec{P}}({\varvec{z}})\) is nonsingular at the critical points.

  5. (e)

    \(V({\varvec{z}})\le V({\varvec{z}}^b)\) for \(\forall {\varvec{z}} \in {\mathcal {D}}\), where \({\varvec{z}}^b\) is a boundary point of \({\mathcal {D}}\).

Next, the input vector is designed based on a potential function \(V({\varvec{z}})\) as follows:

$$\begin{aligned} {\varvec{u}}=-(\alpha {\varvec{I}} + {\hat{\beta }} {\varvec{J}}){\varvec{B}}^\mathrm{T}\nabla V, \end{aligned}$$
(8)

where

$$\begin{aligned} {\varvec{I}}= & {} \left[ \begin{array}{c@{\quad }c} 1 &{} 0 \\ 0 &{} 1 \end{array} \right] , \ {\varvec{J}}=\left[ \begin{array}{c@{\quad }c} 0 &{} 1 \\ -1 &{} 0 \end{array} \right] , \ \end{aligned}$$
(9)
$$\begin{aligned} {\hat{\beta }}= & {} -\beta \frac{(\text{ ad }_{\small {{\varvec{b}}_1}}{\varvec{b}}_2)^\mathrm{T} \nabla V }{h(g)} . \end{aligned}$$
(10)

The coefficients \(\alpha \) and \(\beta \) are positive constants. The function \(h(g)\) is a non-decreasing one of \(g\) such that

$$\begin{aligned} h(0)=0 \ , \ h(g)>0 \quad \ \text{ for } \ g>0, \end{aligned}$$
(11)

where the variable \(g\) is defined as

$$\begin{aligned} g=\Vert {\varvec{B}}^\mathrm{T} \nabla V\Vert \ge 0 . \end{aligned}$$
(12)

Depending on the choice of \(h(g)\), the input vector is discontinuous or at least non-differentiable for \(\forall {\varvec{z}} \) in the set \({\mathcal {H}}\) that is defined as

$$\begin{aligned} {\mathcal {H}}=\{ {\varvec{z}} \in {\mathcal {D}}| {\varvec{B}}^\mathrm{T}\nabla V=0 \} . \end{aligned}$$
(13)

We define \((1/h(g))\cdot {\varvec{B}}^\mathrm{T}\nabla V =0\) for \({\varvec{z}} \in {\mathcal {H}}\).

Equation (1) with the input (8) becomes

$$\begin{aligned} {\dot{{\varvec{z}}}}=-{\varvec{B}}(\alpha {\varvec{I}} + {\hat{\beta }}{\varvec{J}}){\varvec{B}}^\mathrm{T}\nabla V . \end{aligned}$$
(14)

With (14), the time derivative of \(V\) is computed as

$$\begin{aligned} \dot{V}=-\alpha \Vert {\varvec{B}}^\mathrm{T}\nabla V\Vert ^2\le 0 . \end{aligned}$$
(15)

Therefore, we obtain

$$\begin{aligned} \Vert {\varvec{B}}^\mathrm{T} \nabla V\Vert \rightarrow 0 , \ \text{ as } \ t \rightarrow \infty . \end{aligned}$$
(16)

Equilibrium points of the controlled system are located only in the set \({\mathcal {H}}\), and (16) shows that the controlled system converges to one of the equilibrium points.

In the next subsection, we will examine the stability of each point in \({\mathcal {H}}\).

2.3 Stability analysis of equilibrium points

To proceed to the stability analysis, we modify Eq. (14) that is not differentiable on \({\mathcal {H}}\) as follows:

$$\begin{aligned} {\dot{{\varvec{z}}}}=-{\varvec{B}}(\alpha {\varvec{I}} + \tanh \Bigl (\frac{h(g)}{\epsilon }\Bigr ) {\hat{\beta }}{\varvec{J}}){\varvec{B}}^\mathrm{T}\nabla V \, , \, \end{aligned}$$
(17)

where \(\epsilon \) is a small positive constant. Equation (17) is differentiable on \({\mathcal {H}}\) and approaches (14) as \(\epsilon \) is taken to zero. The time derivative of \(V\) along the trajectory of the system (17) can be calculated again as in (15), and the equilibrium points of (17) are the points in \({\mathcal {H}}\). Then, we obtain the following proposition.

Proposition 1

Any solution \({\varvec{z}}(t)\) of the system (17) [or (14)] is bounded and converges to one of the equilibria on \({\mathcal {H}}\).

By linearizing (17) in the neighborhood of an equilibrium point \({\varvec{z}}={\varvec{z}}_0 \in {\mathcal {H}}\), we obtain the following linearized equation:

$$\begin{aligned} \delta {\dot{{\varvec{z}}}}= {\varvec{A}}({\varvec{z}}_0) \delta {\varvec{z}}, \end{aligned}$$
(18)

where

$$\begin{aligned} {\varvec{A}}= & {} -{\varvec{B}}(\alpha {\varvec{I}} + \bar{\beta }{\varvec{J}})({\varvec{B}}^\mathrm{T}{\varvec{P}}+{\varvec{D}}), \end{aligned}$$
(19)
$$\begin{aligned} {\varvec{D}}= & {} \left[ \frac{\partial {\varvec{B}}^\mathrm{T} }{\partial z_1 }\nabla V, \frac{\partial {\varvec{B}}^\mathrm{T} }{\partial z_2 }\nabla V, \frac{\partial {\varvec{B}}^\mathrm{T} }{\partial z_3 }\nabla V \right] , \end{aligned}$$
(20)
$$\begin{aligned} \bar{\beta }= & {} - (\beta /\epsilon ) \cdot (\text{ ad }_{\small {{\varvec{b}}_1}}{\varvec{b}}_2)^\mathrm{T} \nabla V . \end{aligned}$$
(21)

The eigenvalues of \({\varvec{A}}\) determine the stability of the equilibrium point \({\varvec{z}}_0\). We denote the three eigenvalues as \({\uplambda }_1\), \({\uplambda }_2\) and \({\uplambda }_3\). One of them is always zero, because the rank of \({\varvec{A}}\) is less than or equal to two from \({\varvec{B}} \in {\varvec{R}}^{3\times 2}\). We choose \({\uplambda }_3=0\) without loss of generality. The eigenvector corresponding to \({\uplambda }_3\) lies in the tangent space of the set \({\mathcal {H}}\) at the point \({\varvec{z}}_0\). Since \({\mathcal {H}}\) is the set of equilibria, \({\dot{{\varvec{z}}}}\) in the direction of the eigenvector cannot be generated, even in the nonlinear system (17). In other words, the motion in that direction is restricted, because \({\dot{{\varvec{z}}}}\) is in the column space of \({\varvec{B}}\) due to the nonholonomic constraint.

On the other hand, the eigenvectors corresponding to \({\uplambda }_1\) and \({\uplambda }_2\) lie in the column space of \({\varvec{B}}({\varvec{z}}_0)\), and \({\uplambda }_1\) and \({\uplambda }_2\) determine the stability of the equilibrium point \({\varvec{z}}_0\) [39, 40]. Since \({\uplambda }_3 = 0\), the sum of \({\uplambda }_1\) and \({\uplambda }_2\) is calculated as

$$\begin{aligned} {\uplambda }_1 + {\uplambda }_2= & {} \text{ trace } ({\varvec{A}}) \nonumber \\= & {} -\alpha \text{ trace }({\varvec{B}}{\varvec{I}}{\varvec{B}}^\mathrm{T}{\varvec{P}}) -\alpha \text{ trace }({\varvec{BID}}) \nonumber \\&-\bar{\beta } \text{ trace }({\varvec{BJB}}^\mathrm{T}{\varvec{P}}) -\bar{\beta }\text{ trace }({\varvec{BJD}}).\qquad \end{aligned}$$
(22)

The third term in the right-hand side of (22) is shown to be zero as follows. Since \({\varvec{P}}\) is a symmetric matrix, it is diagonalized as \({\varvec{P}}= {\varvec{S}}_P^\mathrm{T} {\varvec{\varLambda }} {\varvec{S}}_P\), where \({\varvec{S}}_P\) is an orthogonal matrix and \({\varvec{\varLambda }}\) is a diagonal matrix. Since \(\text{ trace }({\varvec{A}}_1{\varvec{A}}_2)=\text{ trace }({\varvec{A}}_2{\varvec{A}}_1)\) for square matrices \({\varvec{A}}_1\) and \({\varvec{A}}_2\) of the same order, we obtain

$$\begin{aligned} \text{ trace }({\varvec{B}}{\varvec{J}}{\varvec{B}}^\mathrm{T}{\varvec{P}})= \text{ trace }({\varvec{S}}_P {\varvec{BJB}}^\mathrm{T} {\varvec{S}}_P^\mathrm{T}{\varvec{\varLambda }})=0, \end{aligned}$$
(23)

because \({\varvec{S}}_P {\varvec{BJB}}^\mathrm{T} {\varvec{S}}_P^\mathrm{T}\) is skew-symmetric and \({\varvec{\varLambda }}\) is diagonal. The fourth term in the right-hand side of (22) can be calculated as

$$\begin{aligned} \text{ trace }({\varvec{BJD}})= & {} \left( \frac{\partial {\varvec{b}}_2}{\partial {\varvec{z}}}{\varvec{b}}_1 - \frac{\partial {\varvec{b}}_1}{\partial {\varvec{z}}}{\varvec{b}}_2 \right) ^\mathrm{T} \nabla V \nonumber \\= & {} (\text{ ad }_{\small {{\varvec{b}}_1}}{\varvec{b}}_2)^\mathrm{T} \nabla V . \end{aligned}$$
(24)

The above Eq. (24) shows that the skew-symmetric matrix \({\varvec{J}}\) makes the effect of the Lie bracket \(\text{ ad }_{\small {{\varvec{b}}_1}}{\varvec{b}}_2\). From (23) and (24), (22) is rewritten as

(25)

A necessary condition for the equilibrium point \({\varvec{z}}_0\) to be stable is that \({\uplambda }_1+{\uplambda }_2 \le 0\), and it is expressed from (25) as follows:

(26)

We recall that any equilibrium point \({\varvec{z}}_0\) is in \({\mathcal {H}}\) and satisfies

$$\begin{aligned} {\varvec{B}}^\mathrm{T}\nabla V =0 . \end{aligned}$$
(27)

From the above equations, we obtain the following proposition.

Proposition 2

All stable equilibrium points of the system (17) are located in the regions that are defined by (26) and (27), while the points of \({\mathcal {H}}\) outside the regions are unstable equilibrium points.

For a sufficiently small \(\epsilon \), from (26) and (27), we obtain that

$$\begin{aligned} {\varvec{C}}^\mathrm{T} \nabla V \approx 0 \Leftrightarrow \nabla V \approx 0, \end{aligned}$$
(28)

where \({\varvec{C}}\) is nonsingular from assumption 4. As a result, only the points near the critical points of \(V\) satisfy both (26) and (27). From the above proposition, if stable equilibrium points exist, they must be located in the small regions near the critical points. As \(\epsilon \) approaches zero, those regions shrink until they become the critical points.

From property (c), the critical points of \(V\) are a minimum at the origin and saddles if \(V\) has them. Denoting a critical point as \({\varvec{z}}_c\), \({\varvec{A}}\) in (19) is rewritten for \({\varvec{z}}_0={\varvec{z}}_c\) as

$$\begin{aligned} {\varvec{A}}({\varvec{z}}_c) = -\alpha {\varvec{B}}({\varvec{z}}_c){\varvec{B}}({\varvec{z}}_c)^\mathrm{T}{\varvec{P}}({\varvec{z}}_c), \end{aligned}$$
(29)

because \({\varvec{D}}=0\) and \(\bar{\beta }=0\) from \(\nabla V =0\) at a critical point.

At the origin, the function \(V\) has a minimum, and the Hessian matrix \({\varvec{P}}\) is positive definite from property (d). In the diagonalization of \({\varvec{P}} = {\varvec{S}}_P^\mathrm{T} {\varvec{\varLambda }} {\varvec{S}}_P\), \({\varvec{\varLambda }}\) is also positive definite. From (29), the matrix \({\varvec{A}}\) is similar to the following semi-negative definite matrix:

$$\begin{aligned} \bar{{\varvec{A}}} = -\alpha \sqrt{{\varvec{\varLambda }}} {\varvec{S}}_P {\varvec{B}}{\varvec{B}}^\mathrm{T}{\varvec{S}}_P^\mathrm{T}\sqrt{{\varvec{\varLambda }}} , \end{aligned}$$
(30)

where \(\sqrt{{\varvec{\varLambda }}}\) is a positive definite diagonal matrix such that \((\sqrt{{\varvec{\varLambda }}})^2={\varvec{\varLambda }}\). Since \(\text{ rank }(\bar{{\varvec{A}}})=2\) from \(\text{ rank }({\varvec{B}})=2\), two eigenvalues of \(\bar{{\varvec{A}}}\) are negative, that is, two eigenvalues of \({\varvec{A}}(0)\), \({\uplambda }_1\) and \({\uplambda }_2\), are negative. As a result, the origin, \({\varvec{z}}_c=0\), is a stable equilibrium point.

For a saddle point, \({\varvec{P}}\) has at least one negative eigenvalue from property (d). If the system did not have nonholonomic constraints (\({\varvec{B}}\) was \(3\times 3\) and full rank) and \({\dot{{\varvec{z}}}} = -\nabla V\) was realized with \({\varvec{u}}=-{\varvec{B}}^{-1}\nabla V\), the linearized Eq. (18) would be \(\delta {\varvec{z}} = -{\varvec{P}}\delta {\varvec{z}}\) and the system would escape from the saddle easily by moving along the eigenvector of the negative eigenvalue. However, it is possible that the system does not move along the eigenvector of the negative eigenvalue due to the nonholonomic constraint. For example, if the eigenvector is perpendicular to the column space of \({\varvec{B}}\), the negative eigenvalue of \({\varvec{P}}\) does not affect on the eigenvalues of \({\varvec{A}}\). Therefore, we have to investigate the eigenvalues of \({\varvec{A}}({\varvec{z}}_c)\) for each saddle in order to know the stability of the saddle. We suppose that there exist \(M\) saddles of \(V\) and denote the saddles as the points \(S_{i}\) and their coordinates as \({\varvec{z}}={\varvec{z}}_{si}\) (\(i=1,\ldots , M\)). Assuming that the first \(N\) of them satisfy that the real parts of \({\uplambda }_1\) and \({\uplambda }_2\) are negative or zero, we denote the \(N\) points as \(S^{*}_i\) (\(i=1,\ldots , N \le M\)).

The behavior of the controlled system (14) is summarized as follows: The origin is a stable equilibrium point of the controlled system. The point \(S^{*}_i\) is also a stable equilibrium point if the real parts of both \({\uplambda }_1\) and \({\uplambda }_2\) are negative. When at least one of the real parts is zero, the point \(S^{*}_i\) may be stable or not due to the nonlinear terms. The other points in \({\mathcal {H}}\) are unstable equilibrium points. Therefore, the system converges to the origin or the points \(S^{*}_i\) from almost all initial states. Figure 1 is a sketch of the set of equilibria \({\mathcal {H}}\) and the critical points \({\varvec{z}}_c\), which is drawn inspired by the numerical examples for a two-wheeled mobile robot shown in the next section.

Fig. 1
figure 1

Equilibrium points of the system (All the equilibrium points are in \({\mathcal {H}}\). The minimum and some saddles of \(V\) are stable equilibrium points, while the other points in \({\mathcal {H}}\) are unstable)

In this section, we constructed a feedback controller for a nonholonomic system that is expressed in a general form (1), by using potential functions that satisfy the properties (a–e). The controller can be applied to many examples such as a two-wheeled mobile robot, a satellite with two reaction wheels and a planar space robot composed of three links, because they can be expressed by (1). An approach with a potential function would be useful when the state space \({\mathcal {D}}\) is restricted. The two-wheeled mobile robot has to avoid walls and obstacles, and the joint rotation of a space robot is limited by the maximum joint angle. In the next section, we will apply the controller to a two-wheeled mobile robot among obstacles.

3 Application to a two-wheeled mobile robot

In this section, the controller (8) is applied to a two-wheeled mobile robot among obstacles. Under the assumption that the wheels of the robot do not skid sideways, the motion of a two-wheeled mobile robot on a floor surface can be expressed in the form (1):

$$\begin{aligned} {\dot{{\varvec{z}}}} ={\varvec{B}}({\varvec{z}}) {\varvec{u}} \equiv {\varvec{b}}_1({\varvec{z}}) u_1 + {\varvec{b}}_2({\varvec{z}}) u_2, \end{aligned}$$
(31)
$$\begin{aligned} {\varvec{z}}=\left[ \begin{array}{c} z_1 \\ z_2 \\ \theta \end{array} \right] ,\ {\varvec{B}}=\left[ \begin{array}{cc} \cos \theta &{}0 \\ \sin \theta &{} 0 \\ 0 &{} 1 \end{array} \right] ,\ {\varvec{u}}= \left[ \begin{array}{c} u_1 \\ u_2 \end{array}\right] , \end{aligned}$$

where \(z_1\) and \(z_2\) denote the position of the robot and \(\theta \) denotes the orientation of the robot (Fig. 2). The control inputs of the system are translational velocity \(u_1\) and angular velocity \(u_2\) of the robot.

Fig. 2
figure 2

State variables, \(z_1\), \(z_2\) and \(\theta \), and inputs, \(u_1\) and \(u_2\), of a two-wheeled mobile robot

The Lie bracket between \({\varvec{b}}_1\) and \({\varvec{b}}_2\) is calculated as

$$\begin{aligned} \text{ ad }_{\small {{\varvec{b}}_1}}{\varvec{b}}_2=\frac{\partial {\varvec{b}}_2}{\partial {\varvec{z}}}{\varvec{b}}_1 - \frac{\partial {\varvec{b}}_1}{\partial {\varvec{z}}}{\varvec{b}}_2 = [\sin \theta , -\cos \theta , 0]^\mathrm{T} . \end{aligned}$$
(32)

The system (31) is controllable, because \({\varvec{b}}_1\), \({\varvec{b}}_2\) and \(\text{ ad }_{\small {{\varvec{b}}_1}}{\varvec{b}}_2\) are linearly independent.

In [38], we considered two kinds of obstacles, flat walls and star-shaped obstacles and constructed potential functions for them in order to obtain a feedback controller in the same form as (8). In case of flat walls, the potential function does not have any saddles, although the admissible area for the robot is limited by the walls. The controller (8) stabilizes the robot to the desired position and orientation without any modification of the controller. When there are star-shaped obstacles on the floor surface, the potential function has saddles. In [38], we added a periodic input to the input (8) near the saddles to escape from them. In this paper, we consider only star-shaped obstacles and propose a new way of escaping from the saddles by using a time-varying potential function.

3.1 Potential functions

Rimon et al. [5] have proposed a potential function, called navigation function, for robot navigation in an environment with star-shaped obstacles. It is assumed that the obstacles are static and that their position and shape are known. We also assume that the robot is a point mobile robot. An obstacle \({\mathcal {O}}_i\) \((i=0, \ldots , M)\) can be expressed by a real-valued function \(O_i\) called obstacle function as follows:

$$\begin{aligned} {\mathcal {O}}_i=\{ {\varvec{r}} \in {\varvec{R}}^2 | O_i({\varvec{r}}) \le 0\}, \end{aligned}$$
(33)

where \({\varvec{r}}=[z_1 , z_2]^\mathrm{T}\). The obstacle function \(O_i\) is zero on the boundary of \({\mathcal {O}}_i\), positive on the outside of \({\mathcal {O}}_i\) and negative on the inside of \({\mathcal {O}}_i\). When the mobile robot goes toward the desired point avoiding collision with the obstacles, the state variables \({\varvec{z}}\) must be in an open subset \({\mathcal {D}}\) defined as \({\mathcal {D}}= \{ {\varvec{z}} \, | \, {\varvec{r}} \in {\varvec{R}}^2-\cup _i {\mathcal {O}}_i \, , \, \theta \in {\varvec{R}} \}\). Without loss of generality, the desired point can be set to be the origin in \({\mathcal {D}}\). The outer boundary of the set \({\mathcal {D}}\) is expressed by an obstacle \({\mathcal {O}}_0\), and there are some isolated obstacles in the interior of the outer boundary (Fig. 3).

Fig. 3
figure 3

Star-shaped obstacles on the floor surface

Each obstacle \({\mathcal {O}}_i\) is assumed to be a star-shaped set. The star-shaped set has a “center point,” \({\varvec{q}}_i\), from which all the rays cross the boundary of \({\mathcal {O}}_i\) once and only once and is transformed into a disk by the following coordinate transformation:

$$\begin{aligned} {\varvec{T}}_i({\varvec{r}})= & {} \frac{\rho _i(1\!+\!O_i({\varvec{r}}))}{\Vert {\varvec{r}}\!-\!{\varvec{q}}_i\Vert }({\varvec{r}}-{\varvec{q}}_i)\!+\!{\varvec{p}}_i \ \ (i=1, \ldots , M),\end{aligned}$$
(34)
$$\begin{aligned} {\varvec{T}}_0({\varvec{r}})= & {} \frac{\rho _0(1-O_0({\varvec{r}}))}{\Vert {\varvec{r}}-{\varvec{q}}_0\Vert }({\varvec{r}}-{\varvec{q}}_0)+{\varvec{p}}_0, \end{aligned}$$
(35)

where \(\rho _i\) is a radius of the disk that \({\mathcal {O}}_i\) is transformed into and \({\varvec{p}}_i\) is a center of the disk (\(i=0, \ldots , M\)). A navigation function can be designed as follows:

$$\begin{aligned} V_n({\varvec{r}})= & {} \frac{\Vert {\hat{{\varvec{r}}}}\Vert ^2}{\{\Vert {\hat{{\varvec{r}}}}\Vert ^{2\kappa }+ \prod _{i=0}^{M}\hat{O}_i({\hat{{\varvec{r}}}})\}^{1/\kappa }}, \end{aligned}$$
(36)
$$\begin{aligned} {\hat{{\varvec{r}}}}= & {} [{\hat{z}}_1 , {\hat{z}}_2]^\mathrm{T} = \left( 1-\sum _{i=0}^M s_i({\varvec{r}}) \right) {\varvec{r}}\nonumber \\&+\sum _{i=0}^M s_i\left( {\varvec{r}}) {\varvec{T}}_i({\varvec{r}}\right) , \end{aligned}$$
(37)
$$\begin{aligned} s_i({\varvec{r}})= & {} \frac{\Vert {\varvec{r}}\Vert ^2\prod _{j\ne i}O_j({\varvec{r}})}{\Vert {\varvec{r}}\Vert ^2\prod _{j\ne i}O_j({\varvec{r}})+{\uplambda }_s O_i({\varvec{r}})}, \end{aligned}$$
(38)
$$\begin{aligned} \hat{O}_i({\hat{{\varvec{r}}}})= & {} \Vert {\hat{{\varvec{r}}}}-{\varvec{p}}_i\Vert ^2-\rho _i^2 , \ \hat{O}_0({\hat{{\varvec{r}}}})=\rho _0^2-\Vert {\hat{{\varvec{r}}}}-{\varvec{p}}_0\Vert ^2,\nonumber \\ \end{aligned}$$
(39)

where \(\kappa \) and \({\uplambda }_s\) are positive parameters.

In this paper, the state variables \({\varvec{z}}\) include the orientation \(\theta \), and we construct a potential function for \({\varvec{z}}\) by modifying the navigation function \(V_n({\varvec{r}})\) as follows:

$$\begin{aligned} V({\varvec{z}})=\frac{\Vert {\hat{{\varvec{r}}}}\Vert ^2+w\theta ^2}{\{(\Vert {\hat{{\varvec{r}}}}\Vert ^2+w\theta ^2)^{\kappa }+ \prod _{i=0}^{M}\hat{O}_i({\hat{{\varvec{r}}}})\}^{1/\kappa }} . \end{aligned}$$
(40)

The coefficient \(w\) of \(\theta ^2\) is defined as

$$\begin{aligned} w({\hat{{\varvec{r}}}})=k_w/(k_w+\Vert {\hat{{\varvec{r}}}}\Vert ^2) , \end{aligned}$$
(41)

where \(k_w\) is a positive constant.

It can be shown, from properties of \(V_n({\varvec{r}})\), that \(V({\varvec{z}})\) satisfies the properties (a–e). From (40), we have an additional property of \(V({\varvec{z}})\) as follows.

  1. (f)

    \(\partial V/\partial \theta =0 \Leftrightarrow \theta = 0 \, \Rightarrow \partial ^2 V/\partial z_1 \partial \theta =\partial ^2 V/\partial z_2 \partial \theta =0\) and \(\partial ^2 V/\partial \theta ^2 > 0\).

The property (d) of \(V\) holds from the above property, for a navigation function \(V_n\) that is a Morse function. The matrix \({\varvec{P}}\) satisfies (77) in “Appendix 2” at the critical points.

3.2 Time-invariant controller

Based on the potential function \(V({\varvec{z}})\) derived in Sect. 3.1, the controller (8) is constructed as

$$\begin{aligned} {\varvec{u}}=-(\alpha {\varvec{I}} + {\hat{\beta }} {\varvec{J}}){\varvec{B}}^\mathrm{T}\nabla V . \end{aligned}$$
(42)

The function \(h\) is chosen as

$$\begin{aligned} h({\varvec{z}})=g({\varvec{z}})^2+\epsilon _g V({\varvec{z}}) \sqrt{g({\varvec{z}})}, \end{aligned}$$
(43)

where \(\epsilon _g\) is a small positive constant. The function \(h\) does not have to be a function of only \(g\). For \(h\) in (43), the input vector is continuous except at \({\varvec{z}}=0\), but is not differentiable for \(\forall {\varvec{z}} \) in the set \({\mathcal {H}}\). The same analytical results as in Sect. 2 are obtained for \(h\) in (43).

To analyze the stability of the system, we have to modify the controller (42) as in Sect. 2.3.

$$\begin{aligned} {\varvec{u}}=-(\alpha {\varvec{I}} + \tanh \Bigl (\frac{h({\varvec{z}})}{\epsilon }\Bigr ) {\hat{\beta }} {\varvec{J}}){\varvec{B}}^\mathrm{T}\nabla V . \end{aligned}$$
(44)

The same linearized equation as in (18) is obtained with the controller (44). From property (f), the equilibrium points in the set \({\mathcal {H}}\) satisfy the following equation:

$$\begin{aligned} {\varvec{B}}^\mathrm{T}\nabla V=0 \Leftrightarrow \partial V/\partial z_1= 0 \text{ and } \partial V/\partial \theta = \theta =0 . \end{aligned}$$
(45)

Then, the eigenvalues of \({\varvec{A}}\), \({\uplambda }_1\) and \({\uplambda }_2\), are calculated as

$$\begin{aligned} {\uplambda }_1, {\uplambda }_2 = \left( -\eta _a\pm \sqrt{\eta _a^2-4\eta _b}\right) \Big /2, \end{aligned}$$
(46)

where

$$\begin{aligned} \eta _a= & {} \alpha \left( \frac{{\partial }^2 V }{\partial {z_1}^2 }+\frac{{\partial }^2 V }{\partial {\theta }^2 }\right) - \frac{\beta }{\epsilon }\left( \frac{\partial V }{\partial z_2 }\right) ^2, \end{aligned}$$
(47)
$$\begin{aligned} \eta _b= & {} \left[ \alpha ^2+ \frac{\beta ^2}{\epsilon ^2}\left( \frac{\partial V }{\partial z_2 }\right) ^2\right] \frac{{\partial }^2 V }{\partial {z_1}^2 }\frac{{\partial }^2 V }{\partial {\theta }^2 } . \end{aligned}$$
(48)

The necessary condition (26) for an equilibrium point to be stable is rewritten as

$$\begin{aligned} \left( \frac{\partial V }{\partial z_2 }\right) ^2 \le \frac{\epsilon \alpha }{\beta }\left( \frac{{\partial }^2 V }{\partial {z_1}^2 }+\frac{{\partial }^2 V }{\partial {\theta }^2 }\right) . \end{aligned}$$
(49)

From (46), another necessary condition is obtained as follows:

$$\begin{aligned} \frac{{\partial }^2 V }{\partial {z_1}^2 } \ge 0 . \end{aligned}$$
(50)

If a critical point of \(V\) satisfies (50), the real parts of \({\uplambda }_1\) and \({\uplambda }_2\) for the critical point are negative or zero. The saddles denoted as \(S^{*}_i\) in Sect. 2 are the saddles that satisfy (50).

The above results for (44) are applied to the system with the controller (42) by taking the parameter \(\epsilon \) to 0. As a result, the system with (42) converges to the origin or one of the saddles that satisfy (50) from almost all initial states.

Note 1

The region of attraction of point \(S^{*}_i\) can be approximated to be a two-dimensional space in a small neighborhood of \(S^{*}_i\) (See “Appendix 1”). The system goes away from \(S^{*}_i\) slowly outside the two-dimensional space, while \(z_1\) and \(\theta \) oscillate with small amplitude and high frequency.

Note 2

When \({\varvec{z}}(t)\) passes near \({\mathcal {H}}\), the input \({\varvec{u}}\) may have large values of \({\mathcal {O}}(1/(\epsilon _g V)^{2/3})\). However, because the system (31) is a driftless control-affine system, we can put the upper limit on \(\Vert {\varvec{u}} \Vert \) without changing the path of \({\varvec{z}}\) by modifying the norm of the input. For example, the following modified input has the upper limit of \(k_L\):

$$\begin{aligned} {\varvec{u}}= & {} \frac{-k_L}{1 +\Vert (\alpha {\varvec{I}} + {\hat{\beta }} {\varvec{J}}){\varvec{B}}^\mathrm{T}\nabla V \Vert } (\alpha {\varvec{I}} + {\hat{\beta }} {\varvec{J}}){\varvec{B}}^\mathrm{T}\nabla V \nonumber \\\equiv & {} {\varvec{u}}_L , \end{aligned}$$
(51)

where \(k_L\) is a positive constant. In a similar way as in [36], it can be shown that, as the system approaches the origin, the input \({\varvec{u}}\) in (42) [or (51)] converges to zero along the system trajectory when \(\beta > 4 \alpha \).

3.3 Saddle avoidance via time-varying potential functions

In the remainder of this section, we use \({\varvec{u}}_L\) in (51) as the controller for the mobile robot among obstacles. However, further modification of the controller is proposed in order to avoid the convergence to \(S^{*}_i\) and the oscillatory behavior of \({\varvec{z}}\) near \(S^{*}_i\) mentioned in Note 1. The basic idea is to make \(S^{*}_i\) temporarily unstable by changing the desired orientation of the robot. If the desired orientation is set to be a nonzero constant value of \(\theta _\mathrm{d}\), the saddle \(S^{*}_i\) is shifted from \({\varvec{z}}_{si}\) to \({\varvec{z}}_{si}+[0,0,\theta _\mathrm{d}]^\mathrm{T}\), and the same results as in Sect. 3.2 are obtained by rotating the coordinate axes \((z_1,z_2)\) through \(\theta _\mathrm{d}\) and redefining \(\theta \) as \(\theta -\theta _\mathrm{d}\). That is, denoting the new coordinates as \(({\tilde{z}}_1,{\tilde{z}}_2,{\tilde{\theta }})\), the necessary conditions for the equilibrium point to be stable are written in the same form as in (49) and (50) for \(({\tilde{z}}_1,{\tilde{z}}_2,{\tilde{\theta }})\). By choosing the desired orientation \(\theta _\mathrm{d}\) so that \(\partial ^2 V / \partial {\tilde{z}}_1^2 < 0 \), we can make the saddle \(S^{*}_i\) unstable.

The desired orientation near \(S_i\) is determined by the matrix \({\varvec{P}} = \partial (\nabla V)/\partial {\varvec{z}}\). From (40), \({\varvec{P}}\) has two positive eigenvalues and one negative eigenvalue at a saddle point \(S_i\) (See also “Appendix 2”). The eigenvector corresponding to the negative eigenvalue lies in \(z_1 z_2\) plane. We denote it as \({\varvec{x}}_{i}=[x_{i1}, x_{i2}, 0]^\mathrm{T}\) and the direction of \({\varvec{x}}_{i}\) in \(z_1 z_2\) plane as \(\theta _{si}\). When the system moves from \(S_i\) along \({\varvec{x}}_i\), the value of function \(V\) decreases. If the desired orientation \(\theta _\mathrm{d}\) is chosen as \(\theta _{si}\), \(\partial ^2 V / \partial {\tilde{z}}_1^2 < 0 \) at \(S_i\).

We consider a time-varying desired orientation \(\theta _\mathrm{d}(t)\) that varies continuously from zero to \(\theta _{si}\) when the state \({\varvec{z}}\) comes into a small neighborhood of \(S_i\) in \(z_1 z_2\) plane. The neighborhood is defined as

$$\begin{aligned} R_{i}=\left\{ (z_1, z_2) | \ \sqrt{(z_1-z_{si1})^2+(z_2-z_{si2})^2} < \tau \right\} , \end{aligned}$$
(52)

where \(\tau \) is a small constant and chosen so that any two neighborhoods do not overlap.

The potential function \({\tilde{V}}\) for \(\theta _\mathrm{d}(t)\) is chosen as

$$\begin{aligned} {\tilde{V}}({\varvec{z}},\theta _\mathrm{d}(t)) = V(z_1, z_2, \theta -\theta _\mathrm{d}) . \end{aligned}$$
(53)

The function \({\tilde{V}}\) is identical with \(V\) for \(\theta _\mathrm{d} = 0\).

The control input is modified to make \({\tilde{V}}\) monotonically decreasing as follows:

$$\begin{aligned} {\varvec{u}} = {\tilde{{\varvec{u}}}}_L + [0 , {\dot{\theta }}_\mathrm{d}]^\mathrm{T}, \end{aligned}$$
(54)

where \({\tilde{{\varvec{u}}}}_L = - {\tilde{k}}_L (\alpha {\varvec{I}} + {\hat{\beta }}{\varvec{J}}){\varvec{B}}^\mathrm{T}\nabla {\tilde{V}}\) and \({\tilde{k}}_L = k_L/(1 +\Vert (\alpha {\varvec{I}} + {\hat{\beta }}{\varvec{J}}){\varvec{B}}^\mathrm{T}\nabla {\tilde{V}} \Vert )\). The time derivative of \({\tilde{V}}\) along the system trajectory is calculated as

$$\begin{aligned} \dot{{\tilde{V}}}= & {} (\nabla {\tilde{V}})^\mathrm{T} {\dot{{\varvec{z}}}} + \partial {\tilde{V}}/\partial t \nonumber \\= & {} (\nabla {\tilde{V}})^\mathrm{T} {\varvec{B}}({\tilde{{\varvec{u}}}}_L +[0 , {\dot{\theta }}_\mathrm{d}]^\mathrm{T} ) - (\partial {\tilde{V}}/\partial \theta ) {\dot{\theta }}_\mathrm{d}\nonumber \\= & {} (\nabla {\tilde{V}})^\mathrm{T} {\varvec{B}}{\tilde{{\varvec{u}}}}_L + (\partial {\tilde{V}}/\partial \theta ) {\dot{\theta }}_\mathrm{d} - (\partial {\tilde{V}}/\partial \theta ) {\dot{\theta }}_\mathrm{d}\nonumber \\= & {} - {\tilde{k}}_L \alpha \Vert {\varvec{B}}^\mathrm{T}\nabla {\tilde{V}}\Vert ^2 \le 0 . \end{aligned}$$
(55)

Using the input (54), we consider the following algorithm for changing \(\theta _\mathrm{d}(t)\).

  1. 1.

    Set \(\theta _\mathrm{d} = 0\). If \({\varvec{z}} \in R_i\) and \(V({\varvec{z}}) > V({\varvec{z}}_{si})\) at the time \(t\), we set \(t_0 = t\) and go to 2.

  2. 2.

    Set

    $$\begin{aligned} \theta _\mathrm{d}(t) = (\theta _{si}/2)\cdot (1-\cos (\pi (t-t_0)/T)), \end{aligned}$$
    (56)

    for   \(t_0 < t \le t_0 + T\), and go to 3.

  3. 3.

    Set \(\theta _\mathrm{d} = \theta _{si}\). If \({\tilde{V}}({\varvec{z}},\theta _{si}) \le V({\varvec{z}}_{si})\) or \({\varvec{z}} \in R_j\) (\(j \ne i\)) at the time \(t\), we set \(t_0 = t\) and go to 4.

  4. 4.

    Set

    $$\begin{aligned} \theta _\mathrm{d}(t) = (\theta _{si}/2)\times (1 + \cos (\pi (t-t_0)/T)), \end{aligned}$$
    (57)

    for \(t_0 < t \le t_0 + T\), and return to 1.

In step 1, the system may approach to a stable equilibrium located at \(S_i^{*}\). If the system enters the neighborhood \(R_i\), the desired orientation \(\theta _\mathrm{d}\) is varied from \(0\) to \(\theta _{si}\) through step 2. In step 3, the equilibrium at \(S_i^{*}\) is unstable, and the system goes away from \(S_i^{*}\) decreasing \({\tilde{V}}({\varvec{z}},\theta _{si})\). If \({\tilde{V}}({\varvec{z}},\theta _{si}) \le V({\varvec{z}}_{si})\) at the end of step 3, the system never converge to \(S_i^{*}\) because \({\tilde{V}}({\varvec{z}},\theta _\mathrm{d}(t))\) is monotonically decreasing. Then, the desired orientation is set to be zero again through step 4. If the system in step 3 enters another neighborhood \(R_j\) before \({\tilde{V}}({\varvec{z}},\theta _{si}) \le V({\varvec{z}}_{si})\) is satisfied, we return to step 1 to avoid the convergence to \(S_j\).

Proposition 3

By the above algorithm, the system avoids the convergence to any \(S_i\) without increasing the value of \({\tilde{V}}({\varvec{z}},\theta _\mathrm{d}(t))\).

It is shown by contradiction that steps 2–4 are not repeated infinite times. If the system entered the neighborhood \(R_i\) of \(S_i^{*}\) satisfying \(V({\varvec{z}}) > V({\varvec{z}}_{si})\) infinite times in step 1, \({\varvec{B}}^\mathrm{T}\nabla V \approx 0\) from (55) at the \(k\) th time for sufficiently large \(k\). That is, \({\varvec{z}}\) is almost on the \({\mathcal {H}}\) at the moment when the system enters \(R_i\). Therefore, \({\varvec{z}}\) at the moment can be expressed as \({\varvec{z}}_{si}+a{\varvec{t}}\) where \(a\) is a small scalar and \({\varvec{t}}\) satisfies \((\partial {\varvec{B}}^\mathrm{T}\nabla V/\partial {\varvec{z}})|_{{\varvec{z}}={\varvec{z}}_{si}} {\varvec{t}} = 0\). Then, we obtain

$$\begin{aligned}&V({\varvec{z}}) - V({\varvec{z}}_{si}) \approx -\frac{a^2}{2} {\varvec{t}}^\mathrm{T}{\varvec{P}}({\varvec{z}}_{si}){\varvec{t}} \nonumber \\&\quad = -\frac{a^2}{2}\frac{\partial ^2 V}{\partial z_1^2} \Bigl \{ \Bigl (\frac{\partial ^2 V}{\partial z_1 \partial z_2}\Bigr )^2 - \frac{\partial ^2 V}{\partial z_1^2}\frac{\partial ^2 V}{\partial z_2^2} \Bigr \} \le 0,\qquad \end{aligned}$$
(58)

because \(\partial ^2 V/\partial z_1^2 \ge 0\) and \((\partial ^2 V/\partial z_1 \partial z_2)^2 - \partial ^2 V/\partial z_1^2 \cdot \partial ^2 V/\partial z_2^2 > 0\) for \(S_i^{*}\) (See “Appendix 2”). It contradicts \(V({\varvec{z}}) > V({\varvec{z}}_{si})\). As a result, the system avoids the convergence to \(S_i^*\) with finite repetitions of steps 2–4 and goes toward the origin.

Note 3

Several other strategies can be considered to avoid the saddle points. In [38], we have proposed a method of adding a periodic input that decreases the averaged value of \(V\).

3.4 Numerical simulations

In this subsection, the behavior of the system with the input (54) will be examined, and the results in Sects. 3.2 and 3.3 will be verified by numerical simulations.

Numerical simulations were performed in two cases: Case 1 and Case 2. In Case 1, there are two obstacles \({\mathcal {O}}_0\) and \({\mathcal {O}}_1\) on the floor surface that are expressed by the following obstacle functions:

$$\begin{aligned} O_0\!=\!1\!-\! (z_1/5)^4\!-\!(z_2/5)^4 , \ O_1\!=\!(z_1+1.5)^4 \!+\!z_2^4\!-\!1 . \end{aligned}$$

In Case 2, there are three obstacles, \({\mathcal {O}}_0\), \({\mathcal {O}}_1\) and \({\mathcal {O}}_2\), on the floor. Obstacles \({\mathcal {O}}_0\) and \({\mathcal {O}}_1\) are the same ones used in Case 1, and obstacle \({\mathcal {O}}_2\) is expressed by the following obstacle function:

$$\begin{aligned} O_2=(z_1-2.5)^4+((z_2-0.5)/2.5)^4-1 . \end{aligned}$$

In both cases, the parameters of \(V\), \(\kappa \), \({\uplambda }_s\) and \(k_w\) were set to \(2.0\), \(1.0\times 10^{6}\) and \(0.1\), respectively, and parameters in (34) and (35), \(\rho _0\), \({\varvec{p}}_0\), \(\rho _1\) and \({\varvec{p}}_1\), were set to \(8.0\), \([0.0 , 0.0 ]^\mathrm{T}\), \(0.8\) and \([-1.5 , 0.0]^\mathrm{T}\). In Case 2, \(\rho _2\) and \({\varvec{p}}_2\) were set to \(0.8\) and \([2.5 , 0.5 ]^\mathrm{T}\). The parameters of the controller, \(\alpha \), \(\beta \), \(\epsilon _g\), \(k_L\) and \(\tau \), were set to \(10.0\), \(50.0\), \(1.0\times 10^{-6}\), \(1.0\) and \(0.01\) in both cases. The initial values of \({\varvec{z}}\) were set to \([-3.85 , 0.0 , 0.0]^\mathrm{T}\) in Case 1 and \([3.5 , 3.5 , 0.0]^\mathrm{T}\) in Case 2.

In Case 1, there exists one saddle point \(S_1\) at \({\varvec{z}}=[-3.36 , 0.0 , 0.0]^\mathrm{T}\) and the system with the controller (54) enters the region \(R_1\) defined by (52). The parameter \(T\) in (56) and (57) was set to \(3.0\). Figure 4 shows the trajectory of the system in the \(z_1z_2\) plane. The system with the algorithm in Sect. 3.3 is not trapped in \(S_1\) by changing the desired orientation \(\theta _\mathrm{d}\) to \(\theta _{si}=\pi /2\) and converges to the origin avoiding collision with the obstacles, \({\mathcal {O}}_0\) and \({\mathcal {O}}_1\). Figure 5 shows the time history of the input \({\varvec{u}}\). For \(5.1 < t \le 46.7\), the system is in step 3 of the algorithm, and the input \({\varvec{u}}\) makes the robot go away from \(S_1\) slowly. The value of \({\tilde{V}}\) is monotonically decreasing along the trajectory.

Fig. 4
figure 4

Motion of the robot in the \(z_1 z_2\) plane (Case 1)

Fig. 5
figure 5

Time histories of input variables \(u_1\) and \(u_2\) (Case 1)

In Case 2, there exist two saddle points \(S_1\) and \(S_2\) at \({\varvec{z}}=[-4.23 , 0.27 , 0.0]^\mathrm{T}\) and \({\varvec{z}}=[4.60 , 1.02 , 0.0]^\mathrm{T}\). However, the controlled system does not enter either \(R_1\) or \(R_2\). Figure 6 shows the trajectory of the system in the \(z_1z_2\) plane. The system converges to the origin without any collision with the obstacles, \({\mathcal {O}}_0\), \({\mathcal {O}}_1\) and \({\mathcal {O}}_2\).

Fig. 6
figure 6

Motion of the robot in the \(z_1 z_2\) plane (Case 2)

Note 4

The norm of the input vector, \(\Vert {\varvec{u}}\Vert \), changes abruptly in Fig. 5, which tends to happen when \({\varvec{z}}(t)\) passes near \({\mathcal {H}}\). From a practical point of view, such abrupt changes of \(\Vert {\varvec{u}}\Vert \) are undesirable because they may cause too large acceleration of the robot. In order to prevent such abrupt changes, we can choose another modification of the control input \({\varvec{u}}\) as shown in Note 2. For example, the following input keeps \(\Vert {\varvec{u}}\Vert \) close to \(k_1\) for \(\Vert {\varvec{z}}\Vert > {\mathcal {O}}(\sqrt{k_2})\):

$$\begin{aligned} {\varvec{u}} = \frac{-k_1\tanh (\Vert {\varvec{z}}\Vert ^2/k_2)}{\Vert (\alpha {\varvec{I}} + {\hat{\beta }} {\varvec{J}}){\varvec{B}}^\mathrm{T}\nabla V \Vert } (\alpha {\varvec{I}} + {\hat{\beta }} {\varvec{J}}){\varvec{B}}^\mathrm{T}\nabla V, \end{aligned}$$
(59)

where \(k_1\) and \(k_2\) are positive constants.

4 Conclusion

In this paper, we proposed a feedback controller that makes a two-wheeled mobile robot converge to a desired position and orientation among obstacles. First, the controller was designed for a general form of nonholonomic systems with three states and two inputs, based on a potential function that has a minimum and saddles as its critical points. It was shown that the stable equilibrium points of the controlled system are located only at the critical points. Next, the controller was applied to a two-wheeled mobile robot among obstacles. To avoid the convergence to the saddles, the controller was modified by making the potential function time-varying near the saddles. The controlled system converges to the desired point without collision with obstacles. The effectiveness of the controller was verified by numerical simulations.