Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Citation Van Parys, R., Pipeleers, G.

(2017),
Distributed MPC for multi-vehicle systems moving in formation
Robotics and Autonomous Systems, Volume 97, Pages 144-152, November,
2017.

Archived version Author manuscript: the content is identical to the content of the published
paper, but without the final typesetting by the publisher

Published version http://www.sciencedirect.com/science/article/pii/S0921889016308387

Journal homepage http://www.sciencedirect.com/science/journal/09218890?sdc=1

Author contact E-mail: ruben.vanparys@kuleuven.be


Phone number: + 32 (0)16 377770

IR https://lirias.kuleuven.be/handle/123456789/590813

(article begins on next page)


Distributed MPC for multi-vehicle systems moving in formationI

Ruben Van Parysa,∗, Goele Pipeleersa


a MECO Research Group, Department of Mechanical Engineering, Division PMA, KU Leuven, BE-3001 Leuven, Belgium.

Abstract
This work presents a novel distributed model predictive control (DMPC) strategy for controlling multi-vehicle systems
moving in formation. The vehicles’ motion trajectories are parameterized as polynomial splines and by exploiting the
properties of the B-spline basis functions, constraints on the trajectories are efficiently enforced. The computations for
solving the resulting optimization problem are distributed among the agents by the Alternating Direction Method of
Multipliers (ADMM). In order to reduce the computation time and the amount of inter-vehicle interaction, only one
ADMM iteration is performed per control update. In this way the method converges over the subsequent control up-
dates. Simulations for various nonholonomic vehicle types and an experimental validation on in-house developed robotic
platforms prove the capability of the proposed approach. A supporting software toolbox is provided that implements
the proposed approach and that facilitates its use.
Keywords: Distributed Model Predictive Control (DMPC), Nonholonomic multi-vehicle system, Alternating Direction
Method of Multipliers (ADMM), B-spline.

1. Introduction the other vehicles to attain a desired relative position with


respect to the leader [12]. This architecture is however not
Boosted by enhancements in communication technolo- robust against failures of the leader. Therefore, this paper
gies and computational power, networked multi-vehicle aims for an approach in which all members of the forma-
systems have received increasing attention over the last tion are equal. This implies that each vehicle searches for
decades. A particular application hereof is formation con- its own trajectory. By allowing communication, the vehi-
trol of multi-vehicle systems, which forms the basis for ap- cles are able to adapt their trajectories in order to satisfy
plications such as cooperative transportation by small au- the formation constraints. Such distributed control struc-
tomated guided vehicles or cooperative surveillance. Fur- ture benefits from the flexibility to add or discard agents
thermore, it is well known that the flight efficiency sub- from the controlled multi-agent system, the possibility to
stantially increases when aerial vehicles fly in close forma- hide local information and the ability to choose and opti-
tion [1]. mize the information flow between the agents. An appeal-
State-of-the-art formation control approaches for un- ing framework allowing for such architecture is distributed
manned vehicles are divided in three main groups: leader- model predictive control (DMPC). It can explicitly ad-
follower techniques [2, 3], virtual structure approaches dress input and state constraints, account for multiple con-
[4, 5] and behavioral methods [6, 7]. Recent research in trol objectives, and incorporate forecasts of disturbances.
these areas mainly focuses on formation stabilization [8, 9] Moreover, DMPC distributes the computational load of
and formation following a predefined path [10, 11]. Inte- solving the control problem among the different agents.
grating motion planning in the formation control structure DMPC has been a very active research area since the end
is typically achieved by separating the problem in (i) find- of the 1990s. The reader is referred to [13, 14, 15, 16] for an
ing a trajectory for the (virtual) leader and (ii) controlling overview and comparison of various existing approaches.
The control of multi-vehicle systems is in general a com-
I This work benefits from KU Leuven-BOF PFV/10/002 Centre plex problem. Various existing MPC approaches have only
of Excellence: Optimization in Engineering (OPTEC), from the Bel- been applied to the use of linear vehicle dynamics or lack
gian Programme on Interuniversity Attraction Poles, initiated by the the flexibility to add arbitrary (nonconvex) constraints to
Belgian Federal Science Policy Office (DYSCO), from the project the problem formulation such as collision avoidance con-
G0C4515N of the Research Foundation-Flanders (FWO-Flanders)
and the KU Leuven Research project C14/15/067: B-spline based straints [17, 18]. Approaches considering realistic noncon-
certificates of positivity with applications in engineering. Ruben vex multi-vehicle problems are mostly limited to solving
Van Parys is a PhD fellow of FWO-Flanders. The MECO Research offline optimal control problems [19, 20]. Decoupling the
Group is an associated research lab of Flanders Make.
∗ Corresponding author multi-vehicle control problem efficiently imposes an extra
Email address: ruben.vanparys@kuleuven.be difficulty. Existing DMPC strategies typically solve in ev-
(Ruben Van Parys) ery update cycle an optimization problem in a distributed
Preprint submitted to Robotics and Autonomous Systems August 29, 2017
fashion [21, 22]. This generally involves multiple itera- 2.1. Vehicle description
tions, each of which requires solving local optimization The vehicles considered in this work are described by
problems and substantial communication between neigh- their states q(t) ∈ Rnq , inputs u(t) ∈ Rnu , ordinary differ-
boring agents. This often results in too slow update rates ential equation
in practice as the control law should be implemented on the q̇ = f (q, u) , (1)
vehicle’s embedded hardware, which has restricted compu-
tational power and communication capabilities. and state and input constraints over the considered time
This paper aims at reducing the existing gap in the lit- horizon
erature by presenting a novel DMPC strategy for control- e(q(t), u(t)) ≥ 0 , ∀t ∈ [0, T ] . (2)
ling multi-vehicle systems. The approach focuses on re- In order to describe the vehicle dynamics in a numerical
alistic complex problems, including nonlinear vehicle dy- optimization framework, a classical collocation approach
namics and collision avoidance constraints. It applies to a would parameterize the input u as a piecewise polyno-
particular class of vehicles, including holonomic vehicles, mial. The state q is then approximately determined from u
quadrotors and differential wheeled robots. Although var- by using a numerical integration scheme. Constraints
ious types of vehicle interaction can be incorporated, this on input and states are then imposed on discrete points
paper focuses on vehicles moving in formation. in time [29]. In contrast, this work uses a formulation
The approach is based on two main ingredients that al- that implies an exact representation of the system dynam-
low to solve the resulting optimal control problem in an ics (1) and that guarantees satisfaction of constraints (2)
efficient manner. First, the multi-vehicle problem is decou- over the whole time horizon. Therefore the system is de-
pled such that the computational load can be distributed scribed by means of output trajectories y(t) ∈ Rnu similar
over the agents. This is achieved by applying the Alter- as in [30, 31]. These output trajectories are assumed to
nating Direction Method of Multipliers (ADMM) [23]. In satisfy two requirements. First, it is assumed that the sys-
order to reduce the amount of communication, an updat- tem is differentially flat [32] sucht that the input u and
ing scheme is proposed that solves only one ADMM itera- state q can be determined from the output y, its deriva-
tion per control update. Second, a spline parameterization tives and anti-derivatives:
for the vehicles’ motion trajectories and a related enforce-
ment of constraints on these trajectories allow an efficient u = ψu (y, y (1) , . . . , y (r) ) ,
(3)
reformulation of an agent’s local subproblem [24, 25, 26]. q = ψq (y (−p) , . . . , y, . . . , y (r) ) ,
This further reduces the computational load of one control
update. Although no formal stability proof is provided, where r and p are positive integers. Second, substitut-
various numerical results and an experimental validation ing (3) in the state and input constraints (2), is assumed
demonstrate that the ADMM iterations converge over the to result in constraints that are polynomial in y, its deriva-
subsequent control updates. These updates are performed tives and anti-derivatives:
at a sufficiently fast rate with only a limited loss of opti-
mality. As a complement to the paper, a software toolbox e(q, u) ≥ 0 ⇐⇒ h(y (−p) , . . . , y (r) ) ≥ 0 ,
is provided that implements the proposed approach and
that forms a user-friendly interface for modeling and sim- where h(·) is polynomial. This assumption allows to en-
ulating the considered problems [27]. Furthermore, addi- force constraints at all time instances of the considered
tional illustrative examples are supplied in the toolbox. time horizon when using a spline parameterization for y.
Section 2 describes the considered vehicle types and the This is further explained in Section 3.1.
multi-vehicle control problem. Section 3 shows how this The above-mentioned assumptions are readily verified
problem is reformulated in a small-scale optimization prob- for linear holonomic vehicles, but also hold for various
lem, how it is solved in receding-horizon and how it is de- nonlinear vehicle models. An example hereof is illustrated
coupled over the agents. The proposed approach is further in Figure 1a, which represents a first principles quadrotor
analyzed and illustrated with simulation and experimental model in the vertical plane. The quadrotor is controlled by
examples in Section 4. Finally, Section 5 draws concluding two inputs, the total thrust acceleration u1 and the pitch
remarks. A preliminary version of this paper considering rate u2 , and has three degrees of freedom, the horizontal
only linear vehicle dynamics in simulation was presented and vertical position q1 and q2 and the pitch angle q3 . The
in [28]. equations of motion are

