*2.2. Graph Theory*

A weighted digraph G = G(V, E, A) consists of a set of *N* vertices V = [*V*1, ..., *VN*] *<sup>T</sup>*, a set of directed edges E ⊆ V×V, and a weighted adjacency matrix <sup>A</sup> = [*aij*] <sup>∈</sup> <sup>R</sup>*N*×*N*, such that *aij* > 0 if the edge that connects vertex *i* to *j* belongs to the graph, and 0 otherwise. The set of in-neighbours of a vertex *<sup>i</sup>* is given by <sup>N</sup> *in <sup>i</sup>* = {*j* ∈ V : (*j*, *i*) ∈ E}, and the set of out-neighbours by <sup>N</sup> *out <sup>i</sup>* <sup>=</sup> {*<sup>j</sup>* ∈ V : (*i*, *<sup>j</sup>*) ∈ E}. The in- and out-degree matrices *<sup>D</sup>in* and *Dout* are a set of diagonal matrices defined by:

$$D^{\text{in/out}} = \text{diag}(d\_i^{\text{in/out}}), \text{with } d\_i^{\text{in}} = \sum\_{j \in \mathcal{N}\_i^{\text{in}}} a\_{ij} \text{ and } d\_i^{\text{out}} = \sum\_{j \in \mathcal{N}\_i^{\text{out}}} a\_{ji}. \tag{1}$$

A graph G is undirected if communication links are unidirectional. If G is an undirected graph, then <sup>G</sup> is also balanced, i.e., *<sup>D</sup>in* <sup>=</sup> *<sup>D</sup>out* :<sup>=</sup> *<sup>D</sup>*, and its Laplacian matrix *<sup>L</sup>* is symmetric, positive semi-definite, and defined according to *L* := (*D* − A). In these conditions, it is well known that *L* has a simple eigenvalue at zero associated with eigen vector **1**, with the remaining eigen values being positive. Moreover, *L***1** = **0**.

**Remark:** With the graph definition given above, we adopt the convention that an agent *<sup>i</sup>* can receive information from its neighbors in <sup>N</sup> *in <sup>i</sup>* and send information to its neighbors in <sup>N</sup> *out <sup>i</sup>* .

#### *2.3. Uniform B-Spline Curves*

A 2-D B-spline curve of degree *k* + 1 in R<sup>2</sup> is a piecewise polynomial function formed by several components of degree *k*, defined as:

$$\mathcal{C}(\gamma) = \sum\_{i=0}^{n} B\_{i,k}(\gamma) P\_{i\prime} \tag{2}$$

where <sup>P</sup> <sup>=</sup> {*Pi* <sup>∈</sup> <sup>R</sup>2, *<sup>i</sup>* <sup>=</sup> 0, ..., *<sup>n</sup>*} are a set of control points and *Bi*,*k*(*γ*) are the B-spline basis functions. It follows from the Cox–De Boor's recursive algorithm, according to L. Piegl and W. Tiller ([8], Chapter 2.2), that:

$$B\_{i,0}(\gamma) = \begin{cases} 1, \text{if } \gamma\_i \le \gamma \le \gamma\_{i+1} \\ 0, \text{otherwise} \end{cases},\tag{3}$$

$$B\_{i,j}(\gamma) = \frac{\gamma - \gamma\_i}{\gamma\_{i+j} - \gamma\_i} B\_{i,j-1}(\gamma) + \frac{\gamma\_{i+j+1} - \gamma}{\gamma\_{i+j+1} - \gamma\_{i+1}} B\_{i+1,j-1}(\gamma),\tag{4}$$

where the index *j* = 0, ..., *k* and the values *γ<sup>i</sup>* belong to the *m*-dimensional knot vector **<sup>U</sup>** <sup>=</sup> {*γi*}*<sup>m</sup> <sup>i</sup>*=0, with the number of knots related to the degree of the curve and the number of control points by *m* = *k* + 1 + *n*.

For the particular case of 2-D, uniform, non-clamped cubic B-splines with *n* − *k* + 1 segments, each segment's *x*- and *y*-coordinates of the parametric curve can be described according to the vectorial notation [17] as follows:

$$\mathbb{C}\_{i}(\gamma) := \begin{bmatrix} \mathbb{C}\_{i}^{x}(\gamma) & \mathbb{C}\_{i}^{y}(\gamma) \end{bmatrix}^{T}, \tag{5}$$

with *C<sup>x</sup> <sup>i</sup>* (*γ*) and *<sup>C</sup><sup>y</sup> <sup>i</sup>* (*γ*) computed according to:

