of 15
IEEE TRANSACTIONS ON ROBOTICS
1
Robotic Herding of a Flock of Birds Using
an Unmanned Aerial Vehicle
Aditya A. Paranjape
, Soon-Jo Chung
, Senior Member, IEEE
, Kyunam Kim
,
and David Hyunchul Shim
, Senior Member, IEEE
Abstract
—In this paper, we derive an algorithm for enabling
a single robotic unmanned aerial vehicle to herd a flock of birds
away from a designated volume of space, such as the air space
around an airport. The herding algorithm, referred to as the
m
-
waypoint algorithm, is designed using a dynamic model of bird
flocking based on Reynolds’ rules. We derive bounds on its per-
formance using a combination of reduced-order modeling of the
flock’s motion, heuristics, and rigorous analysis. A unique contri-
bution of the paper is the experimental demonstration of several
facets of the herding algorithm on flocks of live birds reacting to
a robotic pursuer. The experiments allow us to estimate several
parameters of the flocking model, and especially the interaction
between the pursuer and the flock. The herding algorithm is also
demonstrated using numerical simulations.
Index Terms
—Aerial robotics, biologically inspired robots, field
robots, motion control.
I. I
NTRODUCTION
B
IRD AND OTHER wildlife collisions with aircraft cause
well over $1.2 billion in damages to the aviation industry
worldwide [1], [2]. The Federal Aviation Administration (FAA)
documented 142 000 wild-life strikes at U.S. airports between
1990 and 2013, with birds being involved in 97% of the re-
ported cases [3]. A large number of passive and active methods
are currently used for deterring birds from entering the airspace
around airports [1], [4], [5], which depend on the type of birds
encountered at the airport. Passive techniques typically work
by curtailing the food and water resources around the airfield
or laying bird-repellent grass swards. On the other hand, active
techniques include the use of live ammunition and flares at air-
ports. Usually, a combination of the aforementioned techniques
Manuscript received October 12, 2017; revised April 4, 2018; accepted April
7, 2018. This paper was recommended for publication by Guest Editor P. Dames
and Editor F. Park upon evaluation of the reviewers’ comments. This work was
supported in part by the National Science Foundation CAREER Award NSF
IIS 1253758 & 1664186 and in part by the California Institute of Technology.
(Corresponding author: Soon-Jo Chung.)
A. A. Paranjape is with the Department of Aeronautics, Imperial College
London, London SW7 2AZ, U.K. (e-mail:
,
a.paranjape@imperial.ac.uk).
S.-J. Chung and K. Kim are with the Graduate Aerospace Laborato-
ries, California Institute of Technology, Pasadena, CA 91125 USA (e-mail:
,
sjchung@caltech.edu; knkim@caltech.edu).
D. H. Shim is with the Department of Electrical Engineering, Korea Advanced
Institute of Science and Technology, Daejeon 305-701, South Korea (e-mail:
,
hcshim@kaist.ac.kr).
This paper has supplementary downloadable material available at
http://ieeexplore.ieee.org.
Color versions of one or more of the figures in this paper are available online
at http://ieeexplore.ieee.org.
Digital Object Identifier 10.1109/TRO.2018.2853610
Fig. 1. Setting for the problem addressed in the paper.
is required for effective bird control, and even that effectiveness
is known to be limited [4]. The only proven lasting way is to
use birds of prey [5], but it is considerably difficult to train and
control real birds. Further, the most effective performers (e.g.,
peregrine falcons) are endangered species. As an alternative,
remote-controlled airplanes resembling birds of prey have been
tested using skilled human pilots [6].
In this paper, we develop a novel robotic herding algorithm
for birds flying near airports using unmanned aerial vehicles
(UAVs). The present paper is based on the preliminary work
reported in [7], [8], and differs in its analysis of the stability of
flocks, the analysis of the performance of herding algorithms,
and the experimental demonstration of the principles underly-
ing the herding algorithm. A graphical prelude to this paper is
depicted in Fig. 1.
A. Overview of the Literature
Modeling the behavior of flocks is the starting point for the
development of herding algorithms. Reynolds [9] formulated
simple motion behaviors (collision avoidance, velocity match-
ing, and flock centering) for creating computer animations of
bird flocks and simulating the stable collective motion seen
therein. Reynolds’ model has formed the basis for other flocking
models such as the self-propelled particle model [10], [11] and
a leader-based modification of Reynolds’ model [12]. Along-
side theoretical modeling, attempts have been made to extract
flocking rules, aggregate patterns, and ordering from empirical
studies on large flocks of birds and fish [13], [14]. The reader
is referred to [15] for a detailed review of collective animal
behavior.
1552-3098 © 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See http://www.ieee.org/publications
standards/publications/rights/index.html for more information.
2
IEEE TRANSACTIONS ON ROBOTICS
Over the years, several distributed, scalable coordination
algorithms have been developed while trying to obtain
mathematical guarantees on the stability of the formation
[16]–[22]. This has been accompanied by parallel work on un-
derstanding the presence of order and phase transitions in flocks
[23], building upon analogies between flocks on the one hand,
and fluid and magnetic systems on the other. Flocking dynamics
described by Reynolds’ rule are known to be asymptotically
stable under fairly weak conditions on the topology of the
underlying graph [17], [18], [24], [25]. Stronger results, such as
exponential stability, have been found for linear time-varying
consensus protocol for single integrator systems [26], in the
context of synchronization for second-order Euler–Lagrange
systems [20]–[22], and using tools from dynamical systems
theory for time-invariant, undirected graph topologies in
second-order, two-dimensional (2-D) flocking dynamics [27].
Preliminary results on exponential stability of flocks under tree
and star topology constraints are presented in [8].
Modeling the response of a flock to external pursuers is es-
sential for developing herding models and strategies. Evasive
strategies used by flocks against one or more predators are pre-
sented in [28], [29]. Escape waves, as a means for formulating
the evasive response, have been examined for starling flocks [30]
and fish schools [31]. A simulation study of agitation waves in
starling flocks is presented in [32]. The dynamics between a
school of fish and a pursuer are shown to depend on local, fast-
time scale predator–prey interactions [33]. The expected size
of flocks is correlated with the likelihood of predation: Com-
pact and large flocks occur in areas with higher predation, and
vice-versa [34].
Early work on herding algorithms used geometric principles
to identify the relative position and posture of the shepherd with
respect to the flock [35]–[37], in order to first confine the flock
within a well-defined spatial zone and then impose trajectory
tracking on the confined flock [38], [39]. It is generally well
known that these algorithms may perform poorly when a single
shepherd is employed [37]. Heuristic herding strategies used by
solitary sheep dogs were modeled in [40] and used to design a
strategy that enforces confinement to achieve herding. However,
the design was not analyzed rigorously, which leaves open the
question of its limitations and performance guarantees.
B. Objectives and Contributions
The primary objective of this paper is to design a strategy
for diverting and herding a flock of birds away from a specified
region. This region is modeled conservatively as a cylindrical
volume around an airport located on the ground. Our algorithm
can be extended readily to the case where the specified region
is spherical, as depicted in Fig. 1, rather than cylindrical.
We present a novel herding technique, called the
m
-waypoint
herding algorithm. The robotic UAV interacts with the flock
by positioning itself sequentially at a periodically refreshed set
of
m
points. It relies on the inherent stability of the flocking
dynamics to prevent fragmentation of the flock, and the
m
points
are chosen to maximise the deflection of the flock’s flight path.
We demonstrate that the algorithm also leads to a reduction in
the physical space occupied by the flock, measured in terms of
its radius. Importantly, the technique works effectively with a
single robotic UAV, and can be generalized readily for multiple
UAVs.
An important contribution of the paper is the series of ex-
periments performed on live birds in order to identify some
of the parameters of the flocking dynamic model and identify
the nature of the evasive action taken by birds in response to
a robotic pursuer. These are important steps in validating the
design premise of the
m
-waypoint herding algorithm. The herd-
ing algorithm is demonstrated through simulations on a flocking
model similar to that estimated from the experiments.
The problem addressed in the paper is similar to [36]. A ma-
jor difference, though, is a combination of the rigorous analysis
accompanying the algorithm and the experimental demonstra-
tion on live birds. Another difference is the non-zero minimum
speed of the flock, which is a consequence of the birds needing
a certain minimum speed to stay aloft.
We use a standard flocking model, similar to Reynolds [9],
[17], augmented with evasion laws similar to [28], [29]. It is
assumed that the pursuer has access to real-time data about the
flock, such as that provided by avian radars [41].
C. Organization
The paper is organized as follows. In Section II, we present
the problem formulation. Conditions for exponential stability of
flocks are derived in Section III. The pursuer–flock interaction is
studied analytically in Section IV, and the
m
-waypoint herding
algorithm is presented in Section V. The performance of the
algorithm is analyzed rigorously in Section VI. Experiments
conducted on live flocks are reported in Section VII, while
numerical simulations are described in Section VIII.
II. P
ROBLEM
F
ORMULATION
A. Preliminaries
Consider a flock of
n
(usually

1
) birds. We denote the
position and the velocity of the
i
th bird by
x
i
R
3
and
v
i
R
3
,
respectively. The vector between the
i
th and
j
th birds is denoted
by
r
ij
=
x
j
x
i
. We use the subscript “p” for the pursuer, so
that
x
p
denotes its position vector, and
r
pi
=
x
i
x
p
is the
vector from the pursuer to the
i
th bird. Given a vector
r
,we
denote unit vector along
r
by
ˆ
r
.
Let
R
com
denote the communication range for the interaction
between two birds. The neighborhood of the
i
th bird is defined
using the standard Euclidean distance as
N
i
=
{
j
n
:
|
x
i
x
j
≤
R
com
}
(1)
and it is assumed that two birds interact only if their distance is
less than or equal to
R
com
.Thesetofbirds(
V
), thus, forms a
graph
G
=(
V
,
E
)
where
V
=
{
1
,
2
,..., n
}
E
=
{
(
i, j
)
∈V×V|
j
∈J
i
⊆N
i
}
,
card
(
E
)=
p.
(2)
Note that if
J
i
=
N
i
for all
i
, the graph is undirected. Otherwise,
it is directed. The incidence matrix of the graph is denoted as
PARANJAPE
et al.
: ROBOTIC HERDING OF A FLOCK OF BIRDS USING AN UNMANNED AERIAL VEHICLE
3
Fig. 2. Important distance variables in the flocking model. Green dashed lines
are distances related to neighboring birds and red dash-dot lines are distances
related to the pursuer. Note that
R
com
and
R
fear
are unrelated.
R
agg
is smaller
than
R
fear
.
B
c
R
n
×
p
. Recall that the
(
i, j
)
th entry of
B
c
is 1 if the
j
th
edge is incoming at
i
,
1
if outgoing at
i
, and 0 otherwise.
An undirected edge is treated as two separate directed edges in
this formulation of
B
c
. We denote by
Δ(
ν
)
the diagonal matrix
formed by the elements of the tuple
ν
. Finally, we define the
centroid and the radius of the flock as follows:
x
cg
=
1
n
n