q̈1 = u1 sin q3 ,
q̈2 = u1 cos q3 − g , (4)
2. Problem formulation
q̇3 = u2 ,

This section describes the class of vehicles examined in where g denotes the gravitational acceleration. This sys-
this work. Afterwards the multi-vehicle optimal control tem is differentially flat with flat output (y1 , y2 ) = (q1 , q2 ).
problem is presented. Indeed, from (4) it follows that the third state q3 and both
2
u1 (y1 , y2 ) = (ũ1 , z) as follows:
u1
q3 Z t
q3 q1 (t) = y1 (τ )(1 − y2 (τ )2 )dτ + q1 (0) ,
q2 q2 0
u2 u2 Z t
q2 (t) = 2y1 (τ )y2 (τ )dτ + q2 (0) ,
q1 q1 0
q3 = 2 arctan y2 ,
(a) 2D quadrotor (b) Differential wheeled robot
u1 = y1 (1 + y22 ) ,
Figure 1: Examples of nonlinear vehicle models that allow poly- 2ẏ2
nomial constraints. u2 = .
1 + y22
When replacing bounds on q3 by constraints on
inputs can be written as a function of these outputs and y2 = tan q23 , all state and input constraints can be written
their derivatives: as polynomials in y, its derivatives and anti-derivatives.
Note that this approach does not require u1 to be positive
ÿ1 and allows backwards driving.
q3 = arctan ,
ÿ2 + g
q 2.2. Multi-vehicle optimal control problem
u1 = ÿ12 + (ÿ2 + g)2 , The problems considered in this work search for state
... ...
y (ÿ2 + g) − ÿ1 y 2 and input trajectories, both included in yi (·), for N dif-
u2 = 1 2 . ferent vehicles i in order to steer them from an initial
ÿ1 + (ÿ2 + g)2
condition, at t = 0, to a terminal condition, at t = T .
Bounds on the inputs can be formulated polynomially by Optimal trajectories are obtained by minimizing the sum
squaring the constraint on u1 and multiplying the con- of all vehicles’ objectives Ji while respecting their input
straint on u2 by its (nonnegative) denominator. When and state constraints hi , which include collision avoidance
replacing constraints on q3 by constraints on tan q3 and constraints. In addition the vehicles should move in for-
multiplying them by (ÿ2 + g), these become polynomial as mation. This is enforced by constraints gi,j which imply
well. Note that in the above derivations it is assumed that relations between the outputs yi and yj of respectively a
u1 ≥ 0 and ÿ2 + g > 0. vehicle i and its neighbor j. As illustrated in Section 4, this
Another example of a nonlinear vehicle model that al- formation can be described in absolute or relative terms,
lows polynomial constraints is a differential wheeled robot, depending on the definition frame. With Ni the neigh-
illustrated in Figure 1b. Its inputs are the tangential veloc- bor set of an agent i, this multi-vehicle problem generally
ity u1 and rotational velocity u2 . Its states are the position translates into an optimization problem of the following
q1 , q2 and orientation q3 , and the model is described by form:
N
X
q̇1 = u1 cos q3 , minimize Ji (yi )
yi (·), i=1,...,N
q̇2 = u1 sin q3 , (5) i=1
(j) (j)
q̇3 = u2 . subject to yi (0) = y0,i , j ∈ {0, . . . , r − 1}
(j)
yi (T ) =
(j)
yT,i , j ∈ {0, . . . , r − 1} (7)
When using a similar approach as with the two-
(−p) (r)
dimensional quadrotor, the transformed system would suf- hi (yi (t), . . . , yi (t)) ≥ 0
fer from singularities when u1 = 0. Furthermore, the gi,j (yi (t), yj (t)) = 0, ∀j ∈ Ni
relative formation constraints, introduced in Section 4.2,
∀t ∈ [0, T ], ∀i ∈ {1, . . . , N } .
would not allow a polynomial formulation. Therefore an-
other approach is used. The model is rewritten by intro- Collision avoidance constraints, included in hi , are func-
ducing z = tan q23 and using relations tion of a vehicle’s position and orientation. Position
and orientation are states of a vehicle and are assumed
1 − z2 2z to depend polynomially on the output trajectories yi ,
cos q3 = , sin q3 = . (6) their derivatives and anti-derivatives. The collision avoid-
1 + z2 1 + z2
ance constraints are formulated by a technique described
u1
After substituting ũ1 = 1+z 2 , the first two lines of the in [25, 26], which is recapitulated in Appendix A.
model (5) are transformed to
3. Spline-based DMPC
q̇1 = ũ1 (1 − z 2 ) , q̇2 = 2ũ1 z .
This section describes the proposed approach for solving
The states and inputs can be expressed as a function of the multi-vehicle formation control problem in an efficient
3
and distributed fashion. First, problem (7) is translated Algorithm 1 Spline-based MPC
into a nonlinear program by adopting a spline parame- 1: Repeat every ∆T : k = 0, 1, . . .
terization for the motion trajectories and an efficient en- 2: Extract qik (t), uki (t) from yki
forcement of constraints on these trajectories. Second, a 3: Vehicle i starts following trajectories qik (t), uki (t)
scheme is proposed for solving the resulting problem in 4: Estimate q̂ik = qik ((k + 1)∆T ), ûki = uki ((k + 1)∆T )
receding-horizon. Finally, this scheme is further adapted 5: Update horizon and compute ỹki
to a DMPC strategy in order to distribute the computa- 6: Compute yik+1 by solving (8), using q̂ik , ûki as initial
tional load among the vehicles. conditions and ỹki as hot-start
7: Until target reached
3.1. Spline parameterization
Problem (7) is infinite dimensional, comprising both in-
finitely many optimization variables and constraints, as Following these steps, problem (7) is reformulated in
the optimization variables yi (·) are functions and con- terms of the spline coefficients yi of the agents’ trajectories:
straints on them are enforced at all time instances. This
N
problem is transformed into a small-scale optimization X
problem along the lines of [24]. To cope with the infinitely minimize Ji (yi )
yi , i=1,...,N
many optimization variables, the trajectories yi (·) are ap- i=1

