# A Collaborative UAV-WSN Network for Monitoring Large Areas
## 2 Materials and Methods
### Trajectory Design for Data Gathering  
For further use we recapitulate some of the basic notions of B-spline parameterizations [32]. The B-spline of order \(d\) is described by the following recurrence relations (4) and (5):  
\[B_{i,1}(t)=\ \ \left\{ \begin{array}{c}1,for\ \tau_{i}\leq t<\tau_{i+1}\\ 0\ \text{otherwise}\end{array} \right., \tag{4}\]  
\[B_{i,d}(t)=\frac{t-\tau_{i}}{\tau_{i+d-1}-\tau_{i}}B_{i,d-1}(t)+\frac{\tau_{ i+d}-t}{\tau_{i+d}-\tau_{i+1}}B_{i+1,d-1}(t) \tag{5}\]  
for \(d>1,\ \text{i}=0,1\ldots\text{n}=\text{m}-\text{d}\) and the non-decreasing time instants (6)  
\[\mathbb{T}=\{\tau_{0}\leq\tau_{1}\leq\ldots\leq\tau_{m}\} \tag{6}\]  
forming the so-called _knot-vector_. Taking a collection of _control points_ (7)  
\[\mathbb{P}=\{p_{0},p_{1}\ldots p_{n}\} \tag{7}\]  
we describe a _B-spline curve_ as a linear combination of the control points (7) and the B-spline functions (4), (5) as (8):  
\[z(t)=\sum_{i=0}^{n}B_{i,d}(t)P_{i}=\mathbf{P}\mathbf{B}_{d}(t) \tag{8}\]  
with \(\mathbf{P}=\left[ \begin{array}{c}p_{0}\ldots p_{n}\end{array} \right]\) and \(\mathbf{B}_{d}(t)=\left[B_{0,d}\ldots B_{n,d}(t)\right]^{T}\). Using (8) we may then express the inputs and states of the UAV dynamics in terms of the flat output \(z(t)\) and its derivatives (9):  
\[ \begin{array}{l}x(t)=\Theta(z(t),\dot{z}(t),\cdots,z^{(q)}(t))=\ \widetilde{\Theta}(\mathbf{P},\mathbf{B}_{d}(t)),\\ u(t)=\Phi(z(t),\dot{z}(t),\cdots,z^{(q+1)}(t))=\ \widetilde{\Phi}(\mathbf{P}, \mathbf{B}_{d}(t))\end{array}  \tag{9}\]  
where \(q\) is the maximum order of derivatives for \(z(t)\) and where mappings \(\ \widetilde{\Theta}(\cdot,\cdot),\ \widetilde{\Phi}(\cdot,\cdot)\) express the states and inputs in terms of the control points \(\mathbf{P}\) and B-splines \(\mathbf{B}_{d}(t)\). The main difficulty of the mission is to efficiently cover the sensor heads such that all the information they provide is received. Note that this requirement imposes not only to pass near the node heads but also to stay enough time inside their communication range (such that the data is received). The classic B-spline parameterization allows to pass though (or within a pre-defined neighborhood) of a way-point (the position of the cluster head of interest). The two principal issues are that both the total time for the trajectory and the intermediate times at which the sensor is passing near the way-points have to be a priori given [33]. In here we concentrate on the second issue but mention some heuristics for the first one as well. First, we consider an iterative scheme where, for fixed way-points and a given permissible velocity interval, we estimate a total time for the UAV trajectory. Second, building on some preliminary work done in [33], we ensure that the UAV spends sufficient time inside the communication radius of each sensor head. Typically, a collection of \(N+1\) way-points with associated time stamps is considered (10):  
\[\mathbb{W}=\{w_{k}\}\ \text{and}\ \mathbb{T}_{\mathbb{W}}=\{t_{k}\}. \tag{10}\]Then, the UAV must pass through each way-point \(w_{k}\) at the pre-specified \(t_{k}\), that is, \(y(t_{k})=w_{k}\) (where \(y(t)\) is the position component of the UAV state). These way-point constraints are needlessly restrictive and consequently impact negatively the trajectory generation procedure (even making the entire procedure unfeasible). Previous results [33] partially alleviate these limitations by first relaxing the spatial restriction (the UAV position has to stay within a neighborhood of the way-point) and secondly by relaxing the temporal restriction (the time at which the UAV passes through the region of interest is not fixed a priori). Let us associate to each way-point a communication region \(S_{k}\subset\mathbb{R}^{n_{x}}\) (we consider this region to be a polyhedral set).