Navigation function
# Navigation function

Navigation function usually refers to a function of position, velocity, acceleration and time which is used to plan robot trajectories through the environment. Generally, the goal of a navigation function is to create feasible, safe paths that avoid obstacles while allowing a robot to move from its starting configuration to its goal configuration.

## Potential functions as navigation functions

Potential functions assume that the environment or work space is known. Obstacles are assigned a high potential value, and the goal position is assigned a low potential. To reach the goal position, a robot only needs to follow the negative gradient of the surface.

We can formalize this concept mathematically as following: Let $X$ be the state space of all possible configurations of a robot. Let $X_{g}\subset X$ denote the goal region of the state space.

Then a potential function $\phi (x)$ is called a (feasible) navigation function if

* $\phi (x)=0\ \forall x\in X_{g}$
* $\phi (x)=\infty$ if and only if no point in ${X_{g}}$ is reachable from $x$.
* For every reachable state, $x\in X\setminus {X_{g}}$, the local operator produces a state $x'$ for which $\phi (x')<\phi (x)$.

## Probabilistic navigation function

Probabilistic navigation function is an extension of the classical navigation function for static stochastic scenarios. The function is defined by permitted collision probability, which limits the risk during motion. The Minkowski sum used for in the classical definition is replaced with a convolution of the geometries and the Probability Density Functionss of locations. Denoting the target position by $x_{d}$, the Probabilistic navigation function is defined as: ${\varphi }(x)={\frac {\gamma _{d}(x)}{{\left[{\gamma _{d}^{K}(x)+\beta \left(x\right)}\right]}^{\frac {1}{K}}}}$ where $K$ is a predefined constant like in the classical navigation function, which ensures the Morse nature of the function. $\gamma _{d}(x)$ is the distance to the target position ${||x-{x_{d}}|{|^{2}}}$, and $\beta \left(x\right)$ takes into account all obstacles, defined as $\beta \left(x\right)=\prod \limits _{i=0}^{N_{o}}{{\beta _{i}}\left(x\right)}$ where $\beta _{i}(x)$ is based on the probability for a collision at location $x$. The probability for a collision is limited by a predetermined value $\Delta$, meaning: $\beta _{i}(x)=\Delta -p^{i}\left(x\right)$ and, $\beta _{0}(x)=-\Delta +p^{0}\left(x\right)$

where $p^{i}(x)$ is the probability to collide with the i-th obstacle. A map $\varphi$ is said to be a probabilistic navigation function if it satisfies the following conditions:

* It is a navigation function.
* The probability for a collision is bounded by a predefined probability $\Delta$.

## Navigation Function in Optimal Control

While for certain applications, it suffices to have a feasible navigation function, in many cases it is desirable to have an optimal navigation function with respect to a given cost functional $J$. Formalized as an optimal control problem, we can write

    ${\text{minimize }}J(x_{1:T},u_{1:T})=\int \limits _{T}L(x_{t},u_{t},t)dt$
    ${\text{subject to }}{\dot {x_{t}}}=f(x_{t},u_{t})$

whereby $x$ is the state, $u$ is the control to apply, $L$ is a cost at a certain state $x$ if we apply a control $u$, and $f$ models the transition dynamics of the system.

Applying Bellman's principle of optimality the optimal cost-to-go function is defined as

$\displaystyle \phi (x_{t})=\min _{u_{t}\in U(x_{t})}{\Big \L(x_{t},u_{t})+\phi (f(x_{t},u_{t})){\Big \}}$

Together with the above defined axioms we can define the optimal navigation function as

* $\phi (x)=0\ \forall x\in X_{g}$
* $\phi (x)=\infty$ if and only if no point in ${X_{G}}$ is reachable from $x$.
* For every reachable state, $x\in X\setminus {X_{G}}$, the local operator produces a state $x'$ for which $\phi (x')<\phi (x)$.
* $\displaystyle \phi (x_{t})=\min _{u_{t}\in U(x_{t})}{\Big \L(x_{t},u_{t})+\phi (f(x_{t},u_{t})){\Big \}}$

Even if a navigation function is an example for reactive control, it can be utilized for optimal control problems as well which includes planning capabilities.

## Stochastic Navigation Function

If we assume the transition dynamics of the system or the cost function as subjected to noise, we obtain a stochastic optimal control problem with a cost $J(x_{t},u_{t})$ and dynamics $f$. In the field of reinforcement learning the cost is replaced by a reward function $R(x_{t},u_{t})$ and the dynamics by the transition probabilities $P(x_{t+1}|x_{t},u_{t})$.