i
=1
x
i
,R
F

max
i

x
i
x
cg

.
(3)
B. Flock Dynamics
The dynamics of an individual (
i
th) bird are described
by a nonlinear, second-order differential equation based on
Reynolds’ rules [9] and augmented with an evasive response
̇
x
i
=
v
i
̇
v
i
=
k
s

j
∈J
i

1
R
3
safe

r
ij

3

r
ij
+
k
a

j
∈J
i
(
v
j
v
i
)
+
k
g
(
v
d
v
i
)+
k
p
H
(
r
pi
)
(4)
where
R
safe
denotes the steady-state distance between two adja-
cent members of the flock;
v
d
denotes the preselected, steady ve-
locity of each member of the flock; and
H
(
r
pi
)=
H
(
x
i
x
p
)
denotes the evasive response to the pursuer. We assume that
v
d
lies in the horizontal plane.
Fig. 2 summarizes the important distance variables that ap-
pear in the model. The terms
R
safe
and
R
com
have been defined
already. The terms
R
fear
and
R
agg
(
<R
fear
) refer to critical dis-
tances in the bird–pursuer interaction, and we assume that both
of these quantities are known for a given flock. The flock re-
sponds to a pursuer only when the pursuer is within a radius
R
fear
of a member of the flock. Within
R
fear
, the evasive behav-
ior takes two different forms.
1) If the pursuer is within
[
R
agg
,R
fear
]
, the bird tries to ac-
celerate radially away from the pursuer.
2) If the pursuer is within
R
agg
, the bird tries to out-maneuver
the pursuer by turning and/or climbing rapidly.
Fig. 3. Example showing the two loci of candidate target points, and the
chosen target point
x
div
. Being vertical lines, the loci appear as points in this
top view.
The behavior detailed above was observed in experiments
with live birds, which are described in Section VII. Since the
out-turning or 3-D behavior can have adverse implications for
the stability of the flock, we treat
R
agg
as a lower bound for
the permissible distance between the pursuer and the flock. We
model
H
(
·
)
as follows:
H
(
r
pi
)=

