# Sensor Topology Optimization in Dense IoT Environments by Applying Neural Network Configuration
## 3 System Model Design and Optimization Framework
### Problem Formulation
To do so, we apply the binary sensing model [29; 30; 31] and consider the following function to measure the overall overage:  
\[NC_{opp}=\left\{ \begin{array}{cc}1,&d\big{(}S_{i},m_{p}\big{)}>R_{s}\\ 0,&\text{otherwise}\end{array} \right. \tag{6}\]  
where \(R_{s}\) is the sensing range and \(d\big{(}s_{i},m_{p}\big{)}\) is the Euclidean distance between the monitoring point (\(x_{mp}\), \(y_{mp}\)) and the sensor node \(i\)'s coordinates \((x_{si},y_{si})\). The coverage constraint is fullfilled as long as, for each produced topology \(j\), we minimize the Euclidean distance between the monitoring point and the sensor's coordinates, i.e., \(mind\big{(}s_{i},m_{p}\big{)}=\sqrt{\big{(}x_{si}-x_{mp}\big{)}^{2}+\big{(}y_ {si}-y_{mp}\big{)}^{2}}\). We define the objective function, \(f_{2}\), as follows:  
\[f_{2}={\sum_{p\in M}}NC_{opp} \tag{7}\]  
where \(M\) is the total number of monitoring points. Moreover, there is a constraint within our optimization problem. It relates to the fact that the distance between any two sensor nodes should not exceed their communication range, \(R_{C}\). Additionally, only one sensor node is placed in each monitoring location. We name each monitoring location \(x(p)\) to indicate whether the location is equipped with a sensor or not, as in [7]. Following a binary representation, \(x(p)\) is defined as:  
\[x(p)=\left\{ \begin{array}{cc}1,&\text{if location $p$ has a sensor node}\\ 0,&\text{otherwise}\end{array} \right. \tag{8}\]  
In the case of deterministic deployment, applying the centroid Voronoi tessellation (CVT), nodes are scattered and form an optimal geometry deployment, as near as possible to the gateway, which subsequently means fewer transmission costs for the entire network [8]. To ensure the proper functionality of the deployed WSN, we make the following assumptions:  
1. To ensure connectivity, the communication radius, \(R_{c}\), is at least two times the sensing radius, \(R_{s}\), which is \(R_{c}\geq 2\times R_{s}\). In this condition, we only need to consider the coverage problem in the sensor network; if the network is covered, then it is connected [9]. 2. Given that the nodes with a sensing radius, \(R_{s}\), are deployed in the triangular mesh configuration in the sensing field, \(A\), the coverage fraction, \(k\), of the sensing field varies nonlinearly with the spacing between two adjacent nodes, in the range \(\sqrt{3}R_{S}\leq d\leq 2R_{S}\), where \(d\) is the internode distance [10]. 3. For a given coverage fraction, \(k\in(0.906,1)\), we will have \(R_{c}^{min}\in(\sqrt{3}R_{s},\,2R_{s})\). Having \(R_{c}\geq R_{c}^{min}\) is both a necessary and sufficient condition to ensure that _k-coverage_ implies connectivity, according to [10]. From [12], the optimal tessellation, using regular triangles with a side length equal to \(\sqrt{3}R_{s}\), ensures complete area coverage. In the case of a random deployment strategy (i.e., nodes' coordinates stem from a Gaussian distribution), the initial AoI coverage is relatively low. In that case, node relocation is imperative to extend the network lifetime and maximize coverage. There is a trade-off between the lifetime extension rate and the coverage rate. The more we respect joint coverage and communication constraints, the better the lifetime we achieve. Since we also want to examine how the network lifetime is affected by a network-scaling factor in the case of large networks, we applied a multihop communication pattern. Under this assumption, the Dijkstra algorithm is used, with the edge weights calculated according to the energy consumption Equations (1) and (2). Overall, we define the following objective function, \(F\), which we wish to minimize, as follows:  
\[\text{min}F=f_{1}+\frac{1}{f_{2}}\text{ s.t.: }P_{ri}\geq P_{rhres}\;\forall i\in[1 \ldots N] \tag{9}\]