0
$\begingroup$

https://en.wikipedia.org/wiki/Navigation_function

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.

enter image description here

In the end, I want to get something like this

enter image description here

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]

enter image description here

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?

$\endgroup$
2
  • 1
    $\begingroup$ 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] $\endgroup$
    – mikado
    May 30 at 11:13
  • $\begingroup$ @mikado please, see my edit $\endgroup$
    – dtn
    May 30 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.