r
pi

r
pi

3
,
if

r
pi

<R
fear
and
r

pi
̇
r
pi
<
0
0
otherwise
(5)
and we impose the restriction that

r
pi
≥
R
agg
+

for all
i
,
where
>
0
is an arbitrarily chosen constant.
C. Herding Objectives
The spatial volume that needs to be kept free of birds is
referred to, hereafter, as the protected zone (PZ). We assume that
PZ is cylindrical with radius
R
PZ
. We assume that the birds fly
along a constant, preselected heading,
ˆ
v
d
, when not disturbed by
a pursuer. This is true, for instance, for flocks flying to migration
grounds considerably far from PZ. It is clear that the pursuer
only needs to move the flock to a point from which its flight
path (along
ˆ
v
d
) would no longer cross PZ. We denote this target
point as
x
div
(
t
)
, noting that its exact position may change with
time as described presently.
We define the global coordinate frame with its origin placed
at the centre of PZ, and its axes pointing north, east, and up,
respectively. Let
h
(
t
)
denote the instantaneous altitude of the
flock. We start by constructing two vertical lines (in the global
frame), which serve as loci for all possible target points. Recall
that
v
d
in (4) is the predetermined nominal flock velocity, which
satisfies
ˆ
k

v
d
=0
where
ˆ
k
is the unit vector pointing upwards
in the global frame. We define the unit vector
ˆ
v
d
, which satisfies
v

d
ˆ
v
d
=
ˆ
k

ˆ
v
d
=0
. The two candidate loci are then given by
̄
l
cand
,
±
(
a
)=
±
(
R
PZ
+
s
)
ˆ
v
d
+
a
ˆ
k
where
a
R
, and
s>R
F
is a suitably chosen constant. We denote
R
div

R
PZ
+
s
.Of
these candidate loci, we select the one closest to
x
cg
at
t
=0
(the moment at which the herding commences), as illustrated in
Fig. 3. Finally, at each
t
, we set the instantaneous target waypoint
on the chosen locus as
x
div
=(+
/
)
R
div
ˆ
v
d
+
h
(
t
)
ˆ
k
.Ifthetwo
loci are equidistant from
x
cg
, then any of the two loci can be
chosen. However, this choice persists for the remainder of the
herding operation. This selection of herding target points is a
4
IEEE TRANSACTIONS ON ROBOTICS
logical extension from 2-D to 3-D when the herding algorithm
does not seek to control the altitude of the flock.
The objective of the herding algorithm is to prescribe a trajec-
tory
x
p
(
t
)
for the pursuer, which enables it to do the following
functions.
1) Move the center of gravity (CG) of the flock to
x
div
in
finite time.
2) Avoid fragmentation of the flock.
3) Keep the flock outside the PZ during the course of herding.
III. S
TABILITY
A
NALYSIS OF THE
F
LOCK
In this section, we determine the conditions for exponential
stability of the flocking dynamics. These conditions can be used
to select the gains and the underlying graph in (4) for analyti-
cal investigation when sufficient empirical data is not available
to determine these parameters. The resulting robustness of the
flock implies that the pursuer is free to approach the flock
from
any direction
. As long as it maintains a certain minimum dis-
tance between itself and the flock (see Section IV), the flock
will not undergo fragmentation.
A. Snapshot Dynamics, Steady States, and Linearization
We define two column vectors
x
,
v
R
3
n
, formed by per-
muting the components of
x
i
and
v
i
, respectively,
i
x
=[
x
11
,...,
x
n
1
,
x
12
,...,
x
n
2
,
x
13
,...,
x
n
3
]

and
v
is constructed in a similar manner. There exists a permu-
tation matrix, denoted by
P
3
n
R
3
n
×
3
n
, such that
x
=
P
3
n
x
1
x
2
.
.
.
x
n
,
x
1
x
2
.
.
.
x
n
=
P
1
3
n
x
.
Ignoring the pursuer-dependent terms, the flocking dynamics
(4) can be written as
̇
x
=
v
̇
v
=
k
a
I
3
D
c
B

c
v
+
k
g
(
v
d
1
n
v
)
k
s
I
3
D
c
Q
(
x
)
B

c
x
(6)
where
D
c
(
i, j
)=
1
if the
j
th edge is incoming at
i
, and
D
c
(
i, j
)=0
otherwise. Here,
I
3
the
3
×
3
identity matrix, while
denotes the Kronecker product. We can replace
D
c
with
B
c
/
2
if the graph is undirected. The matrix
Q
(
x
)
R
p
×
p
is a diagonal
matrix satisfying
Q
(
j, j
)=1
R
3
safe
/

e
j

3
.
In order to analyze the stability of the flock, we will make a
change of coordinates:
̃
x
i
(
t
)=
x
i
(
t
)
v
d
t,
̃
v
i
(
t
)=
v
i
(
t
)
v
d
. Since
Q
(
x
)=
Q
(
̃
x
)
, we write the flocking dynamics as
follows:
̇
̃
x
=
̃
v
̇
̃
v
=
k
s
I
3
D
c
Q
(
̃
x
)
B

c
̃
x
k
a
I
3
D
c
B

c
̃
v
k
g
̃
v
.
(7)
This is a nonlinear, autonomous system whose equilibrium so-
lutions are given by
[
̃
x
0
,
1
n
0
3
]
, where
̃
x
0
satisfies
(
I
3
D
c
Q
(
̃
x
0
)
B

c
)
̃
x
0
=0
. Given an equilibrium configuration
̃
x
0
,
we define the family of equilibrium solutions obtained by rigid-
body translation and rotation of the flock by
S
̃
x
0
=