$$\mathbb{C}\_{i}^{\chi/y}(\gamma) := \underbrace{\frac{1}{6} \begin{bmatrix} (\gamma - i)^3 & (\gamma - i)^2 & (\gamma - i) & 1 \end{bmatrix} \begin{bmatrix} -1 & 3 & -3 & 1 \\ 3 & -6 & 3 & 0 \\ -3 & 0 & 3 & 0 \\ 1 & 4 & 1 & 0 \end{bmatrix}}\_{\begin{bmatrix} B\_{i,3}(\gamma) & B\_{i+1,3}(\gamma) & B\_{i+2,3}(\gamma) \end{bmatrix} \begin{bmatrix} P\_i^{x/y} \\ P\_{i+1}^{x/y} \\ P\_{i+2}^{x/y} \\ P\_{i+3}^{x/y} \end{bmatrix}},\tag{6}$$

where *γ* ∈ [0, *n* − *k* + 1] and *i* := *γ*, such that *γ* − *i* ∈ [0, 1] and each curve segment is only defined by four distinct control points. Defining a unidimensional vector with all control points **P** = [*P<sup>x</sup>* <sup>0</sup> , ..., *<sup>P</sup><sup>x</sup> <sup>n</sup>* , *<sup>P</sup><sup>y</sup>* <sup>0</sup> , ..., *<sup>P</sup><sup>y</sup> n* ] *<sup>T</sup>* <sup>∈</sup> <sup>R</sup>2(*n*+1), where both *<sup>x</sup>*- and *<sup>y</sup>*-coordinates are concatenated, and a vector of distinct curve parameters *<sup>γ</sup>* = [*γ*0, ..., *<sup>γ</sup>q*] <sup>∈</sup> <sup>R</sup>*q*+<sup>1</sup> at which we wish to evaluate our curve, **<sup>C</sup>**(*γ*) <sup>∈</sup> <sup>R</sup>2(*q*+1) is given by:

$$\mathbf{C}(\gamma) = B(\gamma) \cdot \mathbf{P},\tag{7}$$

where *<sup>B</sup>*(*γ*) <sup>∈</sup> <sup>R</sup>2(*q*+1)×2(*n*+1) is a diagonal by blocks matrix, and for each line of *<sup>B</sup>*, only four basis functions are different then zero and computed according to (6).

#### **3. Vehicle Modelling**

Let {*U*} denote an inertial reference frame and {*B*} a body-fixed reference frame attached to the geometric center of mass of each vehicle, according to Figure 2.

**Figure 2.** Adopted reference frames for a surface vehicle (**left**) and a quadrotor (**right**).

#### *3.1. ASV Model*

The ASV vehicle is modeled as a rigid body whose motion is restricted to a 2-D plane at the surface of the water, such that the roll and pitch angles are zero, i.e., *φ* = *θ* = 0. Let the kinematic equations of the vehicle be given by:

$$
\underbrace{\begin{bmatrix} \dot{\boldsymbol{x}} \\ \dot{\boldsymbol{y}} \end{bmatrix}}\_{\mathbf{\dot{p}}} = \underbrace{\begin{bmatrix} \cos(\boldsymbol{\psi}) & -\sin(\boldsymbol{\psi}) \\ \sin(\boldsymbol{\psi}) & \cos(\boldsymbol{\psi}) \end{bmatrix}}\_{\mathbf{\dot{s}}\_{B}R(\boldsymbol{\psi})} \underbrace{\begin{bmatrix} \boldsymbol{u} \\ \boldsymbol{v} \end{bmatrix}}\_{\mathbf{v}} + \underbrace{\begin{bmatrix} \boldsymbol{v}\_{\text{cx}} \\ \boldsymbol{v}\_{\text{cy}} \end{bmatrix}}\_{\mathbf{v}\_{c}}\tag{8}
$$

$$
\psi = r\_\prime \tag{9}
$$

where **p** := [*x*, *y*] *<sup>T</sup>* denotes the ASV position expressed in {*U*}, **<sup>v</sup>** := [*u*, *<sup>v</sup>*] *<sup>T</sup>* denotes the body-velocity vector, *<sup>U</sup> <sup>B</sup> <sup>R</sup>*(*ψ*) <sup>∈</sup> <sup>R</sup>2×<sup>2</sup> denotes the rotation matrix, and **<sup>v</sup>** := [*vcx*, *vcy*] *T* denotes the ocean current, expressed in {*U*} and assumed to be constant, irrotational, and bounded. The ASV model is considered to be underactuated, with the input of the system being given by **u** = [*u*,*r*] *<sup>T</sup>* <sup>∈</sup> <sup>R</sup>2.