proximated as piecewise polynomials and are parameter- subject to yi ∈ Yi (8)


ized in a B-spline basis [33]: gi,j (yi , yj ) = 0 , ∀j ∈ Ni
n
X ∀i ∈ {1, . . . , N } .
ŷi (t) = yi,l bl (t) = yTi b(t) ,
The objective Ji and constraint functions gi,j are formu-
l=1
lated in terms of spline coefficients of ŷi . The set Yi rep-
with B-spline basis b = [b1 , . . . , bn ]T and B-spline coeffi- resents the initial and terminal condition constraints and
cients yi = [yi,1 , . . . , yi,n ]T . The main reason for adopting state and input constraints hi for an agent i.
the B-spline basis is the so-called convex hull property:
as the B-splines are positive and sum up to 1, a spline 3.2. Spline-based MPC
is always contained in the convex hull of its B-spline co- This subsection describes how the multi-vehicle prob-
efficients. This way, bounds on a spline function can be lem (8) is solved in an MPC fashion. Hence, at every
enforced by imposing them on the coefficients: sample period, an optimal control problem needs to be
solved over an updated control horizon, starting from the
yi ≥ 0 ⇒ ŷi (t) ≥ 0 , ∀t ∈ [0, T ] .
estimates of the current vehicles’ states and inputs. As in
Because any polynomial function of a spline is itself a our optimal control approach the solution of the optimiza-
spline, also polynomial constraints on spline trajectories tion problem is formulated as a spline, care must be taken
can be relaxed in the same way. When hi (·) in (7) is a in transferring the solution of the previous MPC iteration
polynomial, one can write to a hot-start for the subsequent iteration.
The overall MPC procedure is summarized in Algo-
(−p)
hi (ŷi
(r)
(t), . . . , ŷi (t)) rithm 1. At the start of an MPC iteration k, a vehicle
n n starts following its state and input trajectories computed
(−p) (r) during the previous iteration (steps 2-3). Meanwhile, the
X X
= hi ( yi,l bl (t), . . . , yi,l bl (t))
l=1 l=1 initial conditions for the current optimal control problem
m
X are determined (step 4), the trajectories of the previous
= hi,l (yi )b̃l (t) iteration are transformed into a hot-start for the current
l=1 problem (step 5), and the optimal control problem (8) is
= hi (yi )T b̃(t) , solved (step 6).
To account for the computational delay of an MPC iter-
with b̃ = [b̃1 , . . . , b̃m ]T and hi (yi ) = [hi,1 (yi ), . . . , hi,m (yi )]T ation, the approach of [34] is adopted to start the optimal
the basis and coefficients of the resulting spline. The con- control problem from a state and input estimate q̂ik , ûki at
vex hull property implies that the time the control signal will be applied. As a trajec-
tory computed during the k th iteration is applied at the
hi (yi ) ≥ 0 ⇒ hi (ŷi
(−p) (r)
(t), . . . , ŷi (t)) ≥ 0 , ∀t ∈ [0, T ] , start of iteration k + 1, q̂ik and ûki are estimates for respec-
tively qik ((k + 1)∆T ) and uki ((k + 1)∆T )) (step 4). These
which allows to replace the right-hand side by the more estimates are used to determine the initial conditions for
strict left-hand side. Note that this replacement is how- yi in the problem of step 6.
ever conservative. Systematic approaches to reduce the An updated control horizon and a corresponding spline
conservatism are discussed in [24]. basis are defined during step 5. In order to use the results
4
computational load of solving the optimal control problem
(a) among the agents. The decoupling is derived using tech-
0 niques from distributed optimization. Various approaches
T
were compared with respect to convergence speed. It turns
out that the Alternating Direction Method of Multipliers
(b)
(ADMM) [23] generally results in the best performance.
0 ∆T T The underlying derivations are formulated for ADMM but
can equivalently be listed for other approaches.
(c) Before applying ADMM on problem (8), the problem is
first reformulated as the following equivalent one:
0 ∆ξ T + ∆ξ
N
X
minimize Ji (yi )
Figure 2: First three updates of the control horizon, repre- yi , zi , zi,j , i=1,...,N
i=1
sented by the gray area. The nominal horizon time and con-
trol period are represented by respectively T and ∆T while subject to yi ∈ Yi
(9)
∆ξ = 2∆T is the nominal width of the polynomial interval, i.e. gi,j (zi , zi,j ) = 0 , ∀j ∈ Ni
the time interval between two consecutive breakpoints. The
crosses indicate the breakpoints. When ∆T is smaller than the yi = zi , yj = zi,j , ∀j ∈ Ni
first polynomial interval, the latter is shrunk over ∆T , as in (b). ∀i ∈ {1, . . . , N } ,
When this is not the case, the first polynomial interval is dis-
carded and an extra interval of length ∆ξ is added at the end, i.e. for each vehicle i slack variables zi and zi,j are intro-
over which the previous computed trajectory is extrapolated, duced that match respectively a vehicle’s own trajectory
as in (c). yi and the trajectory of its neighbor yj . Furthermore, each
formation constraint is replicated for the two correspond-
ing agents, i.e. when a vehicle i defines its position relative
computed in a previous iteration as a hot-start for the to vehicle j by means of constraint gi,j , vehicle j define its
current iteration, these results, which correspond to spline position with respect to i with a compatible constraint gj,i .
trajectories, are first expressed in the new basis. This This implies bi-directional interactions:
means that coefficients ỹki are computed such that
j ∈ Ni ⇔ i ∈ Nj . (10)
n
X n
X
yki,l bk−1
l (t) = ỹki,l bkl (t), k
∀t ∈ T , The idea behind ADMM is to solve an appropriate dual
l=1 l=1 problem of (9). There are many ways to formulate this
problem, depending on which constraints are dualized.
where T k is the control horizon considered at iteration k Based on rules formulated in [19], which aim at reducing
and bk = [bk1 , . . . , bkn ]T the corresponding B-spline basis. the duality gap, only the constraints yi = zi and yj = zi,j
These transformed coefficients are then used as hot-start are dualized. ADMM makes use of the augmented La-
for the problem solved in step 6. grangian function which adds an extra quadratic penalty
The way of updating the control horizon cannot be cho- term in order to improve robustness and to yield milder
sen freely. On the one hand it should be possible to express convergence assumptions. For problem (9) this function is
the future part of previous trajectories in the new basis.
As a spline consists of polynomial pieces glued together N 
X ρ
with some continuity conditions at certain breakpoints, it Lρ = Ji (yi ) + λTi (yi − zi ) + kyi − zi k22
i=1
2
is required to preserve the location of future breakpoints
ρ 
of bk−1 in bk . On the other hand it is desired to keep the
X
+ λTi,j (yj − zi,j ) + kyj − zi,j k22 ,
dimension of the bases constant over the updates. Practi- 2
j∈Ni
cally this allows building the optimization problem in ad- N
X
vance, which is a time-consuming task. Both desires are = Lρ,i (yi , zi , λi , yj , zi,j , λi,j ) ,
fulfilled by using the update scheme illustrated in Figure i=1
2. N
X
= Lρ,i (yi , zi , λi , yi , zj,i , λj,i ) ,
3.3. ADMM based Distributed MPC i=1
Step 6 of Algorithm 1 requires the solution of the cou- where λi and λi,j represent the dual variables associated
pled problem (8). In this problem, many of the con- with the dualized constraints. The last equality is true
straints only apply to one specific agent while the objec- because of the bi-directional interaction (10). The dual
tive is composed of the individual objectives of the dif- function is written as:
ferent agents. The only coupling is imposed by the in-
teraction constraint gi,j . This subsection describes how q(λi , λi,j ) = inf Lρ .
∀i: yi ∈Yi
the problem can be decoupled in order to distribute the ∀i,∀j∈Ni : gi,j (zi ,zi,j )=0