̃
x
|
̃
x
=
b
1
n
+
αP
3
n
(
I
n
J
)
P
1
3
n
̃
x
0

(8)
where
b
R
3
,
J
so
(3)
, and
α
R
.
Let
δ
·
denotes a small perturbation in the corresponding vari-
able, and
e
0
i
is the steady-state
i
th edge vector. Then, the lin-
earization of (7) about an equilibrium point is given by
δ
̇
x
=
δ
v
δ
̇
v
=
3
R
2

I
3
D
c
Δ

e
0

1
δ
e
1
, ...,
e
0

p
δ
e
p

B

c

̃
x
0
k
a
I
3
D
c
B

c
+
k
g
I
3
n
δ
v
.
These equations can be written compactly as
[
δ
̇
x
δ
̇
v
]=
G
[
δ
x
δ
v
]
,
where the Jacobian
G
is given by
G
=

0
3
n
I
3
n
k
s
A
B

(9)
and
B
=
k
a
I
3
D
c
B

c
+
k
g
I
3
n
x
=
3
R
2

I
3
D
c
Δ

e
0

1
δ
e
1
, ...,
e
0

p
δ
e
p

B

c

̃
x
0
.
(10)
B. Spectral Properties of
A
and
G
Lemma 1:
The null space of
A
defined in (10) is a superset
of eigenvectors, which correspond to a rigid body translation
and rotation of the flock; i.e.,
N
(
A
)
⊇N
u

span
[1
,
0
,
0]

1
n
,
[0
,
1
,
0]

1
n
,
[0
,
0
,
1]

1
n
,P
3
n
(
I
n
J
1
)
P
1
3
n
̃
x
0
,P
3
n
(
I
n
J
2
)
P
1
3
n
̃
x
0
,
P
3
n
(
I
n
J
3
)
P
1
3
n
̃
x
0
where
J
1
,J
2
,J
3
form a basis for
so
(3).
Proof:
It is evident from (10) that
N
(
A
)
is a su-
perset of the vectors
δ
x
, which satisfy
(
I
n
B

c
)
δ
x
=
0
or
e
0

i
δ
e
i
=0
i
=
{
1
,...,p
}
. The former condition
implies that
δ
x
=
k
1
[1
,
0
,
0]

1
n
+
k
2
[0
,
1
,
0]

1
n
+
k
3
[0
,
0
,
1]

1
n
, where
k
1
,
k
2
, and
k
3
are arbitrary constants.
The latter condition is satisfied by
δ
x
i
=

3
j
=1
k
j
J
j
x
i
for all
constants
k
j
.

Assumption 1:
The matrix
A
has exactly six eigenvalues,
which are equal to 0. Therefore,
N
u
(
A
)=
N
(
A
)
.
Assumption 1 is satisfied by connected undirected graphs [27]
and by strongly connected and balanced digraphs [16].
Assumption 2:
The Jacobian
G
has the following properties.
1) All eigenvalues of
G
have nonpositive real parts.
2) The algebraic and geometric multipicities of the zero
eigenvalue are equal to each other.
3) The null space
N
(
G
)=[
n

,
0
1
×
3
n
]

, where
n
N
(
A
)=
N
u
(
A
)
.
The reader should note that Assumption 2 always holds for
an undirected graph satisfying Assumption 1 [27].
PARANJAPE
et al.
: ROBOTIC HERDING OF A FLOCK OF BIRDS USING AN UNMANNED AERIAL VEHICLE
5
C. Stability Analysis
In this section, we use the center manifold theorem [42, Th. 1]
to show that trajectories which start away from
S
(
̃
x
0
)
,atleast
locally, converge to
S
(
̃
x
0
)
at an exponential rate. The proof
proceeds in two steps. First, we show that there exists a center
manifold when Assumption 2 is satisfied. We note that the set
S
(
̃
x
0
)
is also a center manifold. In the second step, we use the
property that center manifolds are arbitrarily close to each other
to complete the proof.
Lemma 2:
Suppose that the flocking dynamics satisfy
Assumption 2. Then, for every steady state
̃
x
0
, there exists an in-
variant manifold
E
c

E
c
(
̃
x
0
)
, such that any trajectory starting
around
E
c
converges at an exponential rate to
E
c
.
Proof:
From Assumption 2, we know that the Jacobian
G
,
evaluated at
̃
x
0
, has six zero eigenvalues and the other eigen-
values are negative. Thus, it follows from the center manifold
theorem [42, Th. 1] that there exists a 6-D center manifold
E
c
such that trajectories starting outside
E
c
converge at an expo-
nential rate to
E
c
.

Theorem 1:
The set
S
(
̃
x
0
)
is exponentially stable.
Proof:
We note that
S
(
̃
x
0
)
is itself a center manifold of the
dynamics. From Lemma 2, we know that trajectories starting
in a neighborhood of
x
0
converge at an exponential rate to the
center manifold
E
c
(
̃
x
0
)
. We recall that
any
two center manifolds
about an equilibrium point
̃
x
0
differ by transcendentally small
terms, and every equilibrium point in the vicinity of
̃
x
0
lies on
every
center manifold
E
c
(
̃
x
0
)
[42, Sec. 4.6]. Thus, a trajectory
starting in a neighborhood of
̃
x
0
converges exponentially fast
to
S
(
̃
x
0
)
.

