A Path Planning Algorithm for a Dynamic Environment Based on Proper Generalized Decomposition

: A necessity in the design of a path planning algorithm is to account for the environment. If the movement of the mobile robot is through a dynamic environment, the algorithm needs to include the main constraint: real-time collision avoidance. This kind of problem has been studied by different researchers suggesting different techniques to solve the problem of how to design a trajectory of a mobile robot avoiding collisions with dynamic obstacles. One of these algorithms is the artiﬁcial potential ﬁeld (APF), proposed by O. Khatib in 1986, where a set of an artiﬁcial potential ﬁeld is generated to attract the mobile robot to the goal and to repel the obstacles. This is one of the best options to obtain the trajectory of a mobile robot in real-time (RT). However, the main disadvantage is the presence of deadlocks. The mobile robot can be trapped in one of the local minima. In 1988, J.F. Canny suggested an alternative solution using harmonic functions satisfying the Laplace partial differential equation. When this article appeared, it was nearly impossible to apply this algorithm to RT applications. Years later a novel technique called proper generalized decomposition (PGD) appeared to solve partial differential equations, including parameters, the main appeal being that the solution is obtained once in life, including all the possible parameters. Our previous work, published in 2018, was the ﬁrst approach to study the possibility of applying the PGD to designing a path planning alternative to the algorithms that nowadays exist. The target of this work is to improve our ﬁrst approach while including dynamic obstacles as extra parameters.