5
By maximizing this dual function, the optimum is found. Algorithm 2 ADMM based Distributed MPC
ADMM solves this dual problem by using gradient ascent. 1: Perform n ADMM iterations and get y0i , z0i , z0j,i , λ0i ,
The gradient of q with respect to the dual variables is eval-
λ0j,i
uated by first searching for y+ + +
i , zi and zi,j that minimize 2: Repeat every ∆T : k = 0, 1, . . .
Lρ . In this way, the gradient is evaluated as:
3: Extract qik (t), uki (t) from yki
4: Start following trajectories qik (t), uki (t)
∇λi q = y+ +
i − zi ,
5: Estimate q̂ik = qik ((k + 1)∆T ), ûki = uki ((k + 1)∆T )
∇λi,j q = y+ +
j − zi,j . 6: Update horizon and compute ỹki , z̃ki , z̃kj,i , λ̃ki , λ̃kj,i
7: Compute yk+1i , using q̂ik , ûki as initial conditions:
In ADMM, the search for y+ + +
i , zi and zi,j is split in two
consecutive steps. First Lρ is minimized over yi and in a yk+1
i := argmin Lρ,i (yi , z̃ki , λ̃ki , yi , z̃kj,i , λ̃kj,i )
second step it is minimized over zi and zi,j . In this way, yi ∈Yi (q̂ik ,ûk
i)

both steps can be decoupled over the agents.