The discussion above shows that
S
(
̃
x
0
)
is exponentially sta-
ble, and therefore, robust to small perturbations. In the context
of herding, this implies that, for every direction in relation to
the flock (or its center), there exists a nontrivial set of pursuer
positions for which the underlying graph of the flock is pre-
served. In the next section, we present analytical formulae for
estimating a set of permissible pursuer positions based purely
on local topological considerations.
In addition to stability, for the purpose of herding, it is use-
ful to have the property of time-scale separation between the
synchronization of the flocking dynamics to
S
(
̃
x
0
)
on the one
hand, and the translational dynamics of the center of gravity of
the flock (whose time constant, as shown in Section V, is
1
/k
g
)
on the other [21], [22]. This can be achieved by a suitable choice
of
k
s
and
k
a
for a given graph topology.
IV. A
NALYTICAL
E
STIMATION OF THE
P
ERMISSIBLE
S
ET OF
P
URSUER
P
OSITIONS
The objective of this section is to derive approximations for
the approach distance between a pursuer and the flock, based
purely on the local interaction between the pursuer and the birds
in a flock. This estimate supersedes the distance
R
agg
in Fig. 2
from the point of view of preserving the local topology of the
flock, and is used in Section V to determine the feasible positions
for the pursuer in relation to the flock.
The influence exerted by the pursuer can cause one of the
two effects in extreme circumstances. In one case, the pursuer
Fig. 4. Typical subgraph in a dense flock, and a subgraph with two birds
collinear with the pursuer. Note
cR
safe
<R
safe
. (a) Dense flock. (b) Local
neighborhood.
Fig. 5. Model with a single edge and the pursuer. The pursuer approaches
along the perpendicular bisector of the edge and
r
p
1
=
r
p
2
. (a) Sparse flock.
(b) Local neighborhood.
can push a bird to within an unacceptable distance of its neigh-
bor. This scenario is likely in dense flocks, as shown in Fig. 4.
In the second case, the pursuer can cause the link between two
neighbors to be broken by pushing them beyond their communi-
cation distance
R
com
. This scenario, illustrated in Fig. 5, is more
plausible in sparse flocks. We write the minimum permissible
distance between two birds as
cR
safe
, where
c<
1
is a constant
that depends on the species of birds and the pursuing UAV.
A. Maintaining Minimum Allowable Distance Between
Neighbors
Consider the situation wherein a bird on the boundary of the
flock (labeled “1”) is engaged by the pursuer. The bird tries to
move away radially from the pursuer, and into the flock. In the
worst case, the bird’s evasive path points in the direction of a
neighboring bird (“2”) and there is force from other neighboring
birds pulling 1 away from 2. This is depicted in Fig. 4.
A conservative estimate for the minimum approach distance
between the pursuer and the bird 1 is found from Fig. 4(b). This is
a repelling, “outward-pointing” (with respect to the flock) force
on 1 due to 2 is countered by the inward-pointing force on 1
6
IEEE TRANSACTIONS ON ROBOTICS
arising as a consequence of repulsion by the pursuer. Balancing
these two forces when the distance between 1 and 2 is
cR
safe
(thereby, ensuring that the minimum approach distance is no
less than
R
safe
) gives the minimum approach distance

r
p
1

min
k
p

r
p
1

2
min
=
k
s




cR
safe

1
R
3
safe
(
cR
safe
)
3





⇒
r
p
1

min
=

c
2
k
p
(1
c
3
)
k
s
R
safe
.
(11)
B. Preserving Communication Between Neighboring Birds
In sparse flocks, it is a commonplace to find a linear topology,
involving two or three agents forming an angle or a straight
line with no other common neighbors. Consider a single edge,
as shown in Fig. 5, involving just two birds, and assume that
the pursuer approaches along the perpendicular bisector of the
edge. If
R
com
is the maximum permissible distance between two
boundary agents for the underlying graph to be preserved, we
get the following condition for the minimum permissible

r
p
1

k
p

r
p
1

2
×
R
com
2

r
p
1

=
k
s

1
R
3
safe
R
3
com

R
com
⇒
r
p
1

min
=
k
p
2
k
s

1
R
3
safe
R
3
com

1
/
3
.
(12)
We will provide a numerical example for

r
p
1

min
in
Section VIII. In Section V, the estimates for

r
p
1

min
are used
as part of the motion planning strategy for the pursuer.
Definition 1:
We define a set
X
p
of permissible pursuer po-
sitions in relation to the flock
X
p
=

x
p
|
R
min
min
i
∈V

x
p
x
i
≤
R
fear

(13)
where
R
min
is the maximum of
R
agg
and either (11) or (12)
depending on the topology of the flock.
V.
m
-W
AYPOINT
H
ERDING
A
LGORITHM
In Sections III and IV, we established conditions for stability
and robustness of the flock, and derived approximations for the
approach distance between the flock and the pursuer. In this sec-
tion, we solve the problem of herding, described in Section II-C,
by modeling the ensemble behavior of the flock. We first de-
rive a set of objectives that the pursuer’s trajectory,
x
p
(
t
)
,must
satisfy in order to herd the flock successfully. The
m
-waypoint
algorithm is obtained as an approximate, but efficient, solution
to the problem of ensuring that
x
p
(
t
)
meets these objectives.
A. Formulation of the Herding Problem
The coordinates of the flock’s centroid and its velocity are
given by
x
cg
=
1
n

n
i
=1
x
i
,
v
cg
=
1
n

n
i
=1
v
i
. Using (4) and
(5), we get
̇
x
cg
=
v
cg
̇
v
cg
=
k
g
(
v
d
v
cg
)+
F
p
(
x
p
)+
f
(
x
,
v
)
F
p
(
x
p
)

k
p
n

i
∈N
p
H
(
r
pi
)
̇
x
p
=
u
p
(14)
where
N
p
denotes the subset of the flock that lies within
R
fear
of
the pursuer; the pursuer’s velocity,
u
p
, is a control variable for
the herding algorithm. The term
f
(
x
,
v
)
is zero when the graph
is undirected (since
1

n
B
c
=0
) or if it has synchronized to a
steady state configuration from Section III. This would occur
naturally when the flock synchronizes on a faster time scale than
the dynamics of its CG [21], [22]. Since we need the flock to
point in the direction of the herding target point, it suffices to
ensure that its velocity normal to an axis pointing towards
x
div
is driven to zero. We define
r
dc
(
t
)

x
div
(
t
)
x
cg
(
t
)
,
q

r
dc
×
v
cg
.
(15)
Recall, from Section II-C, that
ˆ
k

x
div
(
t
)=
ˆ
k

x
cg
(
t
)=
h
(
t
)
(the altitude of the flock). Since
x
div
(
t
)
lies on a fixed ver-
tical line for all
t
,wealsohavethat
ˆ
k
×
̇
x
div
(
t
)=0
. Since
̇
r
dc
(
t
)=
̇
x
div
(
t
)
v
cg
(
t
)
, we get the following expression for
the dynamics of
q
:
̇
q
=
r
dc
×
̇
v
cg
+
̇
x
div
×
v
cg
=
k
g
q
+
k
g
(
r
dc
×
v
d
)+
r
dc
×
F
p
(
x
p
)+
r
dc
×
f
(
x
,
v
)
+
̇
x
div
×
v
cg
.
Next, we define
q
k