Introduction
One of the most important tasks in the navigation problems of mobile robots is to plan a path free of collisions from an initial to a target position in a dynamic environment. The computational cost of this goal is high; consequently, it is unlikely to be applied in real-time (RT) applications [1].
There are many publications in robotics related to geometric path planning (or the piano mover's problem). Researchers have divided the investigation of this topic into different problems. It is possible to distinguish sub-classes of the general problem: sampling-based planners, grid-based and interval-based planners, potential-field-based techniques, [2,3], etc.
The artificial potential field technique (APF) ( [1,4,5]) is one of the most important algorithms for solving these problems. The APF generates an artificial potential field that guides the trajectory of the robot. The target position originates an attractive force which makes the mobile robot move towards it. The dynamic obstacles generate repulsive forces to avoid them. Consequently, it is possible to obtain a unique trajectory from the start to the goal. Its computation is fast, and for that reason, APF works perfectly in RT applications. However, repulsive fields generally create local minima and the robot may not reach the goal even if a solution exist.
To solve the local minima problem, harmonic functions (proposed in [6]) have been used to generate the potential field [7]. The properties of harmonic functions are very interesting for robot planning, see [8]. The main objective is to avoid the appearance of deadlocks, and as the harmonic functions verify the min-max principle, it is possible, [9]. After that, path planning can be considered achieved when harmonic functions are used including some assumptions. Moreover, the environment where the robot has to be guided has dynamic and static obstacles. For that reason, when the robot is close to the obstacles it is necessary to improve the behavior of the robot. This improvement can be obtained through the principle of superposition that satisfies the solutions to Laplace's equation. Besides this, the velocity reference of the robot navigation is also needed, and this vector is acquired with the gradient of an harmonic function.
However, there are some disadvantages when path planning is computed through harmonic functions. These functions cannot be computed in closed form. Therefore, solutions can only be obtained using discrete approximations and the computational burden of these methods is really high. As a consequence, their use is not recommended [10]. For instance, the Laplace equation can be solved using standard numerical methods ( [8,11]). This methodology is useful when the robot moves in an environment including the start and goal positions and the environment does not change. If the environment changes, it is compulsory to recompute the harmonic function, which is unfeasible for RT robot planning. The only profit of this methodology is when the environment remains static, which is not the standard situation. In spite of this, some techniques have sped up this computation ( [12,13]), but the computational burden is still high for RT path planning, with 646s for an environment with 512 × 512 nodes using the EGSOR algorithm in [13].
Therefore, during the last few years researchers have almost discarded these types of functions for RT path planning and have focused on similar approaches. For instance, those developed for underwater robots that account for ocean currents and obstacles by means of the definition of drift fields and the use of grid-based planning strategies ( [14,15]). Additionally, the optimal control theory is very popular for path planning in this context, particularly multi-population genetic algorithms or clustering-based algorithms to solve vehicle task assignments [16].
A short time ago, an original technique called proper generalized decomposition (PGD) was developed to give an approximation of the solutions of non-linear convex variational problems [17]. It is a new methodology for solving problems in high-dimensional spaces ( [18,19]).
The main advantage of PGD is that the solution of the problem is solved once in life, including all the possible solutions and parameters. It is named computational vademecum. PGD opens the possibility of solving problems with a new strategy not possible in the past.
It is possible to see in [11] how important is to have the trajectory precomputed when the obstacles and the goal are fixed. PGD offers the option of obtaining the streamline maps for all the possible solutions combining start/goal positions. This was not possible in the 90s, as the algorithm to solve partial differential equations (PDE) parametrically did not yet exist and researchers had discarded this technique.
Our previous work, references [20,21] developed a PGD-based computational vademecum (PGD-vademecum) or abacus to solve the Laplace equation, allowing the use of the potential flow theory in RT applications when the robot is guided in a static environment [22]. In this paper, the formulation of the PGD-vademecum for dynamic environments with dynamic obstacles is derived, the progressive PGD-vademecum, where the obstacles are considered in the representation as extra parameters. This is modeled as a matrix modifying the properties of the initial domain, and in the context of the potential flow theory, the porosity of the medium. This work has been organized in different sections: In Section 2, we introduce a PGD-based computational vademecum for robot path planning in a dynamic environment. Later, Section 3 explains the progressive construction of a variational vademecum. In Section 4 we provide a numerical example. Finally, Section 5 draws conclusions and future works.

A Variational Vademecum for a Dynamic Obstacle Robotic Problem
Now the variational vademecum is introduced using the potential flow theory in robotics to explain the definition along with a real-life application.

Potential Flow Theory for a Dynamic Obstacle Robotic Problem
Path planning for a dynamic robotic problem based on the potential flow theory has been applied in the literature during the last few years, see [11,17,[23][24][25]. In these articles, the problem is based on the Laplace equation. To begin with, it is necessary to describe the algorithm that describes the flow of an inviscid incompressible fluid. Let us assume a uniform condition irrational flow in a Eulerian configuration, the velocity vector υ, satisfies and hence the velocity can be characterized as the gradient of a scalar potential function, i.e., υ = ∇ X u. As a consequence, the function u appears as a solution of the equation: By using a 2.5D mould filling model similar to [23], represented by a two dimensional domain denoted by Ω X , a Dirac function δ S (respectively, −δ T ) is introduced in the right side of the Equation (2). This δ S means the fluid source (respectively, sink). We can also introduce a matrix term A modelling the porosity of the medium as follows. We assume a unit amount of fluid injected at point S ∈ Ω X during a unit of time and the same unit withdrawn at the point T ∈ Ω X . The velocity of the fluid is now the solution of the D'Arcy like equation, which includes the source term f = δ S − δ S and the porosity of the medium represented by matrix A as follows: Equation (3) needs to be modified introducing boundary conditions. The condition υ · n (n being a vector normal to the boundary Γ) represents that the fluid will not be able to flow across the boundaries. In particular, the resolution of Equation (3), when A is the identity matrix and under the above conditions, is a field of vectors joining the Start point S (source) to the Target point S (sink) without deadlocks [25].
In practice, we can implemented (3) as follows. Consider that the source term f is non-uniform, that is, f = g S 1 Ω X − g T 1 Ω X where the function 1 Ω X (x, y) = 1 when X = (x, y) ∈ Ω X and zero otherwise. The functions g S : Ω X × Ω P → R and g T : Ω X → R are two-dimensional Gaussian density distributions centered in S = (s 1 , s 2 ) and T = (t 1 , t 2 ), respectively, and they both have equal variance that is given by a diagonal matrix Σ = diag(r, r) for some r > 0. We can write, more precisely, where f := g S − g T and the solution is in the form u = u((x, y); (s 1 , s 2 ), (t 1 , t 2 ), r).

Introducing the Variational Vademecum
The Hilbert space which is equivalent to the classical norm on H 1 (Ω X ).
From now on, we will assume that that the common variance r takes a fixed value and the parameter P = (S, T, U 1 , . . . , U d ) ∈ Ω P ⊂ R 4+2d includes the starting point S (source) and the target point S (sink), and also other points of Ω X , denoted by U 1 , . . . , U d , for which the matrix A = A(X, P) satisfies that Aξ is close to zero for all ξ in a small neighborhood of each U i for 1 ≤ i ≤ d. The classical variational formulation for (4) along with u| ∂Ω X = 0 is: For each fixed parameters values P and r find holds for all v ∈ H 1 0 (Ω X ). Here ∇ X denotes the gradient in the coordinates X = (x, y). The variational vademecum is then the solution of (4) and the solution u(X; P) contains all the possible configurations of a dynamic obstacle robotic problem taking the variables (X; P) ∈ Ω X × Ω P ⊂ R 6+2d . In this case, u gives us the set of variational solutions of (4) for all the possible parameter values P ∈ Ω P . We remark that solving once (5) we solve variationally (4) for all the possible parameter values P ∈ Ω P .
The norm · (1,0) is indeed a cross-norm because holds for all u 1 ∈ H 1 0 (Ω X ) and u 2 ∈ L 2 (Ω P ). By taking its completion over this norm, the Hilbert tensor space is obtained as follows: The inner product ·, · (1,0) is given by In particular, we obtain for the so-called rank-one tensors where ∇ X denotes the gradient in the coordinates X = (x, y). We can observe that u(X; P) = 0 for X ∈ ∂Ω X are satisfied for all u ∈ H 0 and that for each fixed P (0) ∈ Ω P , the set F P (0) := {u ∈ H 0 : u = u(X; P (0) )} is a closed subspace of H 0 linearly isomorphic to H 1 0 (Ω X ). It has been introduced in [26] (see also [17,23]) using the mathematical analysis of a progressive PGD to solve (5) in the tensor Hilbert space H 1 0 (Ω X ) for a fixed P ∈ Ω P . In the next sections we will develop a constructive approach to obtain a progressive variational vademecum.

A Progressive Construction of a Variational Vademecum
Let us consider Ω X ⊂ R 2 and Ω P ⊂ R 2k where both are open and bounded domains and k ≥ 1 represents the number of parameters of our model. Let us introduce the variables X = (x, y). The aim of the paper is: given f (X; P) ∈ L 2 (Ω X × Ω P ), defined step by step using Greedy Rank-One Algorithm, a variational answer of the problem with parameters.
Thus, we have a map u(X; P) ∈ L 2 (Ω X ) that solves (6) and (7) for all P ∈ Ω P . The idea of the abacus introduced in [18] is to propose iteratively a global solution of the parametrized PDE (6) and (7) following the ideas that we will explain below. Now, our main goal is to construct iteratively the weak solution of (6) and (7) denoted by u(X; P). Next the set of tensors of bounded rank one is introduced: The main properties of M ≤1 (H 1 0 (Ω X ) ⊗ a L 2 (Ω P )) are given in the next lemma.
(A1) J is Fréchet differentiable, with Fréchet differential J : Thanks to the Lemma 1 and that the functional J satisfies (A1)-(A2), the following definition can be obtained.
Next, before updating m to m + 1, define u m = u m−1 +ẑ m , update m to m + 1 and go to ( * ).
This definition and the next theorem were introduced in [20]. The important factor in the previous procedure is the minimization problem ( * ) because for each m J(u m−1 + ·) is considered a map After each step in the definition of a progressive variational vademecum {u m } m≥1 over the set of tensors of bounded rank-one M ≤1 (H 1 0 (Ω X ) ⊗ a L 2 (Ω P ))) of u, a rank-one function is achieved Ifẑ m = 0 then from Lemma 5 in [17] it follows that u m = u m−1 = u satisfies (10). In consequence, Otherwise, ifẑ m = 0 we write The progressive variational vademecum is computed following this approach: Assume that for each m ≥ 1 the approximation u m (X; Choose the function v (0) 1 ∈ V 2 , randomly and let U (m+1) 2 ⊂ V 2 be a linear subspace such that

Repeat steps 3 and 4 just until
If |J(u m ) − J(u m+1 )| < tol then return u m+1 . Otherwise put m + 2 and go to step 2.

Navigation Example
Harmonic functions describe flow dynamics by means of the Laplace equation, where the potential field is free of local minima and produces a set of streamlines ( [7,8,[11][12][13]). These streamlines are time-independent and describe the movement of a massless fluid element traveling from a start to a target position, following the velocity field derived from the potential field gradient as in (11).
The streamlines generated by the velocity field can be easily computed using any interpolation technique (linear, cubic, spline, etc). Through the streamlines' reconstruction, it is possible to calculate the optimal path to be followed by a robot using any optimization technique that selects the optimal streamline meeting a specific criterion (shortest path, smooth path, etc). For instance, in order to guarantee a continuous path planning, the robot can select the streamline aligned with its orientation. Therefore, the final robot orientation will be the one associated with the selected streamline. In addition, the robot orientation can be modified and a different streamline can be selected.
In some practical situations an obstacle could be seen as a region of the space towards which the robot must not to go. Mathematically this can also be obtained by modifying the properties of the initial domain Ω X , i.e., defining the flux as −A(X, P)∇ X u(X). Higher values of A(X, P) will imply attraction of the robot while smaller values of A(X, P) will provoke a repulsion to the robot. In Figure 1 the black holes represent sources introduced using a parametrized matrix A (in particular the parameters are given by the position of the hole's center and its diameter) and the streamlines resulting from a linear interpolation of the PGD reconstruction are depicted as blue lines. Using this formulation, a different set of obstacles can be modeled by a different definition of function A. Without losing generality, let us assume that all possible obstacle configurations can be modeled by a single parameter P ∈ Ω P (one can always add more parameters to define more complex obstacles since the PGD permits to solve high dimensional problems easily). Therefore the function A (X, P) models all possible obstacle configurations. Then, the use of the progressive PGD technology, described in the above section produces a potential field for our dynamic obstacle robotic problem. The computed solution represents the potential field for any position of the space and for any position of the obstacle. Thus, the new path planning will only require to post process this solution when the obstacle configuration changes.
In order to show the proposed technique, a numerical example is shown. A two dimensional environment is discretized in 50 × 50 nodes. Figure 1 shows some situations obtained by simulation and where the progressive PGD vademecum is used in order to consider a dynamic environment where a dynamic obstacle is represented by a black circle.
Due to the use of harmonic functions, it is assured that the robot always finds the target configuration, thus the solution is deterministic. Specific details related to the off-line stage about the convergence, complexity, computational time, etc., can be found in the authors' previous work [29], where numerical examples are provided that describe the relationship between the PGD (or greedy rank-one update algorithm) and the finite-element method used for solving high-dimensional PDEs based on the tensor product of one-dimensional base.
The computational cost of the on-line stage is negligible. The recalculation of a new trajectory after the obstacle movement only needs two steps: 1. Evaluate the abacus at the point i defined by the current configuration given by the parameters P i . This evaluation will give the solution of the Laplace's equation for any position X of the domain and for the current set of parameters: u(X; P i ). 2. Evaluate the gradient of the solution (X; P i ) in order to define the streamline.
The evaluation of the solution (PGD reconstruction) is carried out at every time cycle within a region of interest (ROI). A ROI is a portion of the path composed by the surrounding nodes of the robot position that provides enough information to compute the velocity and the robot orientation in the next time step. Once the robot moves, the new robot position is obtained with the current robot and obstacles position by means of the reconstruction of the potential field in the ROI.
The proposed algorithm can deal with several obstacles since, as mentioned before, each obstacle is defined by a set of parameters. So the addition of more obstacles can be performed by adding more parameters. Note that the easiest case is an obstacle with circular shape. However more complex, even parametric geometries of the holes can be considered just by adding more parameters. This would increase the dimensionality of the problem-i.e., each parameter represents an additional dimension-but the proposed solver can easily deal with high dimensional problems. Of course, the increase of the number of dimensions will increase the computational cost for calculating the abacus or vademecum, but the abacus is calculated offline, thereby not affecting the online path planning. In any case, the computational cost of the PGD increases linearly with the number of parameters [18].
The proposed method shares the benefits of the harmonic functions for this type of problems, thus finding trajectories even with convex obstacles. Remember that the proposed methodology solves the Laplace problem for all possible obstacles configurations at once, so keeping the same properties of the initial problem.

Conclusions
A basic issue in mobile robots is to design the movement of the robot to avoid all the obstacles from an initial to a target position. This geometric problem is computationally hard because it is necessary to take into account the different positions of the dynamic obstacles and the possibilities of start and goals positions. There are different algorithms to solve this problem. However, some of them have disadvantages. For that reason, we introduce the technique of the progressive PGD in the mobile robotics task to improve the problems that appears with the use of other algorithms. In our previous work we consider a static environment and in this work we have obtained all the possible paths for a mobile robot introducing a dynamic obstacle in the environment. We called as PGD-vademecum because we can consider any position for start and goal points and any position for the dynamic obstacle. The big advantage is that this set of solutions are computed offline and later they will be used online; for that reason to apply a progressive PGD is very fast in real time applications.