8: Communication with agent j , ∀j ∈ Ni :
Solving problem (8) until convergence requires various
send yk+1
i , receive yk+1
j
ADMM iterations. Incorporating this sequence in step 6
of Algorithm 1 is however not desired in practice as it 9: Compute zk+1
i and z k+1
i,j :
would involve too high a computation and communication
zk+1
! argmin Lρ,i (yk+1
i , zi , λ̃ki , yk+1
j , zi,j , λ̃ki,j )
load. Therefore a DMPC scheme is proposed that executes i
:= zi , zi,j
only one ADMM iteration per control update starting from zk+1
i,j s. t. gi,j (zi , zi,j ) = 0 , ∀j ∈ Ni
the solution of the previous iteration. The idea is that
ADMM converges while the vehicles are heading towards Compute λk+1 and λk+1
10: i i,j :
their destination.
Algorithm 2 summarizes the DMPC strategy. The algo- λk+1
i := λ̃ki + ρ(yk+1
i − zk+1
i )
rithm starts with executing a number of ADMM iterations λk+1 k k+1
− zk+1 ∀j ∈ Ni
i,j := λ̃i,j + ρ(yj i,j ) ,
before the start of the MPC sequence in order to have a
good initial trajectory to follow (step 1). In the exam- 11: Communication with agent j , ∀j ∈ Ni :
ples of Section 4, five initial ADMM iterations are used. send zk+1 k+1 k+1 k+1
i,j and λi,j , receive zj,i and λj,i
The steps during an MPC iteration are similar as those 12: Until target reached
listed in Algorithm 1, apart from solving the global opti-
mal control problem. This is replaced by the steps of one
ADMM iteration. These steps include the solution of two 4.1. Quadrotor formation flight
optimization problems in step 7 and 9 and two commu-
The first use case considers a formation of two-
nication cycles with the neighbors during step 8 and 11.
dimensional quadrotors as described in Section 2.1. This
As an ADMM iteration depends on results computed in a
formation should move between two vertical walls in or-
previous iteration, these results are first expressed in the
der to reach a desired destination, as is presented in the
basis corresponding to the new control horizon. This is
first snapshot of Figure 3. Using the output trajectories
done in step 6 by computing ỹki , z̃ki , z̃kj,i , λ̃ki and λ̃kj,i . T
yi = [qi,1 , qi,2 ] , the objective of a vehicle i at iteration k
Each agent i now contains two sets of variables: yi ,
is chosen as
which are used to drive the vehicle, and zi and zi,j , repre-
senting guesses of respectively yi and yj of its neighbors j.
Z
Ji (yi ) = kyi (t) − yT,i k1 dt (11)
Step 7 implies that yki satisfy at all time the local con- Tk
straints, represented by Yi , while step 9 ensures that zki
and zki,j satisfy the formation constraints. The ADMM it- in order to steer it as fast as possible to its destination yT,i .
erations let the y and z variables converge towards each The formation constraints are described in absolute terms
other. meaning that they are expressed with respect to a fixed
inertial frame:

4. Examples gi,j (yi , yj ) = yi − yj − ∆yi,j = 0 ,

The proposed DMPC strategy is illustrated and ana- where ∆yi,j represents the desired relative position be-
lyzed by means of three example cases. The first one con- tween a vehicle i and j. The interconnection between
siders the numerical simulation of a formation of quadro- the vehicles is circular. This means that each agent has
tors flying in a changing environment. The second one two neighbors, one on the left and one on the right. The
considers differential wheeled robots moving in relative for- nominal control horizon length equals T = 5 s, the control
mation. The third example validates the DMPC approach period ∆T = 0.1 s and nominal width of the polynomial
experimentally on three robotic platforms. Additional ex- interval ∆ξ = 0.5 s. Applied to this example, step 7 of Al-
amples are found in the supporting toolbox [27]. gorithm 2 is a nonconvex nonlinear program, while step 9
6
t = 0.7 s t = 0.9 s t = 1.2 s t = 1.8 s t = 2.4 s

Figure 3: Motion trajectories for a formation of three quadrotors in a dynamic environment. At t = 0.8 s, the vehicles observe
an obstacle approaching with a constant velocity. The proposed DMPC approach allows to avoid this obstacle while flying in
formation.

is a quadratic program with linear equality constraints. 100


The former is solved with Ipopt [35], the latter is solved
in one step by directly solving the KKT system. For both 10−3

ck
problems CasADi [36] is used as symbolic framework, algo-
rithmic differentiation tool and interface to the numerical 10−6
solvers. 100
A receding-horizon algorithm is especially beneficial in
the presence of disturbances. This is illustrated for a for- kF 10−2
mation of three quadrotors that suddenly encounter a mov-
ing object in their airspace. The resulting motion is illus-
10−4
trated in Figure 3. At t = 0.8 s, the aerial vehicles ob- 0 0.5 1 1.5 2 2.5 3
serve the object and determine its position and (constant) t (s)
velocity. This information is used to adapt the trajecto-
ries in order to avoid collisions during the considered con- Figure 4: Combined residual ck and formation error kF as a
trol horizon. The first adapted trajectories are applied at function of time for a formation of three quadrotors in a dy-
t = 0.9 s. One can observe in Figure 3 that these trajecto- namic environment. At t = 0.9 s, a jump occurs in the residual
ries contain large formation violations. This is possible as and formation error due to a change in the environment. From
these constraints are implicitly relaxed in the augmented that point, the DMPC approach converges to a new optimum.
Lagrangian. However, as the updates proceed, these tra-
jectories converge towards a new optimum such that the
quadrotors can avoid the object while attaining the for- jump occurs in both the residual and formation error due
mation. to the change in the environment. From that point, the
The convergence is monitored in Figure 4 by means of DMPC approach converges to the new optimum and the
the combined residual ck and formation error kF . The formation error is quickly reduced during the subsequent
combined residual measures both the primal and the dual iterations.
residual simultaneously [37] and is formulated as Solving the quadrotor formation problem with the pro-
posed DMPC approach takes on average 57 ms per control
N 
X X update1 . As a comparison, solving this problem with a
ck = ρkyki − zki k22 + ρkykj − zki,j k22 + central MPC approach as described in Algorithm 1, takes
i=1 j∈Ni 187 ms per update.
X 
ρkzki − z̃k−1
i k22 + ρkzki,j − z̃k−1
i,j k2
2 .
j∈Ni 4.2. Relative formation of differential wheeled robots
In order to further illustrate the versatility of the pro-
The formation error is computed as the average relative
posed approach, a different example case is presented. It
deviation of a vehiclePwith respect to the formation cen-
considers three differential wheeled robots as described in
ter. With yck (t) = N1 i yik (t) the formation center of the
Section 2.1. They should move in a relative formation.
planned trajectories during iteration k and ∆yi,c the ideal
This means that the formation is defined with respect to
relative position of a vehicle i with respect to the formation
the local robot frames, and acts as if the vehicles were
center, this becomes
rigidly attached to each other. This is desired in appli-
1
Z N
1 X kyik (t) − yck (t) − ∆yi,c k2 cations as cooperative transportation. Each vehicle ex-
kF = dt , presses in its local robot frame its desired relative position
|T k | Tk N i=1 k∆yi,c k2