ˆ
k

q
. Note that
ˆ
k

(
̇
x
div
×
v
cg
)=
v

cg
(
ˆ
k
×
̇
x
div
)=0
. Thus, the dynamics of
q
k
are given by
̇
q
k
+
k
g
q
k
=
ˆ
k

(
r
dc
×
(
k
g
v
d
+
f
(
x
,
v
)) +
r
dc
×
F
p
(
x
p
))
.
(16)
We denote the amount of deviation that can be produced by
placing the pursuer at
x
p
using the right hand-side of (16):
ρ
(
x
p
)

ˆ
k

(
r
dc
×
(
k
g
v
d
+
f
(
x
,
v
)) +
r
dc
×
F
p
(
x
p
))
(17)
If
ρ
(
x
p
)=0
for all
t
, we deduce from (16) that
q
k
0
and the
CG of the flock moves in a straight line (solid line in Fig. 6)
towards
x
div
(from the definition of
q
k
). We also note that the
distance and the time required for herding could be reduced, as
compared to moving the flock along the solid line, by pushing
it rapidly towards the dashed line passing through
x
div
in Fig. 6.
The dashed line is parallel to
v
d
, and once the flock’s CG reaches
it, the herding algorithm can safely terminate. This requires that
q
k
0
uniformly (or
q
k
0
uniformly, depending on the choice
of
x
div
) during the course of herding. Without loss of generality,
we assume that
x
div
is chosen, such that sign
(
ˆ
k

(
v
d
×
r
dc
))
>
0
while commencing herding and set the control objective to max-
imizing
ρ
(
x
p
)
0
while sign
(
ˆ
k

(
v
d
×
r
dc
))
>
0
(see Fig. 6).
PARANJAPE
et al.
: ROBOTIC HERDING OF A FLOCK OF BIRDS USING AN UNMANNED AERIAL VEHICLE
7
Fig. 6. Two canonical scenarios, with different signs of
q
k
, that correspond to
the flock reaching the dashed line faster than by moving along the solid line to
x
div
(which corresponds to
q
k
=0
). Once on the dashed line, which is parallel
to
v
d
, the flock is guaranteed to stay outside PZ. (a)
q
k
>
0
,(b)
q
k
<
0
.
B. Determination of
m
Waypoints
An ideal solution to the aforementioned control problem is
to compute the trajectory of
x
p
(
t
)
which maximizes
ρ
(
x
p
)
, and
get the pursuer to track it. It is well known that a flock tends to
deform into a concave shape locally under persistent pressure
from a pursuer, which is known to dent the effectiveness of
the pursuit [29]. Furthermore, over stressing one or more birds
continuously over an extended period of time carries the risk
of the distressed birds attempting aggressive evasive maneuvers
and fragmenting the flock. To avoid these problems, we use
a sub optimal approach wherein the flock is engaged through
different waypoints in a given time frame.
The waypoints are chosen by sampling the set
X
p
from
Definition 1. Sampling is preferred to statically defined way-
points because it allows the algorithm to be agnostic to the
exact geometry of the flock. This is useful when the flock is
not necessarily best represented as a convex shape, for instance,
star-shaped flocks and flocks with a curvilinear geometry. We
formally identify the set of
m
waypoints as follows.
Definition 2:
The set
X
m
p
is defined by construction. The
waypoint selection algorithm, described in Algorithm 2, sam-
ples
X
p
uniformly. Next, up to
m
waypoints with the highest
deviation are identified such that no two waypoints are within a
prescribed distance, denoted
δ
w
, of each other. These waypoints
constitute the set
X
m
p
.
Fig. 7 shows an example of the set
X
m
p
for an arbitrarily
chosen flock and deterministically chosen sample points. It il-
lustrates that even for a convex shaped flock, the set
X
m
p
need
not be connected. This is one of the reasons why we use random
sampling to construct it.
C. Motion Planning for the Pursuer
The motion planner solves for the pursuer’s velocity
u
p
(
t
)
by commanding one of two motions, as follows.
1)
FLY
: the pursuer takes the fastest path to the commanded
node. Collision avoidance is achieved using artificial po-
tential fields, an alternative to which is the real time, online
motion planner based on [43].
2)
ENGAGE
: using a virtual leader-based approach, the pur-
suer commands
u
p
(
t
)
to maintain its position at the chosen
Fig. 7. For an example scenario where the force is to be applied along the
+
y
direction, the candidate waypoints in
X
p
, defined in (13), are grouped into two
categories. Points marked in green circles satisfy
ρ
(
x
p
)
>
0
and contain the
set
X
m
p
(see Definition 2). Points marked by red
×
do not satisfy
ρ
(
x
p
)
>
0
.
Here, blue and black triangles denote birds in the interior of the flock and its
convex hull, respectively.
Algorithm 1:
m
-Waypoint Herding Algorithm.
1: Input: t;
τ
e
;small

1
,
2
>
0
; locus of
x
div
2: updateWaypoinstSet
=
TRUE
3:
while

x
cg
x
div

>
1
OR sign
(
ˆ
k

(
v
d
×
r
dc
))
>

2
do
4:
if
updateWaypointSet
=
TRUE
then
5:
X
m
p
=
CALL(Algorithm 2)
{
Waypoint selection
}
6:
t
last
=
t
; updateWaypointSet
=
FALSE; node
=
1
7:
end if
8:
while
updateWaypointSet
=
FALSE
do
9:
if

x
p
(
t
)
−X
m
p
(
node
)
≥

