# Construction of Navigation Function: Error

https://www.sciencedirect.com/science/article/abs/pii/S0921889015302451

https://arxiv.org/pdf/1605.00638.pdf - Paragraph III

I am trying to create a navigation function for a 2D system.

$$\begin{cases} \dot{x}=-x \\ \dot{y}=-y \end{cases}$$

It is built, according to sources, in the following way.

In the end, I want to get something like this

Well. I am trying to do it according to the following algorithm:

1.$$X=(x,y)$$ - vector of states and $$x_{goal}=(0,0)$$ - vector of goal states;

1. $$x_{obs}=(1,1)$$ - obstacles position;

2. $$\gamma_d(x)=||X-x_{goal}||^2$$

3. $$\beta(x)=(X-x_{obs})^T(X-x_{obs})$$

4. Construct navigation function like: $$\frac{\gamma_d(x)}{(\gamma_d(x)^k+\beta(x))^{1/k}}$$

Well, this is the code in Mathematica and I get utter nonsense. Instead of an area of attraction in the region of the target state, I get uncertainty, and the obstacles are not visible at all.

  Clear["Derivative"]

ClearAll["Global*"]

k = 5;m=1/5;

X = {x, y}

xgoal = {0, 0}

xobs = {-1/2, -1/2}

\[Gamma]d = m Sqrt[(X - xgoal).(X - xgoal)]^2

\[Beta] = (X - xobs).(X - xobs)

\[CapitalPhi] = \[Gamma]d/((\[Gamma]d^(1 k) + \[Beta])^(1/k))

ParametricPlot3D[{x, y, \[CapitalPhi]}, {x, -2, 2}, {y, -2, 2},
PlotPoints -> 100, PlotRange -> All]


EDIT: Problem: I don’t know why, but the coefficient $$m$$ affects the shape of the surface. And the "obstacle" was also displayed. How to explain this and how to make the obstacle more pronounced?

• I don't think you have done anything wrong, but for some reason Mathematica is only showing part of the range of your function. Try ParametricPlot3D[{x, y, \[CapitalPhi]}, {x, -4, 4}, {y, -4, 4}, PlotPoints -> 50, PlotRange -> All]` May 30 at 11:13