## 3 Cooperative Algorithms for Mobile Sensors  
This section focuses on the development of an adaptive cooperative algorithm for mobile sensor nodes, the moving components of the underwater network. When fixed sensors are present they will participate to the global performance, in terms of detection and communication, but since their position is fixed they cannot reconfigure and adapt themselves to varying scenarios. In this case, it will be the mobile agents' responsibility to consider the presence of the fixed nodes, so as to guarantee that the final goal can be reached. Moreover, in order to allow a simpler description of the proposed method, in the remainder of this section, we assume the existence of an appropriate communication infrastructure which is reliable and robust enough to effectively allow a team of mobile agents to securely communicate and collaborate to achieve the required common goal. Further details on these aspects are given in Section 4. The main mission objective is that of covering with the mobile node detection sonars the maximum area around the asset, while each vehicle has to move to keep at least one other vehicle of the team within  
Figure 3: Architecture diagram with spatial configuration of various fixed and mobile nodes as well as the base station with the command and control center. its communication range. This general goal is hence divided, according to the _behavioral approach_ paradigm, into simpler subtasks (behaviors or rules) solvable in parallel [11]. A composition rule is also defined to transpose the commands generated by each subtask into one single motion command for each vehicle. Let us assume we have the availability of \(n\) AUVs, each one equipped with an acoustic modem for communication up to a maximum range \(R_{C}\) and with a detection sonar characterized by a maximum range \(R_{D}\). We consider the \(i-th\) vehicle as defined by the discrete kinematic model:  
\[x^{i}(k+1)=x^{i}(k)+T_{s}u^{i}(k) \tag{1}\]  
where \(x^{i}(k)\in\Re^{3}\) is the i-th vehicle location at time \(k\), \(u^{i}(k)\in\Re^{3}\) is the control input to be defined and \(T_{s}\) is the sampling period. The above-mentioned objective is hence split into two subtasks or rules:  
1. Move toward the High Value Asset (HVA) to be defended. 2. Move away from your closest neighbor but without exiting from its communication range. The first task allows the vehicle to move closer to the asset to ensure the asset protection. The second task represents the coordination level. It allows each agent to adapt its movement to keep into account actions of the other members of the team. Specifically, it lets each vehicle cover the maximum area around the asset, with minimum overlaps of the on board sonar detection ranges, while guaranteeing the communication links with at least one other teammate. The composition of the two subtasks is achieved through a priority-based mechanism which assigns to each of the subtask a dynamic priority on the basis of the vehicle status with respect to the fulfillment of each one of the subtasks. In particular, each vehicle assigns to each task a priority computed on the basis of an _interest function_. This function defines, at any given stage of the mission, the interest of the vehicle in fulfilling the specific task while a comparison among the functions of interest determines the priority of the tasks to be executed at any time frame by each vehicle:  
**Figure 4.** Function of interest for task 1: move towards the asset to be protected. The higher the distance from the asset the higher the interest in fulfilling the task. * The _Asset attraction function_, \(h_{A}(x_{asset},x^{i}(k))\) is a function of the agent's distance from the asset \(x_{asset}\). It defines the interest of the agent (priority of the subtask) in moving towards the asset (see Figure 4). Its parametric definition is as follow: \[h_{A}(x_{asset},x^{i}(k))=\frac{\left\|x_{asset}-x^{i}(k)\right\|_{2}}{N}\] (2) where \(N\) is a positive constant.