then
10:
u
p
(
t
)=
FLY
(
X
m
p
(
node
)
)
11:
else
12:
u
p
(
t
)=
ENGAGE
(
X
m
p
(
node
);
τ
e
)
13:
end if
14:
if
node
=
card
(
X
m
p
)
OR
t
t
last
>t
samp, max
then
15:
updateWaypointSet
=
TRUE
16:
end if
17:
node
=
node + 1
18:
end while
19:
end while
waypoint in relation to the flock’s centroid for a predeter-
mined duration
τ
e
. The engagement is terminated if the
distance between two neighboring birds in
N
p
approaches
the communication radius,
R
com
.
VI. A
NALYSIS OF THE
H
ERDING
A
LGORITHM
In this section, we derive a condition for successful herding,
in the form of the minimum allowable distance from the PZ
at which the herding must begin. If the herding commences
beyond this distance, it will almost surely succeed. We assume
that
f
(
x
,
v
)=0
, i.e., the underlying graph is undirected or the
flock has synchronized to a steady state.
We start by ignoring the dynamics of the pursuer, and recall
that the control objective is to maximize
ρ
(
x
p
)
0
. We consider
the conservative case
ρ
(
x
p
)=0
for all
t
during the course of
8
IEEE TRANSACTIONS ON ROBOTICS
Fig. 8. One half of the cone outside which the herding must start; the other
half is the mirror image of the shown half.
Algorithm 2:
Selection of
m
Waypoints.
1:
Input
:
X
p
,
ˆ
r
,
v
d
,
Δ
t
s
; MaxSampleNumber
2:
Output
:
X
m
p
{
set of waypoints
}
3: INITIALIZE:
X
m
p
=
{}
,
Γ
p
=
{}
, counter
=0
4:
while
counter
<
MaxSampleNumber
do
5:
x
=
U
s
(
X
p
)
{
Uniform sample in
X
p
}
6:
if
ρ
(
x
)
>
0
AND

x
−X
m
p

w
then
7:
X
m
p
←{X
m
p
,
x
}
8:
Γ
p
←{
Γ
p
(
x
)
}
9:
end if
10:
counter
=
counter + 1
11:
end while
12: (
X
m
p
,
Γ
p
)
SORT
(
X
m
p
p
)
{
Descending order
of
ρ
(
·
)
}
13:
if
card
(
X
m
p
)
>m
then
14:
X
m
p
←X
m
p
(1 :
m
)
15:
end if
herding. This case is limiting in that the distance at which the
herding needs to be commenced can be lesser when larger values
of
ρ
(
x
p
)
are attainable (see Section V-A).
In order to achieve
ρ
(
x
p
)=0
,weset
x
p
=
x
p
where
F
p
(
x
p
)=
k
g
(
ˆ
k

(
ˆ
r
dc
×
v
d
))(
ˆ
k
×
ˆ
r
dc
)
. Since
ˆ
r
dc
=
r
dc
/

r
dc

, and
v
d
lie in the horizontal plane, it follows that

F
p

=
k
g

ˆ
r
dc
×
v
d

.Let
ρ
F
denote the upper bound on

F
p

,
which is known from the analysis in Section IV. It is clear
then that the flock should be made to satisfy

ˆ
r
dc
×
v
d

<
ρ
F
/k
g
t
, which, in turn, means that the flock must be kept
outside the cone shown in Fig. 8. This is an important insight:
it shows that the herding is successful only if it begins when
the horizontal distance between the center of the flock and the
center of PZ is greater than or equal to
D
p,
min

R
div
tan
θ
max
max
=sin
1

ρ
F
k
g

v
d


(18)
where
R
div
was defined in Section II-C.
While the solution
x
p
appears to solve the problem in prin-
ciple, there is the possibility that the trajectory
x
p
may not be
feasible. Furthermore, the motion planning algorithm adopted
here requires that the pursuer engage with an entire “front” of the
flock rather than specific individual birds. In particular, it means
that the engagement between the pursuer and the flock takes
Fig. 9. Vector diagram showing
v

d
and
θ
for push (a) from the aft and (b)
from the front, respectively.
Fig. 10. Refining the estimate of
D
p,
min
assuming a bimodal herding model.
The solid blue segments denote the motion of the flock when the pursuer engages
it actively; the dashed red segments denote the worst-case motion in the absence
of any pursuer engagement.
place in pulses. We refine the necessary condition to account for
this pulsed interaction.
Let
τ
e
denote the duration of any given engagement between
the pursuer and the flock, and let
τ
f
denote the time taken by
the bird to fly between two waypoints. During the time
τ
f
,the
flock receives no external stimulus and its velocity tends to
align to
v
d
. Assuming that an engagement begins at time
t
0
,the
dynamics of the flock in the time interval
[
t
0
,t
0
+
τ
e
+
τ
f
]
can
be described via the switching dynamics
̇
v
cg
+
k
g
v
cg
=

k
g
v

d
,t
[
t
0
,t
0
+
τ
e
)
k
g
v
d
,t
[
t
0
+
τ
e
,t
0
+
τ
e
+
τ
f
]
(19)
where
v

d
=
v
d
+
F
p
/k
g
(see Fig. 9). When
x
p
=
x
p
,
v

d
is
along
r
dc
at every instant in time, which is why the superscript
||
is used here. We will assume that the flock switches instanta-
neously between two states. During the engagement phase, the
flock moves at an angle
θ
to the original direction coinciding
with
v
d
. When the pursuer does not engage the flock, it moves
along
v
d
. This is depicted in Fig. 10.
The terms

v

d

and
θ
should ideally be estimated empirically,
as in Section VII-A, since the precise interaction between the
flock and the pursuer is highly case-specific. The magnitude of
v

d
depends on whether the flock is driven from the front or from
the rear. Since we intend for the net motion to be perpendicular
to
v
d
, it is reasonable to assume that the average force also acts
perpendicular to
v
d
. Thus, we get



v

d



=


v
d

2
+

F
p

2
k
2
g
=cos
1


v
d

/


v

d



.
We now state the main result of this section.
PARANJAPE
et al.
: ROBOTIC HERDING OF A FLOCK OF BIRDS USING AN UNMANNED AERIAL VEHICLE
9
Theorem 2:
Given the approximate values of

v

d

and
θ
,the
refined value of
D
p,
min
is given by
D
p,
min
=
R
div
cot
θ

1+
τ
f
τ
e

.
(20)
Proof:
Let
n
s
denote the number of engagement pulses.
From Fig. 10, it is apparent that we can have at most
n
s
pulses wherein the flock is not engaged with the pursuer. During
each engagement pulse, referring to the geometric convention of
Fig. 10, the flock shifts through a distance

v

d

τ
e
sin
θ
. Thus,
n
s
=
R
div


v

d


τ
e
sin
θ
.
Furthermore, during each engagement phase, the flock translates
horizontally through a distance

v

d

