Frequently used notation in this chapter.
Consensus theory has been widely applied to collective motion planning related to coordinated motion. However, when the collective motion is highly irregular and adversarial, the basic consensus theory does not guarantee collision avoidance by default. As collision avoidance is a central problem of path planning, the incorporation of avoidance into the consensus algorithm is a subject of research. This work presents a new method of incorporating collision avoidance into the consensus algorithm, by applying the concept of constrained orientation control, where orientation constraints are represented as a set of linear matrix inequalities (LMI) and solved by semidefinite programming (SDP). The developed algorithm is used to simulate consensus-based multipath planning with collision avoidance for a team of communicating soccer robots.
- path planning
Path planning has found practical applications in areas such as entertainment (e.g. robot soccer) ; self-driving vehicles (e.g. Google’s self-driving cars) ; intelligent highways , and multiple unmanned space systems . Because of the potential applications, the topic of multipath planning has been studied extensively, for example in [5, 6, 7, 8, 9, 10, 11].
The simplicity and potential of consensus algorithms to generate collective behaviors, such as flocking, platooning, rendezvous, and other formation configurations, make it an attractive choice for solving certain problems in multiagent control. However, the basic consensus algorithm collision avoidance mechanism is not developed for adversarial situations (i.e., opposite or attacking motion). To extend the power of the algorithm, it is therefore necessary to develop more powerful collision avoidance capabilities.
Next, we consider the basic approaches to collision avoidance in consensus. Some researchers, for example, [12, 13], approached the avoidance problem by introducing potential forces such as attraction and repulsion. However, the potential force algorithms were not developed for adversarial reconfigurations, for example, vehicles moving in opposite directions. Potential functions also have a problem of getting into local minima, coupled with slow speed of convergence. It is observed in  that any repulsion based on potential functions alone is not sufficient to guarantee consensus-based collision avoidance. Moreover, the attitude change maneuver presented in  was not developed for three-dimensional space (see  for a comprehensive literature survey on this topic).
Thus, in this work, we present an approach which we previously developed [5, 9] for incorporating collision avoidance into the consensus framework by applying quadratically constrained attitude control (Q-CAC), via semidefinite programming (SDP), using linear matrix inequalities (LMI). The main benefit of this approach is that it can solve the collision avoidance problem in adversarial situations and any configurations, and the formulation can be applied to two-dimensional as well as three-dimensional spaces. Table 1 shows the notation frequently used in this chapter.
|xi||Position vector of vehicle number i|
|(xij)off||Offset vector of vehicles i and j|
|x||Stacked vector of more than one position vector|
|xoff||Stacked vector of more than one offset vector|
|Control input of vehicle i|
|Stacked vector of control inputs of more than one vehicle|
|The set of m × m positive-definite matrices|
|S||Bounding sphere or circle of a vehicle or obstacle|
|ε||Width of safety region|
|r∗||Radius of S|
|r||r∗ + ε|
|vi||Attitude vector of vehicle i|
|Obstacle vector of vehicle i|
|Obstacle vector of vehicle i emanating from vehicle j|
|Dij||Euclidean distance between vehicles i and j|
|Lij||Line passing through the mid points of vehicles i and j|
|ρij||Perpendicular bisector of Lij separating vehicles i and j|
|PLi||Plane passing through the midpoint of vehicle i|
|lij||Line of intersection of PLi and PLj|
|Distance from xi to lij (for 3D) or pij(for 2D)|
|Distance from vi to lij (for 3D) or pij(for 2D)|
|zi||A point on the Z axis of PLi|
|pij||Point of intersection of the lines passing through and|
|Ni||Normal vector perpendicular to xi, vi, and zi|
|D||Attitude control plant matrix,|
|⊗||Kronecker multiplication operator|
|A||State or plant matrix for dynamics of x|
|B||Input matrix for dynamics of x for input u|
|F||Feedback controller matrix|
|Ip||Identity matrix of size p × p|
|Γ||Γ = L ⊗ Ip|
|Η||A vector or matrix in the Schur inequality|
|R||A positive-definite matrix in the Schur inequality|
|Q||A symmetric matrix in the Schur inequality|
|η||Positive real number for scaling the consensus term|
|β||Positive real number for scaling the proportional term|
2. Problem statement
The basic consensus problem is that of driving the states of a team of communicating agents to a common value by distributed protocols based on their communication graph. The agents (or vehicles) i(i = 1, ⋯, n) are represented by vertices of the graph, whereas the edges of the graph represent communication links between them. Let xi denote the state of a vehicle i and x is the stacked vector of the states of all vehicles. For systems modeled by first-order dynamics, the following first-order consensus protocol (or its variants) has been proposed, for example in [12, 13]
Consensus is said to have been achieved when ‖xi − xj‖ → (xij)off, as t → ∞, ∀i ≠ j.
The consensus-based multipath planning with collision avoidance problem can be stated as follows: Given a set of vehicles i, with initial positions xi(t0), desired final positions , at time tf, a set of obstacles with positions , and the Laplacian matrix of their communication graph L find a sequence of collision-free trajectories from t0 to tf such that . Protocol (Eq. (1)) on its own does not solve the collision avoidance problem in adversarial situations. A comprehensive presentation of the necessary mathematical tools for this work (including graph theory and consensus theory) can be found in .
In this section, we develop solutions to the problem stated in Section 2.
3.1. Consensus-based arbitrary reconfigurations
It was shown that for the dynamic system.
there exists a stabilizing feedback controller F, such that the protocol
drives x to xf . Here, x = [x1, ⋯, xn] is a stacked vector of the initial positions of the vehicles, u = − Γ(x − xoff), Γ = L ⊗ Ip, Ip is the identity matrix of size p × p, and p is the state dimension of the vehicles.
To begin, we first consider the reference consensus path planning problem. To this end, the following protocol is proposed for a leader-follower communication graph architecture
The corresponding protocol for a leaderless architecture is
where xd ≠ xoff is the desired final position and is different from the formation configuration, K = ϵIn, (0 < ϵ ≪ 1), and n is the dimension of x.
Theorem 1 The time-varying system (Eq. (2)) achieves consensus.
Proof: see .
Figure 1 shows a simulation of consensus-based reconfiguration, using the communication graph in Figure 2, which is an example of a leader-follower graph. Node 1 is the leader, and each of the other nodes is connected to their adjacent neighbors. In Figure 1, the dots inside small circles indicate initial positions, whereas the dot in the diamond is the initial position of the leader. The stars indicate desired final positions. The larger circles with dashed lines are positions where collisions occurred, and the diameters of the circles indicate the size of intersection of the safety regions of the vehicles. The simulation proves that for arbitrary reconfigurations, the basic consensus algorithm does not guarantee collision avoidance.
3.2. Quadratically constrained attitude control-based collision avoidance
The collision avoidance problem is that of avoiding static obstacles and other moving vehicles while driving the state of a vehicle from one point to another. For simplicity, we approximate a vehicle or an obstacle by S, as shown in Figure 3. A nonspherical obstacle may be represented by a polygon as shown in Figure 4. For the S-type obstacle (or vehicle), let the obstacle be centered on a point xobs; it is desired that the time evolution of any vehicle state xi(t) from t0 to tf should avoid the constraint region shown in Figure 3.
The feasible region is thus defined by
where r∗ is the radius of S, bounded by a safety region of width ε.
There is no direct representation of the nonlinear nonconvex equation (Eq. (6)) as LMI. However, some non-LMI methods, for example, mixed integer linear programming (MILP) , have been developed for approximating its solution. In this section, we present an approach, which we previously developed in [5, 9, 10, 14], based on the principles of quadratically constrained attitude control (Q-CAC) algorithm , initially developed for the spacecraft attitude control problem.
At any time t, suppose the safety region of vehicle i centered on xi(t) intersects the safety region of an obstacle, obs, centered on xobs. Let v(t) be the unit vector extending from the centre of xobs or xi(t) in the direction of the point of intersection. The vectors v(t) will be different for each vehicle or obstacle. Considering the case shown in Figure 3, assume xobs is known and v(t) is also known in the frame of obs. Then, to guide vehicle i safely around the obstacle, define a unit vector vi(t) in the direction of v(t) in the frame of obs. The vector vi(t) will be regarded as an imaginary vector whose direction can be constrained to change with time. The vector vi(t) can then be used to find a sequence of trajectories around obs which guides i from xi(t0) to xi(tf) without violating (Eq. (6)).
The problem reduces to the Q-CAC problem. It is desired that the angle θ between vi(t) and v(t) should be larger than some given angle ∅, ∀t. The constraint is
The idea is to control the angle between the unit vectors vi(t) and v(t). This implies that one of the vectors vi(t) or v(t) must remain static, whereas the other moves with time. Vector vi(t) is used to control the position of the vehicle; therefore, vi(t) will move with time. The positions of vi(t) define a trajectory path for xi(t). Thus, xi(t) is forced to move on the surface of the safety region bounding S. At some time tk, xi(t) will arrive close to a point indicated by vi(tk), at which a translation to xi(tf) is unconstrained. This is shown by the black dots on the boundary of the safety region in Figure 4. To obtain the unit vector v(t), the actual vector extending from the centre of xobs or xi(t) in the direction of the point of intersection is normalized. After the solution vi(t) is obtained as a unit vector, vi(t) is multiplied by r = r∗ + ε to obtain the actual safe trajectory.
Let v(t) = [vi(t)Tv(t)T]T, then the dynamics of v(t) is defined as
where , p is the dimension of the state vector xi, and n is the number of vehicles. The above differential equation represents the rotational dynamics of the two vectors contained in v(t). D is a semidefinite matrix variable whose contents are unknown. Its purpose is to vary the angle between the two vectors in v(t) with time while also keeping them normalized.
The discrete time equivalent of the above differential equation is
where k = 0, ⋯, N (N∆t = tf) is the discrete time equivalent of t and ∆t is the discretization time-step. To implement Eq. (9), D is declared in a semidefinite program which chooses the appropriate values to rotate the vectors in v(t) while satisfying norm constraints. Note in the above discretization of the differential equation, the identity matrix cannot be added to the solution; instead, the matrix D is chosen implicitly to satisfy the rotation. The vectors in v(t) are unit vectors; they are not translating, but they are rotating and must be preserved as unit vectors.
where Q = QT, R = RT, and R > 0 are equivalent to and can be represented by the linear matrix inequality
Note that Eq. (7) is equivalent to
which also implies that
Note also that some of the eigenvalues of the G in Eq. (13) are nonpositive. To make the matrix positive definite, one only needs to shift the eigenvalues of G, by choosing a positive real number μ which is larger than the largest absolute value of the eigenvalues of G, then
Let , then M is positive definite. Therefore, following the Schur complement formula, the LMI equivalent of Eq. (14) is
For collision avoidance, the dynamic system (Eq. (8)) is solved whenever it is required, subject to the attitude constraint (Eq. (15)) and norm constraints ‖vi(t)‖ = 1 and ‖v(t)‖ = 1. Thus, the optimization problem of collision avoidance is essential to find a feasible vi subject to the following constraints:
Eq. (17) is essentially the discrete time version of which guarantees that v(t)Tv(t) = 2, if‖vi(0)‖ = 1 and ‖v(0)‖ = 1. This solution works for 2D and 3D spaces. The next step is to extend the formulation to the case of dynamic obstacles. First, consider two vehicles i and j with states xi(t), xj(t) and attitude vectors vi(t), vj(t), respectively. Collision avoidance requires that they must avoid each other always. As shown in Figure 5, any time their safety regions are violated and the point of their intersection in the coordinate frame of i is .
The avoidance requirements are
∀t ∈ [t0, tf],
where ∅ ≥ π/2. For this dynamic situation, it is sufficient to enforce the following avoidance constraints:
Note that (k + 2) is used because the optimization is performed two steps ahead of time to ensure that the future trajectories are collision free. However, when this avoidance protocol is applied to dynamic collision avoidance, some vehicle configurations pose challenges and this is considered next.
3.3. Conflict resolution for multiple vehicles
A collision between two vehicles i and j is imminent at time t whenever
which can be computed using position feedback data determined by onboard or external sensors or communicated among the vehicles.
There are two aspects of collision problems: (i) collision detection and (ii) collision response. Collision detection is the computational problem of detecting the intersection of two or more objects. This can be done either using sensors or numerically using concepts from linear algebra and computational geometry. Collision response is the initiation of the appropriate avoidance maneuver. In this section, we present methods to detect different configurations of collisions and classify them. Then, an appropriate response technique is developed for each of the collision configurations.
Consider two vehicles i and j, whose current states are xi(t) and xj(t) and the desired final states are xi(tf) and xj(tf). We identify three different basic collision configurations as: (i) simple collision; (ii) head-on collision; and (iii) cross-path collision. Solutions will be developed for each of these configurations, and when combined synergistically, they will provide sufficient collision avoidance behavior for fast collision-free reconfiguration for the team of vehicles.
3.3.1. Detecting and resolving a simple collision
A simple collision problem is any configuration in which Dij(t) ≤ (ri + rj) and the current vector directions (or attitude vectors) vi(t) and vj(t) of vehicles i and j are on different sides of the plane or infinite line Lij(t) passing through the points xi(t), xj(t); and the attitude vectors and are not parallel. Note that when and are not parallel, a point or line of intersection can be computed for both vectors. Examples of simple collision problems are shown in Figures 5 and 6.
This is the easiest collision problem to solve because the attitude vectors are already on opposite sides of Lij(t). Considering Figure 6 (b), the plane or line ρij(t) tangent to the point of intersection of both vehicles constrains the current motion spaces of the vehicles to either of the two sides of the plane at time t. A pure optimization-based solution will attempt to search the space on the right side of ρij(t) to seek for a point which is closest to the goal of i, and this will be used as the next trajectory. The algorithm will also search the left side of ρij(t) to find the next trajectory for j. Once the positions are updated, a new ρij(t) is computed.
Indeed, the solution is provided by the basic collision avoidance protocols (Eqs. (21) and (22)) without having to do a set search. It is easy to observe that by expanding the angles θi(t) and θj(t) and choosing the next feasible trajectories r∗/2 along the new direction vectors and , the new trajectories are bound to satisfy the feasible regions separated by ρij(t), provided εi > r∗i for any i. The rest of the avoidance strategies developed in the remaining part of this section are attempts to reduce more complex collision configurations to a simple collision configuration.
3.3.2. Detecting and resolving a head-on collision
A head-on collision problem is any configuration in which Dij(t) ≤ (ri + rj) and vi(t)Tvj(t) ≈ π rad. Figure 7(a) illustrates the head-on collision problem.
The paths from the current positions xi(t) and xj(t) to the goal positions xi(tf) and xj(tf) lead to a configuration in which the attitude vectors and are parallel (or close to parallel) and in opposite directions, in the sense that a point of intersection cannot be computed. Figure 7(b)–(d) shows several examples of head-on collision. Figure 7(b) is a direct head-on collision because the vectors and are lying directly on Lij(t). Figure 7(c) is an approximate head-on collision and Figure 7(d) is a head-on collision that can be easily converted to a simple collision configuration.
For the configurations in Figure 7(b) and (c), the Q-CAC formulation presented earlier easily solves this problem without any modifications to the algorithm. However, whenever for any i, the optimization algorithm takes some significant time to solve. Even though the resulting trajectory is desirable, this delay is undesirable for real-time collision avoidance. Therefore, whenever this configuration is encountered for any two vehicles, a one-step elementary evasive maneuver is initiated, in which either vi(t) or vj(t) is rotated by a small angle ψ > 0. This rotation effectively transforms the head-on collision configuration to a simple collision configuration. Once this is done, the avoidance constraints defined in Eqs. (21) and (22) solve in real time. The trajectory obtained using this strategy for two-vehicle reconfiguration with head-on collision avoidance is shown in .
3.3.3. Detecting and resolving cross-path collision for two vehicles
A cross-path collision problem is any configuration in which Dij(t) ≤ (ri + rj) and the current vector directions vi(t) and vj(t) are on the same side of Lij(t), and the attitude vectors and are not parallel. Because the vectors are not parallel, a point (for 2D) or line (for 3D) of intersection can be computed for both vectors. Figure 8 is an example of a cross-path collision problem.
Note that for the avoidance process, the attitude control algorithm attempts to expand the angles θi(t) and θj(t) to an angle = π/2. Based on this initial configuration, therefore, vi(t) and vj(t) will remain parallel or close to parallel, but not in opposite directions. If this continues, the desired goal positions may never be reached, or may be reached after a great deal of effort. To resolve this problem, it is required to determine whether the two vehicles are indeed in a cross-path configuration. The task is therefore to see if there exists a point or line of intersection between and , and if such an intersection lies on one side of Lij.
3.3.4. Determining cross-path collision in 3D and 2D.
To determine cross-path collision between i and j in 3D, two planes PLi and PLj are defined, both parallel to the z axes of the world coordinate frame (Figure 9). Each plane must contain the vectors and as shown in the figure. Therefore, the plane PLi is defined as the set (Ni(t), xi(t), vi(t), z(t)), where zi(t) is a point chosen above or below xi(t) or vi(t) on the z axis and Ni(t) is the normal vector perpendicular to xi(t), vi(t), and zi(t). Once Nj(t) is similarly defined, the intersection of the two planes can be computed using techniques from computational geometry. If the two planes are not parallel, the computation of planes’ intersection will return a line lij. Once this line is determined, the next step is check if it is on one side of the plane parallel to the z axis and containing the points xi(t) and xj(t).
An easy way to do this is to compute the perpendicular distances from the points xi(t), vi(t), xj(t), and vj(t), to lij.
Let the corresponding distances be:
If and , then the line of intersection is in front of both vehicles, and a cross-path collision is imminent as shown in Figure 9(a) and (b). Otherwise, there is no cross-path conflict as shown in Figure 9(c).
The analysis is simpler in the 2D case. Instead of lij, we search for a point pij, which is the point of intersection of the lines passing through and as shown in Figure 10. If indeed such a point is found, we use pijinstead of lijin the previous set of equations.
Figure 11 shows an illustration of the computation of and for any i.
Figure 12(a) is a cross-path collision configuration, but (b) is a simple collision configuration.
The solution strategy adopted is to convert any cross-path configuration such as Figure 12 (a) to a simple configuration such as (b). To do this, one only must move either vi(t) or vj(t) to the other side of Lij(t) (or onto the line Lij(t)). A simple strategy to decide which v(t) should be moved to obtain smoother phase transition is to measure θi(t) and θj(t). If θj(t) < θi(t), then vj(t) should be moved. This is done by swapping vj(t) and , which immediately results in a simple collision reconfiguration. Thereafter, when the Q-CAC algorithm expands θj(t), it is the former (which is now the new vj(t)) that moves, whereas the former vj(t) (which is now the new ) remains static.
Therefore, if a cross-path trajectory is determined, to resolve the problem it is sufficient to swap the variables in one of the avoidance constraints (Eq. (21) or Eq. (22)). For example, Eq. (21) may be left as it is and Eq. (22) is rewritten in the form
The trajectories obtained by applying this strategy to cross-path collision avoidance for two vehicles in 2D and 3D are shown in .
3.3.5. Resolving cross-path collision for more than two vehicles
If more than two vehicles are involved as shown in Figure 13, for any vehicle i, whose attitude vector vi(t) is in a cross-path configuration with vehicles j and k, we are concerned only about the two bounding obstacle vectors and .
In order not to get into a stalemate situation (undesirable for aircraft), only positive nonzero velocities are required to be generated. We adopt a counterclockwise avoidance measure to achieve this, where, for each vehicle, the left bounding obstacle vector is always chosen as the cross-path obstacle vector for avoidance. For example, for k to turn counterclockwise, it chooses the vector to avoid instead of . Thus, for the configuration of Figure 13, the following set of attitude constraints is enforced:
3.4. Consensus with Q-CAC–based avoidance
Once a safe attitude vector vi(k) is computed at time k for any i, the next position xi(k + 1) is computed as a point a distance r∗i/2 from the current position, along the vector vi(k). Note that vi(k) is normalized to keep the computed control bounded. Whether there are intersections of the safety regions or not, one can guarantee the safety of the algorithm by bounding the control size within the interval 0 < ui ≤ r∗i/2. This means that a vehicle never steps beyond its safety region at any single time step.
Another important consideration is the size of control computed at each time using Laplacian matrices, which is directly proportional to the algebraic connectivity of the communication graph, and inversely proportional to the magnitude of the current time k. This means that, while the early values of u are large and therefore unsafe for collision avoidance (and must be bounded), the latter values of u are very small and therefore slow down the rate of convergence. One can observe that collisions are less likely to occur in the latter times when the vehicles are closer to their goal positions; consequently, convergence is slower at that time. Therefore, there is need to obtain constantly bounded control u which can guarantee both collision avoidance and a high speed of convergence. The following modifications to Eq. (4) and Eq. (5) were proposed in our previous works [5, 9, 14]. For the leader-follower architecture,
And for the leaderless architecture,
where λ2(L) is the second smallest eigenvalue of the Laplacian L. The parameter η is for scaling the consensus term and β is for scaling the proportional term in Eqs. (32) and (33). The logarithmic term log10(k + 1) and the term are used to reduce ‖u‖ when k is small and increase ‖u‖ when k is large. The choices of parameters η and β should depend on the radius of S and safety region ε for each vehicle. Alternatively, one may choose to compute an unbounded u using Eqs. (4) or (5), then for each , normalize ui and set .
The step-by-step procedure for implementing the algorithm including a flowchart can be found in Ref. .
4. Simulation results
To demonstrate the solutions developed in this chapter, we revisit the experiment presented in Figure 1. The robots are homogeneous, and S for each robot is 85 mm, ε = 90 mm, whereas the dimensions of the soccer pitch are 6050 mm x 4050 mm. In Figure 14 (a), Eq. (5) was applied with the cyclic communication topology with one leader (Figure 2). In Figure 14 (b), Eq. (33) was applied with a full communication topology (i.e., every vehicle can communicate with each other). The simulation was done with MATLAB R2009a on an Intel® Core(TM)2 Duo P8600 @ 2.40 GHz with 2 GB RAM, running Windows 7. For Figure 14(a), the multipath planning problem took 244 time-steps to solve, resulting in a total computation time of 7.343 s, in which 203 avoidance attempts were made, and there were no collisions. For Figure 14(b), using a full communication topology, the computational time was 0.0131 s, and there were no collisions.
In , more simulations and analyses are presented, together with the limitations of this approach, which remains to be explored for future development.
In this chapter, we considered consensus-based multipath planning. An approach to incorporating collision avoidance in adversarial situations in the consensus algorithm by applying Q-CAC is presented. Simulation results are presented here to show that for a sizable number of vehicles, collision avoidance and fast convergence are guaranteed. Future work will include implementation on a team of mobile robots and autonomous aerial vehicles.