where T k indicates the considered control horizon at it- 1 All simulations are performed on a notebook with Intel Core

eration k and |T k | represents its length. At t = 0.9 s, a i5-4300M CPU @ 2.60 GHz x 4 processor and 8 GB of memory.

7
T
∆qi,c = [∆xi,c , ∆yi,c ] with respect to the formation cen-
ter, where ∆xi,c and ∆yi,c are expressed along respectively
the longitudinal and lateral direction. The formation cen- (a)
c T
ter qic = qi,1
 c 
, qi,2 , seen from vehicle i and expressed in
the inertial frame becomes
c
qi,1 = qi,1 − ∆xi,c cos qi,3 + ∆yi,c sin qi,3 ,
(12) 1

ui,1 (m/s)
c
qi,2 = qi,2 − ∆xi,c sin qi,3 − ∆yi,c cos qi,3 .
0.5
The variables qic are introduced as slack (spline) variables (b)
in the optimization problem. After substituting (6), and 0
relaxing the equality constraint, (12) is reformulated as 0 1 2 3 4 5
polynomial constraints t (s)
− ≤ (1 + zi2 )(qi,1 − qi,1
c
) − (1 − zi2 )∆xi,c + 2zi ∆yi,c ≤  , Figure 5: Three differential wheeled robots moving in relative
− ≤ (1 + zi2 )(qi,2 − qi,2
c
) − 2zi ∆xi,c − (1 − zi2 )∆yi,c ≤  , formation. (a) illustrates the the motion, while (b) represents
(13) the corresponding tangential velocity.
where  is a small positive number. The constraint relax-
ation is necessary to find a feasible solution in the pro-
posed spline parameterization. Inequality constraints (13) solving the non-linear program of step 7 in Algorithm 2 by
are added to the local constraint set Yi of vehicle i. The Ipopt on the Odroid XU4. The DMPC algorithm gener-
formation is implied by enforcing consensus on the forma- ates state and input trajectories that are provided as refer-
tion center, expressed in the inertial frame: ence to a low-level feedback controller running at 100 Hz.
Figure 7 presents two point-to-point tasks performed on
gi,j (qic , qjc ) = qic − qjc = 0 . the robotic platforms illustrated by snapshots taken from
the ceiling camera. In the first example a triangular for-
Using this approach, step 9 of Algorithm 2 is again reduced mation should avoid a static obstacle in the environment.
to a linear equality constrained quadratic program. The target position for the formation center is indicated
For this example, the proposed DMPC approach is ap- by the concentric gray circles. The gray lines indicate the
plied and the resulting point-to-point motion and tangen- predicted position trajectories for each platform. The rect-
tial velocity ui,1 for each vehicle are presented in Figure 5. angles indicate the shapes used for avoiding collisions be-
The robots form a rigid triangle that can translate and tween vehicles and obstacle. To account for disturbances
rotate in order to reach the destination in an obstructed and model-plant mismatch it is desired to stay further
environment. Figure 5b illustrates how an outer lying ve- away from obstacles than strictly necessary for avoiding
hicle is constrained by its maximum velocity of 1 m/s while collisions. Therefore a similar construction as described
covering the S-turn. As a similar objective as (11) is used, in [26] is used to motivate the vehicles to move an extra
this proves the optimality of the solution. Note that the distance of 5 cm away from the obstacle. The second ex-
gradual increase and decrease in velocity at the beginning ample considers a formation of two vehicles. The platform
and the end is due to the spline parameterization. The located in the center of the field, indicated by the red rect-
average required time to perform a control update equals angle, acts as an obstacle which is steered manually with
392 ms. Currently ways of reducing this update time are a gamepad. At t = 1 s it suddenly starts to move down-
investigated. wards. The other vehicles are using an estimate of the
obstacle’s position and velocity in order to predict its mo-
4.3. Experimental validation on holonomic platforms
tion. In this way they can adapt their trajectories to pass
The presented approach is implemented and demon- the vehicle from above in stead of trying to move under-
strated on three in-house developed robotic platforms as il- neath the vehicle, which was the initial plan. The DMPC
lustrated in Figure 6. Each platform is equipped with four algorithm makes sure the two vehicles attain their forma-
independently driven Mecanum wheels, which renders the tion. A video illustrating the experiments is found in the
system holonomic. The platform contains an Odroid XU4 readme file of the supporting toolbox [27].
single board computer on which the DMPC algorithm is
implemented. The platforms’ hardware communicate with
4.4. OMG-tools
each other over Wi-Fi. The setup also includes a ceiling
camera that detects the platforms’ absolute position and The proposed DMPC approach is implemented as part
orientation. Each robot merges this information with its of a more general spline-based motion control toolbox with
local encoder measurements for retrieving a fast and accu- the name Optimal Motion Generation-tools [27]. This
rate state estimate. toolbox is written in Python and uses CasADi [36] as
The DMPC iterations are performed periodically with symbolic framework and interface to solvers. The goal
a rate of 4 Hz. The bottleneck for increasing this rate is of OMG-tools is to facilitate the modeling, simulation and
8
(a)

(b)

Figure 7: Experimental validation of the DMPC approach on a formation of robotic platforms moving (a) in a static environment
and (b) in a dynamic environment.

Figure 6: In-house developed robotic platform