τ
e
cos
θ
. During the nonen-
gagement phase, the horizontal translation is at most

v
d

τ
f
.
Thus, the minimum horizontal translation is given by
D
p,
min
=
n
s
(

v
d

τ
f
+


v

d


τ
e
cos
θ
)
=
R
div


v
d



v

d


τ
f
τ
e
1
sin
θ
+cot
θ

.
Setting
cos
θ
=

v
d

/

v

d

yields
D
p,
min
=
R
div
cot
θ
(1 +
τ
f
τ
e
)
. Notice that we recover (18) if we set
τ
f
=0
and
θ
=
θ
max
.
This completes the proof.

Remark 1:
We note two extreme cases that give further in-
sight on the variation of
D
p,
min
with the size of the flock. When
n
is small, it is reasonable to expect that the pursuer simulta-
neously affects all members of the flock. In such cases,
θ
, and
subsequently,
D
p,
min
are independent of
n
(the size of the flock).
When
n
is large, it is reasonable to assume that the pursuer en-
gages a
fixed
number of boundary agents, and this number is
also independent of
n
. Furthermore, we expect that
θ
is small,
so that
cot
θ
1
, and
θ
≈
F
p

/
(
k
g

v
d

)
. Since the num-
ber of birds engaged by the pursuer is a constant,

F
p
∝
k
f
/n
,
where
k
f
is a constant. Assuming that
τ
f
e
is not a function of
n
, it follows that
D
p,
min
n
; i.e., the minimum distance grows
linearly with the flock size for large flocks.
Remark 2:
In [7], we considered several cases wherein the
total number of waypoints was fixed; for each case, a different
fraction of waypoints was used in a manner consistent with
this paper, while the rest were used for pushing the flock from
the rear. This is analogous, in the framework of this paper, to
changing the value of
m
. Therefore, we do not analyze the
effect of changing
m
in this sequel. We note, however, that
the choice of the number of waypoints depends on the inherent
cohesiveness of the flock. A larger number of waypoints may
be needed to ensure containment in a loosely bound flock.
In Section VII, we will demonstrate how (19) can be used to
extract a set of flocking model parameters from experimental
data. The model for the minimum distance will be revisited in
Section VIII (numerical simulations), with the objective of de-
riving an empirical relationship between the minimum distance
and the size of the flock.
VII. E
XPERIMENTS ON A
L
IVE
F
LOCK OF
B
IRDS
In this section, we describe the results of experiments carried
out on live birds in Daejeon, South Korea. The objective of
the experiments was to validate the flocking model described
earlier, and estimate the values of the parameters in the flocking
model. The experiments were carried out in two rounds on two
families of birds.
The experiments involved flying a quadrotor drone in the
vicinity of flocks. Two rounds of experiments were conducted
during two different seasons—the first involved egrets, while the
second involved loons. For this study, two drones were deployed:
One drone performed various types of maneuvers around the
flocks as a pursuer (herding drone), while a surveillance drone
hovered at a high altitude with a camera pointing directly down
to the ground for recording the trajectories of the pursuer drone
and the birds. Videos recorded during the experiments are avail-
able as part of the supplementary material, accompanying the
paper.
A. Experiments on Egrets
Egrets are migratory birds, and at the time of conducting
the experiments, they had settled in their nesting grounds in the
vicinity of the KAIST campus. The birds make frequent visits to
a hunting area nearby, and a large number of egrets are found
to return to their nests at sunset. During this time, we attempted
to fly the herding drone in various directions with respect to the
flock.
In Figs. 11 and 12, two cases are closely studied. In Fig. 11, the
drone approaches the flock horizontally at a sufficient distance.
Initially, the birds fly along the
x
direction and the drone
approaches from the left with about 30 m of clearance. As the
birds discover the drone, they divert from their original paths
and fly at a 45
angle to their right. Meanwhile, the drone moves
only a few meters, but drives the birds away from the PZ (left
of the drone). When the birds discover the drone at a sufficient
distance, they adjust their paths horizontally and make smaller
changes in the vertical direction. If the drone were able to fly
along the flock, it would be possible to herd the birds away from
the PZ without breaking the flock.
In Fig. 12, the drone approaches the flock from a shorter
distance at a higher speed. In this case, the birds continue to fly
to their destination without much horizontal deviation but with
large vertical deviation. As the birds discover the approaching
drone, they make sudden vertical adjustments to their paths:
they rapidly descend by making a very large bank angle with
strong flapping motions of their wings. Therefore, if the drone
approaches the flock suddenly, the objective of herding may not
be satisfied and the flock still continues to fly to the PZ.
From the observations made from Figs. 11 and 12, we can
identify the important distance variables shown in Fig. 2. From
Fig. 11,
R
fear
is more than 20 m, which corresponds to the dis-
tance at which the egrets make horizontal corrections of their
paths. From Fig. 12,
R
agg
is around 10 m or less. When the
birds discover the drone, they choose to make vertical path
corrections since they do not have sufficient time to make hor-
izontal corrections by banking. It is also evident from the early
10
IEEE TRANSACTIONS ON ROBOTICS
Fig. 11. Stills and data extracted from a video recording of an experiment on live birds. In this experiment, the drone approaches the flock of egrets at a
sufficient
distance to induce horizontal deviation. The video recording is available as a part of the supplementary material.
Fig. 12. Stills and data from a video recording of an experiment. The drone approaches the flock of egrets close enough to induce vertical deviation.
moments of Fig. 11 that
R
safe
is approximately equal to 10 m.
The distance between the birds reduces during the engagement
with the pursuer, and this behavior is also observed during the
simulations described in Section VIII.
The time histories of the position and the velocity of the CG
of the flock, corresponding to Fig. 11, are shown in Fig. 13. The
time histories of the velocity are estimated from the position
data using finite differencing, which explains their coarseness.
The velocity profile of the CG is as follows:
1) until approximately 2.5 s (pre-engagement):

v
cg
(1)

=
|
̇
x
|
=
9m/s;

v
cg
(2)

= ̇
y
=
2.5 m/s;
2) after 2.5 s (engagement):
|
̇
x
|
=
7.5 m/s;
̇
y
=
7.5 m/s.
It follows from this data that
v
d
=[
9
,
2
.
5
,
0]
. We recall the
dynamics of the velocity of the CG during the engagement