## 3 Results
### Software Architecture
The estimated positions and drifts of the secondary units are, therefore, passed to a Model Predictive Controller (MPC) responsible for forecasting long-term motion and possible fragmentation of the cluster. The aim is to use the prediction information to allow primary drifters to autonomously follow the passive vehicles. In the specific, let us consider a scenario with one primary drifter tracking positions \(\hat{p}_{i}\) and velocities \(\hat{v}_{i}\) of \(N\) secondary drifters (Figure 3). Once a time instant t and a time interval \(\Delta T\) have been fixed, the controller predicts the kinematic motion of each drifter as  
\[ \begin{pmatrix}\hat{p}_{i}\\ \hat{v}_{i}\end{pmatrix} _{k+1}= \begin{pmatrix}\hat{p}_{i}\\ \hat{v}_{i}\end{pmatrix} _{k}+T \begin{pmatrix}\hat{v}_{i}\\ 0\end{pmatrix} _{k},\forall i=1,\ldots,N,\forall k=1,\ldots,M\]  
with \(M\) number of prediction steps. \(k=1\) refers to the estimations received from the tracking modules. \(T_{p}=M\Delta T\) is called the prediction horizon. It is now possible to define the set  
\[P_{k}=\left\{\hat{p}_{1},\ldots,\hat{p}_{N}\right\}_{k},\forall k=1,\ldots,M\]  
of the predicted positions of all secondary drifters at each time instant \(t+\Delta Tk\). A hierarchical clustering analysis (HCA) is then applied to each set \(P_{k}\) in order to predict the evolution of clusters:  
\[\left\{P_{k}\to HCA\to C_{k}^{l},\forall l=1,..,L_{k}\right\},\forall k=1, \ldots,M\]  
where \(C_{k}^{l}\) indicates the \(L_{k}\) sub-cluster at step \(k\). For each subcluster at each time step \(k\), the centroid \(c_{k}^{l}\) is computed, together with the mean values of the sensor measurements of the passive drifters. We remind that \(L_{k}\) could change at some prediction step \(k\) due to fragmentation/fusion of clusters. Indeed, local turbulence leads each drifter tracker to estimate slightly different drift values for each secondary drifter. On the basis of these prediction scenarios, the motorized drifter schedules its target sub-cluster to follow at each time step given a certain optimization policy:  
\[q_{k}=argmin/argmax_{l=1,..,L_{k}}F\left(C_{k}^{l}\right) \tag{1}\]  
where \(F(\ )\) is the policy (for example, the sub-cluster with the max number of elements) and \(q_{k}\) is the optimal index at step \(k\). Once the target sub-clusters are chosen, the set of optimal centroids  
\[G=\left\{c_{1}^{q_{1}},\ldots,c_{M}^{q_{M}}\right\}\]  
is used as the interpolation information for the automatic computation of a geometric trajectory to be followed, with a speed given by the average sea current speed of the selected clusters (Figure 4). All of the described prediction procedures are repeated after a time \(T_{c}\) called control time, which has to be smaller than the prediction horizon \(T_{p}\). We choose \(T_{c}=\Delta T\). In the case of a multi-primary dritter scenario, each primary dritter communicates to the others the first selected optimal sub-cluster \(C_{1}^{q_{1}}\) in order to force them to select a different cluster to be followed in the form of constraints inside the optimization problem of (1). This approach will result in a systematic distribution of smart drifters over a finite number of sub-clusters, ensuring long-term data collection, aggregation, and cumulative remote (e.g., satellite) data transfer over time. The trajectory is computed by the motorized dritter interpolating the forecasted centroids of the chosen clusters, using a specific class of polynomial curves called Pythagorean-Hodograph (PH) [15]. In particular, a polynomial plane curve  
\[r(u)= \begin{pmatrix}x(u)\\ y(u)\end{pmatrix} \]  
is a PH curve if and only if  
\[x^{\prime}(u)^{2}+y^{\prime}(u)^{2}=\sigma(u)^{2}\]  
This means that the norm of the derivative \(\|r^{\prime}(u)\|\) of the curve with respect to the parameter \(u\) is polynomial.