Optimal formation Switching with collision avoidance and allowing variable agent velocities
Full text
Optimal formation Switching with collision avoidance and allowing variable agent velocities∗ Dalila B.M.M. Fontes and Fernando A.C.C. Fontes and Am´ elia Caldeira Abstract We address the problem of dynamically switching the geometry of a formation of a number of undistinguishable agents. Given the current and the final desired geometries, there are several possible allocations between the initial and final positions of the agents as well as several combinations for each agent velocity. However, not all are of interest since collision avoidance is enforced. Collision avoidance is guaranteed through an appropriate choice of agent paths and agent velocities. Therefore, given the agent set of possible velocities and initial positions, we which to find their final positions and traveling velocities such that agent trajectories are apart, by a specified value, at all times. Among all the possibilities we are interested in choosing the one that minimizes a predefined performance criteria, e.g. minimizes the maximum time required by all agents to reach the final geometry. We propose here a dynamic programming approach to solve optimally such problems. Dalila B.M.M. Fontes LIAAD - INESC Porto L.A. and Faculdade de Economia, Universidade do Porto Rua Dr. Roberto Frias, 4200-464 Porto, Portugal. e-mail: [email protected] Fernando A.C.C. Fontes Instituto de Sistemas e Rob´ otica do Porto and Faculdade de Engenharia, Universidade do Porto Rua Dr. Roberto Frias, 4200-465 Porto, Portugal. e-mail: [email protected] Am´ elia C.D. Caldeira Departamento de Matem´ atica, Instituto Superior de Engenharia do Porto, R. Dr. Ant. Bernardino de Almeida, 431, 4200-072 Porto, Portugal. e-mail: [email protected] ∗Research supported by FCT and FEDER through Project PTDC/EEA-CRO/100692/2008 Perception-Driven Coordinated Multi-Robot Motion Control 1
2 Dalila B.M.M. Fontes and Fernando A.C.C. Fontes and Am´ elia Caldeira 1 Introduction In this paper, we study the problem of switching the geometry of a formation of undistinguishable agents by minimizing some performance criterion. The questions addressed are, given the initial positions and a set of final desirable positions, which agent should go a specific final position, how to avoid collision between the agents, and which should be the traveling velocities of each agent between the initial and final positions. The performance criterion used in the example explored is to minimized the maximum traveling time, but the method developed – based on dynamic programming — is sufficiently general to accommodate many different criteria. Formations of undistinguishable agents arise frequently both in nature and in mobile robotics. The specific problem of switching the geometry of a formation arises in many cooperative agents missions, due to the need to adapt to environmental changes or to adapt to new tasks. An example of the first type is when a formation has to go through a narrow passage, or deviate from obstacles, and must reconfigure to a new geometry. Examples of adaption to new tasks arise in robot soccer teams: when a team is in an attack formation and looses the ball, it should switch to a defence formation more appropriate to the new task. Another example is in the detection and containment of a chemical spillage, the geometry of the formation for the initial task of surveillance, should change after detection occurs, switching to a formation more appropriate to determine the perimeter of the spill. Research in coordination and control of teams of several agents (that may be robots, ground, air or underwater vehicles) has been growing fast in the past few years. Application areas include unmanned aerial vehicles (UAVs) [4, 18], autonomous underwater vehicles (AUVs) [16], automated highway systems (AHSs) [3, 17] and mobile robotics [20, 21]. While each of these application areas poses its own unique challenges, several common threads can be found. In most cases, the vehicles are coupled through the task they are trying to accomplish, but are otherwise dynamically decoupled, meaning the motion of one does not directly affect the others. For a survey in cooperative control of multiple vehicles systems, see for example the work by Murray [11]. Regarding research on the optimal formation switching problem, it is not abundant, although it has been addressed by some authors. Desai et al., in [5], model mobile robots formation as a graph. The authors use the so-called “control graphs” to represent the possible solutions for formation switching. In this method, for a graph having nvertices there are n!(n−1)!/2n−1control graphs, and switching can only happen between predefined formations. The authors do not address collision or velocity issues. Hu and Sastry [9] study the problems of optimal collision avoidance and optimal formation switching for multiple agents on a Riemannian manifold. However, no choice of agent traveling velocity is considered. It is assumed that the underlying manifold admits a group of isometries, with respect to which the Lagrangian function is invariant. A reduction method is used to derive optimality conditions for the solutions. In [19] Yamagishi describes a decentralized controller for the reactive formation switching of a team of autonomous mobile robots. The focus is on how a structured formation of agents can reorganize into a non-rigid formation based on changes in the environment. The controller uti-
Optimal formation Switching 3 lizes nearest-neighbor artificial potentials (social rules) for collision-free formation maintenance and environmental changes act as a stimulus for switching between formations. A similar problem, where a set of agents must perform a fixed number of different tasks on a set of targets, has been addressed by several authors. The methods developed include exhaustive enumeration (see Rasmussen et al. [13]), branch-and-bound (see Rasmussen and Shima [12]), network models (see Schumacher et al. [14, 15]), and dynamic programming (see Jin et al. [10]). None of these works address velocity issues. A problem of formation switching has also been addressed in [6] and [7] using dynamic programming. However, the possible use of different velocities for each agent was not addressed. But the possibility of slowing down some of the agents might, as we will show in an example, achieve better solutions while avoiding collision between agents. We propose a dynamic programming approach to solve the problem of formation switching with collision avoidance and agents velocities selection, that is the problem of deciding which agent moves to which place in the next formation guaranteeing that at any time the distance between any two of them is at least some predefined value. In addition, each agent can also explore the possibility of modifying its velocity to avoid collision, which is a main distinguishing feature from previous work. The formation switching performance is given by the time required for all agents to reach their new position, which is given by the maximum traveling time amongst individual agent traveling times. Since we want to minimize the time required for all agents to reach their new position, we have to solve a minmax problem. However, the methodology we propose can be used with any separable performance function. The problem addressed here should be seen as a component of a framework for multiagent coordination, incorporating also the trajectory control component [8], that allows to maintain or change formation while following a specified path in order to perform cooperative tasks. This paper is organized as follows. In the next section, the problem of optimal reorganization of agent formations with collision avoidance is described and formally defined. In Section 3, a dynamic programming formulation of the problem is given and discussed. In Section 4, we discuss computational implementation issues of the dynamic programming algorithm, namely an efficient implementation of the main recursion as well as efficient data representations. A detailed description of the algorithms is also provided. Next, an example is reported to show the solution modifications when using velocities selection and collision avoidance. Some conclusions are drawn in the final section. 2 The Problem In our problem a team of Nidentical agents has to switch from their current formation to some other formation (i.e agents have a specific goal configuration not related to the positions of the others), possibly unstructured, with collision avoidance. To address collision avoidance, we impose that the trajectories of the agents
4 Dalila B.M.M. Fontes and Fernando A.C.C. Fontes and Am´ elia Caldeira must satisfy the separation constraint that at any time the distance between any two of them is at least ε, for some positive ε. The optimal (joint) trajectories are the ones that minimize the maximum trajectory time of individual agents. Our approach can be used either centralized or decentralized, depending on the agents capabilities. In the latter case, all the agents would have to run the algorithm, which outputs an optimal solution, always the same if many exist, since the proposed method is deterministic. Regarding the new formation, it can be either a pre-specified formation or a formation to be defined according to the information collected by the agents. In both cases, we do a pre-processing analysis that allows us to come up with the desired locations for the next formation. This problem can be restated as the problem of allocating to each new position exactly one of the agents, located in the old positions, and determine each agent velocity. From all the possible solutions we are only interested in the ones where agent collision is prevented. Among these, we want to find one that minimizes the time required for all agents to move to the target positions, that is an allocation which has the least maximum individual agent traveling time. To formally define the problem, consider a set of Nagents moving in a space Rd, so that at time t, agent ihas position qi(t)in Rd(we will refer to qi(t) = (xi(t),yi(t)) when our space is the plane R2). The position of all agents is defined by the N-tuple Q(t)=[qi(t)]N i=1in Rd×N. We assume that each agent is holonomic and that we are able to choose its velocity, so that its kinematic model is a simple integrator ˙qi(t) = ϑi(t)a.e.t∈R+. The initial positions at time t=0 are known and given by A= [ai]N i=1=Q(0). Suppose a set of M(with M≥N) final positions in Rdis specified as F= {f1,f2,..., fM}. The problem is to find an assignment between the Nagents and Nfinal positions in F. That is, we want to find a N-tuple B= [bi]N i=1of different elements of F, such that at some time T>0, Q(T) = Band all bi∈F, with bi6=bk. There are M N·N! such N-tuples (the permutations of a set of Nelements chosen from a set of Melements) and we want to find a procedure to choose an N-tuple minimizing a certain criterion that is more efficient than total enumeration. The criterion to be minimized can be very general since the procedure developed is based on dynamic programming which is able to deal with general cost functions. Examples can be minimizing the total distance traveled by the agents Minimize N ∑ i=1 kbi−aik, the total traveling time Minimize N ∑ i=1 kbi−aik/kϑik,
Optimal formation Switching 5 or the maximum traveling time Minimize max i=1,...,Nkbi−aik/kϑik. We are also interested in selecting the traveling velocities of each agent. Assuming constant velocities, these are given by ϑi(t) = ϑi=vi bi−ai kbi−aik, where the constant speeds are selected from a discrete set ϒ={Vmin,...,Vmax}. Moreover, we are also interested in avoiding collision between agents. We say that two agents i,k(with i6=k), do not collide if their trajectories maintain a certain distance apart, at least ε, at all times. The non-collision conditions is kqi(t)−qk(t)k ≥ ε∀t∈[0,T](1) where the trajectory is given by qi(t) = ai+ϑi(t)t,t∈[0,T]. We can then define a logic-valued function cas c(ai,bi,vi,ak,bk,vk) = 1 if collision between iand kocurs 0 otherwise With these considerations, the problem (in the case of minimizing the maximum traveling time) can be formulated as follows min b1,...,bN,v1,...,vN max i=1,...,Nkbi−aik/vi, Subject to bi∈F∀i, bi6=bk∀i,kwith i6=k, vi∈ϒ,∀i, c(ai,bi,vi,ak,bk,vk) = 0,∀i,kwith i6=k, Instead of using the set Fof d-tuples, we can define a set J={1,2,...,M}of indexes to such d-tuples, and also a set I={1,2,...,M}of indexes to the agents. Let jiin Jbe the target position for agent i, that is bi=fji. Define also the distances di j = kfj−aikwhich can be pre-computed for all i∈Iand j∈J. Redefining, without changing the notation, the function cto take as arguments the indexes to the agent positions instead of the positions (i.e. c(ai,fji,vi,ak,fjk,vk)is simply represented as c(i,ji,vi,k,jk,vk)), the problem can be reformulated into the form
6 Dalila B.M.M. Fontes and Fernando A.C.C. Fontes and Am´ elia Caldeira min j1,...,jN,v1,...,vN max i=1,...,Ndi j/vi, Subject to ji∈J∀i∈I, ji6=jk∀i,k∈Iwith i6=k, vi∈ϒ,∀i∈I, c(i,ji,vi,ak,jk,vk) = 0,∀i,kwith i6=k, 3 Dynamic programming formulation Dynamic Programming (DP) is an effective method to solve combinatorial problems of a sequential nature. It provides a framework for decomposing an optimization problem into a nested family of subproblems. This nested structure suggests a recursive approach for solving the original problem using the solution to some subproblems. The recursion expresses an intuitive principle of optimality [2] for sequential decision processes; that is, once we have reached a particular state, a necessary condition for optimality is that the remaining decisions must be chosen optimally with respect to that state. 3.1 Derivation of the dynamic programming recursion: the simplest problem We start by deriving a DP formulation for a simplified version of problem: where collision is not considered and different velocities are not selected. The collision avoidance and the selection of velocities for each agent are introduced later. Consider that there are Nagents i=1,2,...,Nto be relocated from known initial location coordinates to a target locations indexed by set J. We want to allocate exactly one of the agents to each position in the new formation. In our model a stage icontains all states Ssuch that |S| ≥ i, meaning that iagents have been allocated to the targets in S. The DP model has Nstages, with a transition occurring from a stage i−1 to a stage i, when a decision is made about the allocation of agent i. Define f(i,S)to be the value of the best allocation of agents 1,2,...,ito itargets in set S, that is, the allocation requiring the least maximum time the agents take to go to their new positions. Such value is found by determining the least maximum agent traveling time between its current position and its target position. For each agent, i, the traveling time to the target position jis given by di j/vi. By the previous definition, the minimum traveling time of the i−1 agents to the target positions in set S\ { j}is given by f(i−1,S\{j}). From the above, the minimum traveling time of all iagents to the target positions in Sthey are assigned to, given that agent i travels at velocity vi, without agent collisions, is obtained by examining all possible target locations j∈S(see Fig. 1 ). The dynamic programming recursion is then defined as
Optimal formation Switching 7 Fig. 1 Dynamic Programming Recursion for an example with N=5 and stage i=4 . f(i,S) = min j∈Sdi j/vi∨f(i−1,S\{ j}),(2) where X∨Ydenotes the maximum between Xand Y. The initial conditions for the above recursion are provided by f(1,S) = min j∈Sd1j/v1,∀S⊆J,(3) and all other states are initialized as not yet computed. Hence, the optimal value for the performance measure, that is the minimum traveling time needed for all Nagents to assume their new positions in J, is given by f(N,J).(4) 3.2 Considering collision avoidance and velocities selection Recall function cfor which c(i,j,vi,a,b,va)takes value 1 if there is collision between pair of agents iand atraveling to positions jand bwith velocities viand va, respectively, and takes value 0 otherwise. To analyze if the agent traveling through a newly defined trajectory collides with any agent traveling through previously determined trajectories, we define a recursive function. This function checks the satisfaction of the collision condition, given by equation (1), in turn, between the agent which had the trajectory defined last and each of the agents for which trajectory decisions have already been made. We note that by trajectory we understand not only the path between the initial and final positions but also a timing law and an implicitly defined velocity. Consider that we are in state (i,S)and that we are assigning agent ito target j. Further let vi−1be the traveling velocity for agent i−1. Since we are solving state (i,S)we need state (i−1,S\{ j}), which has already been computed. (If this is not the case, then we must compute it first.) In order to find out if this new assignment is possible, we need to check if at any point in time agent i, traveling with veloc-
8 Dalila B.M.M. Fontes and Fernando A.C.C. Fontes and Am´ elia Caldeira ity vi, will collide with any of the agents 1,2,...,i−1 for which we have already determined the target assignment and traveling velocities. Let us define a recursive function C(i,vi,j,k,V,S)that assumes the value one if a collision occurs between agent itraveling with velocity vito jand any of the agents 1,2,...k, with k<i, traveling to their targets, in set S, with their respective velocities V= [v1v2...vk]and assumes the value zero if no such collisions occurs. This function works in the following way (see Fig. 2): 1. first it verifies c(i,vi,j,k,vk,Bj), that is, it verifies if there is collision between trajectory i−→ jat velocity viand trajectory k−→ Bjat velocity vk, where Bj is the optimal target for agent kwhen targets in set S\{j}are available for agents 1,2,...,k. If this is the case it returns the value 1. 2. Otherwise, if they do not collide, it verifies if trajectory i−→ jat velocity vi collides with any of the remaining agents. That is, it calls the collision function C(i,vi,j,k−1,V0,S0), where S0=S\{Bj}and V= [V0vk] Fig. 2 Collision recursion. The collision recursion is therefore written as: C(i,vi,j,k,V,S) = c(i,vi,j,k,vk,Bj)∨C(i,vi,j,k−1,V0,S0)(5) where Bj=Bestj(k,V0,S0),V= [V0vk],S0=S\{j} The initial conditions for recursion (5) are provided by C(i,vi,j,1,v1,{k}) = {c(i,vi,j,1,v1,k)}, ∀i∈I;∀j,k∈Jwith j6=k;∀vi,v1∈ϒ. All other states are initialized as not yet computed. The dynamic programming recursion for the minimal time switching problem with collision avoidance and velocities selection is then
Optimal formation Switching 9 f(i,V,S) = min j∈Sd(i,j)/vi∨f(i−1,V0,S0)∨M∗C(i,vi,j,i−1,V0,S0). where V= [V0vi],S0=S\{j}, and Cis the collision function. The initial conditions are given by f(1,v1,{j}) = {d(1,j)/v1},∀j∈Jand ∀v1∈ϒ. All other states being initialized as not computed (∞). To determine the optimal value for our problem we have compute min all N-tuples V f(N,V,J) . 4 Computational implementation The DP procedure we have implemented exploits the recursive nature of the DP formulation by using a backward-forward procedure. Although a pure forward Dynamic Programming (DP) algorithm can be easily derived from the DP recursion, equations (2) and (6), such implementation would result in considerable waste of computational effort since, generally, complete computation of the state space is not required. Furthermore, since the computation of a state requires information contained in other states, rapid access to state information should be seek. The main advantage of the backward-forward procedure implemented is that the exploration of the state space graph, i.e. the solution space, is based upon the part of the graph which has already been explored. Thus, states which are not feasible for the problem are not computed, since only states which are needed for the computation of a solution are considered. The algorithm is dynamic as it detects the needs of the particular problem and behaves accordingly. States at stage 1 are either nonexistent or initialized as given in equation (6). The DP recursion, equation (2), is then implemented in a backward-forward recursive way. It starts from the final states (N,V,J)and while moving backward visits, without computing, possible states until a state already computed is reached. Initially, only states in stage 1, initialized by equation (6) are already computed. Then, the procedure is performed in reverse order, i.e. starting from the state last identified in the backward process, it goes forward through computed states until a state (i,V0,S0) is found which has not yet been computed. At this point, again it goes backward until a computed state is reached. This procedure is repeated until the final states (N,V,J)for all Vare reached with a value that cannot be improved by any other alternative solution. From these we choose the minimum one. The main advantage of this backward-forward recursive algorithm is that only intermediate states needed are visited and from these only the feasible ones that may yield a better solution are computed.
16 Dalila B.M.M. Fontes and Fernando A.C.C. Fontes and Am´ elia Caldeira Location xiyi Target 1 95 258 Target 2 294 258 Target 3 195 169 Target 4 195 347 Table 2 Target locations, in diamond formation. Collisions allowed No collisions allowed Fig. 3 Comparison of solutions with and without collision for the single velocity case.
Optimal formation Switching 17 As it can be seen in the top part of the Fig. 3, i.e. when collisions are allowed, the trajectory of agents A and D do not remain apart, by 15 points, at all times. Therefore, when no collisions are enforced the agent-target allocation changes with an increase in the time that it takes for all agents to assume their new positions. In Fig. 4 we give the graphical representation of the optimal agent-target allocation found, when there are 3 possible velocity values to choose from and collisions are allowed and no collisions are allowed, respectively. Collisions allowed No collisions allowed Fig. 4 Comparison of the solutions with and without collision for the velocity choice case.
18 Dalila B.M.M. Fontes and Fernando A.C.C. Fontes and Am´ elia Caldeira As it can be seen in the top part of the Fig.4, i.e. when collisions are allowed, the trajectory of agents A and D do not remain apart, by 15 points, at all times, since the agents move at the same velocity. Therefore, when no collisions are enforced although the agent-target allocation remains the same, agent A has it velocity decreased and therefore its trajectory no longer collides with the trajectory of agent D. Furthermore, since agents A trajectory is smaller this can be done with no increase in the time that it takes for all agents to assume their new positions. 6 Conclusion We have developed an optimization algorithm to decide how to reorganize a formation of vehicles into another formation of different shape with collision avoidance and agent traveling velocity choice, which is a relevant problem in cooperative control applications. The method proposed here should be seen as a component of a framework for multiagent coordination/cooperation, which must necessarily include other components such as a trajectory control component. The algorithm proposed is based on a dynamic programming approach that is very efficient for small dimensional problems. As explained before, the original problem is solved by combining, in an efficient way, the solution to some subproblems. The method efficiency improves with the number of times the subproblems are reused, which obviously increases with the number of feasible solutions. Moreover, the proposed methodology is very flexible, in the sense that it easily allows for the inclusion of additional problem features, e.g. imposing geometric constraints on each agent or on the formation as a whole, using nonlinear trajectories, among others. References 1. A. V. Aho, J. E. Hopcroft, and J. D. Ullman. Data Structures and Algorithms. Addison-Wesley, 1983. 2. R. Bellman. Dynamic Programming. Princeton University Press, Princeton, USA, 1957. 3. JG Bender. An overview of systems studies of automated highway systems. IEEE Transactions on Vehicular Technology, 40(1 Part 2):82–99, 1991. 4. L. E. Buzogany, M. Pachter, and J. J. d’Azzo. Automated control of aircraft in formation flight. pages 1349–1370, Monterey, California, 1993. AIAA Guidance, Navigation, and Control Conference and Exhibit. 5. J. P. Desai, P. Ostrowski, and V. Kumar. Modeling and control of formations of nonholonomic mobile robots. IEEE Transactions on Robotics and Automation, 17(6):905–908, 2001. 6. D.B.M.M. Fontes and F.A.C.C. Fontes. Optimal reorganization of agent formations. WSEAS Transactions on Systems and Control, 3(9):789–798, 2008. 7. D.B.M.M. Fontes and F.A.C.C. Fontes. Minimal Switching Time of Agent Formations with Collision Avoidance. Springer Optimization and Its Applications, 40:305–321, 2010. 8. F. A. C. C. Fontes, D. B. M. M. Fontes, and A. C. D. Caldeira. Model predictive control of vehicle formations. In P. Pardalos M.J. Hirsch, C.W. Commander and R. Murphey, editors,
Optimal formation Switching 19 Optimization and Cooperative Control Strategies, Lecture Notes in Control and Information Sciences , Vol. 381 ISBN: 978-3-540-88062-2. Springer Verlag, Berlin, 2009. 9. J. Hu and S. Sastry. Optimal collision avoidance and formation switching on Riemannian manifolds. In IEEE CONFERENCE ON DECISION AND CONTROL, volume 2, pages 1071– 1076. IEEE; 1998, 2001. 10. Z. Jin, T. Shima, and C. J. Schumacher. Optimal scheduling for refueling multiple autonomous aerial vehicles. IEEE Transactions on Robotics, 22(4):682–693, 2006. 11. R. M. Murray. Recent research in cooperative control multivehicle systems. Journal of Dynamic Systems, Measurement and Control, 129:571–583, 2007. 12. S. J. Rasmussen and T. Shima. Branch and bound tree search for assigning cooperating UVAs to multiple tasks. Minneapolis, Minnesota, USA, 2006. Institute of Electrical and Electronic Engineers, American Control Conference 2006. 13. S. J. Rasmussen, T. Shima, J. W. Mitchell, A. Sparks, and P. R. Chandler. State-space search for improved autonomous UAVs assignment algorithm. Paradise Island, Bahamas, 2004. IEEE Conference on Decision and Control. 14. C. J. Schumacher, P. R. Chandler, and S. J. Rasmussen. Task allocation for wide area search munitions via iterative network flow. Reston, Virginia, USA, 2002. American Institute of Aeronautics and Astronautics, Guidance, Navigation, and Control Conference 2002. 15. C. J. Schumacher, P. R. Chandler, and S. J. Rasmussen. Task allocation for wide area search munitions with variable path length. New York, New York, USA, 2003. Institute of Electrical and Electronic Engineers, American Control Conference 2003. 16. T.R. Smith, H. Hanssmann, and N.E. Leonard. Orientation control of multiple underwater vehicles with symmetry-breaking potentials. In IEEE Conference on Decision and Control, volume 5, pages 4598–4603, 2001. 17. D. Swaroop and JK Hedrick. Constant spacing strategies for platooning in automated highway systems. Journal of dynamic systems, measurement, and control, 121:462, 1999. 18. J. D. Wolfe, D. F. Chichka, and J. L. Speyer. Decetntralized controllers for unmanned aerial vehicle formation flight. pages 96–3833, San Diego, California, 1996. AIAA Guidance, Navigation, and Control Conference and Exhibit. 19. M. Yamagishi. Social rules for reactive formation switching. Technical Report UWEETR- 2004-0025, Department of Electrical Engineering, University of Washington, Seattle, Washington, USA, 2004. 20. H. Yamaguchi. A cooperative hunting behavior by mobile-robot troops. The International Journal of Robotics Research, 18(9):931, 1999. 21. H. Yamaguchi, T. Arai, and G. Beni. A distributed control scheme for multiple robotic vehicles to make group formations. Robotics and Autonomous systems, 36(4):125–147, 2001.