Figure 8: Simulation example performed with ROS and Gazebo
illustrating a formation of three Pioneer P3-DX robots avoiding
deployment of spline-based motion problems. The soft- a fourth independent P3-DX.
ware is easily coupled with existing widely used robotic
frameworks such as ROS [38]. An example considering a spline parameterization for the vehicles’ trajectories. On
formation of three Pioneer P3-DX robots moving in for- the other hand, the computational load of this problem is
mation and avoiding a fourth independently driven P3-DX distributed over the vehicles by using the Alternating Di-
is presented in Figure 8 . In order to generate this exam- rection Method of Multipliers (ADMM). A DMPC scheme
ple, OMG-tools is integrated in ROS and coupled to the is proposed where one ADMM iteration is performed dur-
robotic simulator Gazebo [39]. A movie demonstrating the ing each control update. Numerical simulations with non-
example is found in the readme file of OMG-tools. linear vehicle dynamics and an experimental validation on
Apart from all examples presented in this paper, the holonomic platforms show that the ADMM iterations con-
toolbox provides more illustrations of the capabilities of verge sufficiently fast for the considered multi-vehicle ap-
the presented method. For a quick overview, the interested plication. The proposed DMPC approach and various il-
reader is referred to the readme file that contains various lustrative examples are implemented as part of a spline-
illustrative animations and videos of experiments. based motion control toolbox.

5. Conclusion Appendix A. Collision avoidance constraints


This paper presents a novel DMPC strategy for con- Collision avoidance constraints between a vehicle and
trolling multi-vehicle systems moving in formation. In an obstacle are constructed by imposing the existence of a
contrast to existing approaches we allow to handle real- separating hyperplane between their shapes. Note that
istic problems, including nonlinear vehicle dynamics and this construction can only separate convex shapes [40].
obstacle avoidance constraints. In order to retrieve an ef- Figure A.9 illustrates this approach. Suppose the vehi-
ficient algorithm, efforts are made to reduce the compu- cle’s shape is represented by a circle with center v and
tational and communicational burden. On the one hand radius r while the obstacle is a convex polygon with ver-
the size of the overall optimization is reduced by using a tices wi . Demanding the separation of both shapes by a
9
{x ∈ R2 |aT x = b} [4] M. A. Lewis, K.-H. Tan, High precision formation control of mo-
bile robots using virtual structures, Autonomous Robots 4 (4)
(1997) 387–403.
w4 w3 [5] R. W. Beard, J. Lawton, F. Y. Hadaegh, A coordination archi-
r tecture for spacecraft formation control, IEEE Transactions on
control systems technology 9 (6) (2001) 777–790.
[6] T. Balch, R. C. Arkin, Behavior-based formation control for
v multirobot teams, Robotics and Automation, IEEE Transac-
w0 w2 tions on 14 (6) (1998) 926–939.
[7] R. Olfati-Saber, Flocking for multi-agent dynamic systems: Al-
gorithms and theory, IEEE Transactions on automatic control
w1 51 (3) (2006) 401–420.
[8] K. Hengster-Movrić, S. Bogdan, I. Draganjac, Multi-agent for-
mation control based on bell-shaped potential functions, Jour-
Figure A.9: Separating a circle and a convex polygon by a nal of intelligent & robotic systems 58 (2) (2010) 165–189.
separating line. [9] W. Dong, Robust formation control of multiple wheeled mobile
robots, Journal of Intelligent & Robotic Systems 62 (3) (2011)
547–565.
[10] F. Xiao, L. Wang, J. Chen, Y. Gao, Finite-time formation con-
line {x ∈ R2 |aT x = b} is achieved with the following con- trol for multi-agent systems, Automatica 45 (11) (2009) 2605–
straints: 2611.
[11] J. Ghommam, H. Mehrjerdi, M. Saad, F. Mnif, Formation path
−aT v + b ≥ rkak2 , following control of unicycle-type mobile robots, Robotics and
Autonomous Systems 58 (5) (2010) 727–736.
aT wi − b ≥ 0 , ∀i ∈ {0, . . . , 4} . [12] M. Saska, V. Vonásek, T. Krajnı́k, L. Přeučil, Coordination
and navigation of heterogeneous mav–ugv formations localized
by a hawk-eye-like approach under a model predictive control
The center v of the circle depends on the position of the
scheme, The International Journal of Robotics Research 33 (10)
vehicle and therefore on the output trajectory y as dis- (2014) 1393–1412.
cussed in Section 2.1. In order to avoid collisions at all [13] P. D. Christofides, R. Scattolini, D. M. de la Peña, J. Liu, Dis-
time, the separating line is allowed to change over time. tributed model predictive control: A tutorial review and fu-
ture research directions, Computers & Chemical Engineering
Both a(·) and b(·) are introduced as time dependent op- 51 (2013) 21–41.
timization variables and are parameterized as splines. In [14] R. R. Negenborn, J. Maestre, Distributed model predictive con-
the event of a dynamic environment the vertices wi (·) of trol: An overview and roadmap of future research opportunities,
the obstacle can be parameterized as (known) spline tra- Control Systems, IEEE 34 (4) (2014) 87–97.
[15] J. M. Maestre, R. R. Negenborn, Distributed model predictive
jectories in order to incorporate predictions concerning the control made easy, Springer, 2014.
obstacle’s motion. After reformulating the constraints to [16] J. Maestre, M. Ridao, A. Kozma, C. Savorgnan, M. Diehl,
be differentiable, they are written as M. Doan, A. Sadowska, T. Keviczky, B. De Schutter, H. Scheu,
et al., A comparison of distributed MPC schemes on a hydro-
power plant benchmark, Optimal Control Applications and
−a(t)T v(y(t)) + b(t) ≥ r , Methods 36 (3) (2015) 306–332.
a(t)T wi (t) − b(t) ≥ 0 , ∀i ∈ {0, . . . , 4} [17] P. Trodden, A. Richards, Distributed model predictive con-
(A.1) trol of linear systems with persistent disturbances, International
T
a(t) a(t) ≤ 1 , Journal of Control 83 (8) (2010) 1653–1663.
[18] M. Farina, A. Perizzato, R. Scattolini, Application of dis-
∀t ∈ [0, T ] . tributed predictive control to motion and coordination problems
for unicycle autonomous robots, Robotics and Autonomous Sys-
When v(·) is a polynomial function of y, its derivatives and tems 72 (2015) 248–260.
anti-derivatives, constraints (A.1) are polynomial in the [19] R. L. Raffard, C. J. Tomlin, S. P. Boyd, Distributed optimiza-
tion for cooperative agents: Application to formation flight, in:
spline variables y(t), a(t) and b(t) such that the constraint Proceedings of the 2004 Conference on Decision and Control,
enforcement of Section 3.1 can be used to reformulate them Vol. 3, 2004, pp. 2453–2459.
in a finite set of constraints. [20] A. J. Häusler, A. Saccon, A. P. Aguiar, J. Hauser, A. M. Pascoal,
Energy-optimal motion planning for multiple robotic vehicles
with collision avoidance, IEEE Transactions on Control Systems
Technology 24 (3) (2016) 867–883.
References [21] F. Farokhi, I. Shames, K. H. Johansson, Distributed MPC via
dual decomposition and alternative direction method of mul-
[1] M. Beukenberg, D. Hummel, Aerodynamics, performance and tipliers, in: Distributed Model Predictive Control Made Easy,
control of airplanes in formation flight, in: ICAS, Congress, 17 Springer, 2014, pp. 115–131.
th, Stockholm, Sweden, Proceedings., Vol. 2, 1990, pp. 1777– [22] H. Y. Ong, J. Gerdes, Cooperative collision avoidance via prox-
1794. imal message passing, in: Proceedings of the 2015 American
[2] J. P. Desai, J. P. Ostrowski, V. Kumar, Modeling and control Control Conference, 2015, pp. 4124–4130.
of formations of nonholonomic mobile robots, Robotics and Au- [23] S. Boyd, N. Parikh, E. Chu, B. Peleato, J. Eckstein, Distributed
tomation, IEEE Transactions on 17 (6) (2001) 905–908. optimization and statistical learning via the alternating direc-
[3] S. Mastellone, D. M. Stipanović, C. R. Graunke, K. A. tion method of multipliers, Foundations and Trends R in Ma-
Intlekofer, M. W. Spong, Formation control and collision avoid- chine Learning 3 (1) (2011) 1–122.
ance for multi-agent non-holonomic systems: Theory and exper- [24] W. Van Loock, G. Pipeleers, J. Swevers, B-spline parameterized
iments, The International Journal of Robotics Research 27 (1) optimal motion trajectories for robotic systems with guaranteed
(2008) 107–126.

10
constraint satisfaction, Mechanical Sciences 6 (2) (2015) 163– Goele Pipeleers is an assistant pro-
171. fessor at the Department of Mechani-
[25] T. Mercy, W. Van Loock, G. Pipeleers, Real-time motion plan- cal Engineering of the KU Leuven. She
ning in the presence of moving obstacles, in: Proceedings of the
2016 European Control Conference, 2016, pp. 1586–1591.
received her M.Sc. degree in mechan-
[26] R. Van Parys, G. Pipeleers, Spline-based motion planning in an ical engineering and her Ph.D. degree
obstructed 3D environment, in: Proceedings of the 20th IFAC in mechanical engineering from the KU
World Congress, 2017, pp. 8998–9003. Leuven, in 2004 and 2009, respectively.
[27] R. Van Parys, T. Mercy, OMG-tools, https://github.com/
meco-group/omg-tools (2016). She has been a Post-doctoral Fellow
[28] R. Van Parys, G. Pipeleers, Online distributed motion planning of the Research Foundation Flanders,
for multi-vehicle systems, in: Proceedings of the 2016 European and a visiting scholar at the Colorado
Control Conference, 2016, pp. 1580–1585. School of Mines and at the University of California Los
[29] C. R. Hargraves, S. W. Paris, Direct trajectory optimization
using nonlinear programming and collocation, Journal of Guid- Angeles. Her research interests include convex optimiza-
ance, Control, and Dynamics 10 (4) (1987) 338–342. tion, optimal and robust control, and their applications in
[30] N. Petit, M. B. Milam, R. M. Murray, Inversion based con- mechatronics.
strained trajectory optimization, in: 5th IFAC symposium on
nonlinear control systems, Vol. 5, Citeseer, 2001.
[31] P. Martin, R. M. Murray, P. Rouchon, Flat systems, equivalence
and trajectory generation, Tech. rep., California Institute of
Technology (2003).
[32] M. Fliess, J. Lévine, P. Martin, P. Rouchon, Flatness and de-
fect of non-linear systems: introductory theory and examples,
International Journal of Control 61 (6) (1995) 1327–1361.
[33] C. De Boor, A practical guide to splines, revised edition, vol.
27 of applied mathematical sciences (2001).
[34] R. Findeisen, F. Allgöwer, Computational delay in nonlinear
model predictive control, in: Proc. Int. Symp. Adv. Contr. of
Chem. Proc, 2004, pp. 427–432.
[35] A. Wächter, L. T. Biegler, On the implementation of an interior-
point filter line-search algorithm for large-scale nonlinear pro-
gramming, Mathematical programming 106 (1) (2006) 25–57.
[36] J. Andersson, A general-purpose software framework for
dynamic optimization, Ph.D. thesis, Arenberg Doctoral
School, KU Leuven, Department of Electrical Engineering
(ESAT/SCD) and Optimization in Engineering Center, Kas-
teelpark Arenberg 10, 3001-Heverlee, Belgium (2013).
[37] T. Goldstein, B. O’Donoghue, S. Setzer, R. Baraniuk, Fast alter-
nating direction optimization methods, SIAM Journal on Imag-
ing Sciences 7 (3) (2014) 1588–1623.
[38] M. Quigley, K. Conley, B. Gerkey, J. Faust, T. Foote, J. Leibs,
R. Wheeler, A. Y. Ng, Ros: an open-source robot operating
system, in: ICRA workshop on open source software, Vol. 3,
Kobe, 2009, p. 5.
[39] N. Koenig, A. Howard, Design and use paradigms for gazebo,
an open-source multi-robot simulator, in: Intelligent Robots
and Systems, 2004.(IROS 2004). Proceedings. 2004 IEEE/RSJ
International Conference on, Vol. 3, IEEE, 2004, pp. 2149–2154.
[40] S. Boyd, L. Vandenberghe, Convex optimization, Cambridge
university press, 2004.

Ruben Van Parys received the


M.Sc. degree in industrial science, in
2011, from the Katholieke Hogeschool
Brugge-Oostende (KHBO), Belgium,
and the M.Sc degree in mechanical en-
gineering, in 2014, from the Katholieke
Universiteit Leuven (KU Leuven), Bel-
gium, where he is currently working to-
wards the Ph.D. degree. His research
interests include optimal motion control of mechatronic
systems with a focus on cooperating multi-vehicle systems.

11

You might also like