# A Node Density Control Learning Method for the Internet of Things
## 5 Design of Node Density Control Learning Algorithm  
Based on the structure characteristics of mobile nodes in WSNs, we design a novel node density control learning algorithm. The road consumption decay geometry model [14] is used in the algorithm design. Assuming that each node has the same transmit power \(t\) and receive threshold power \(m\), the receive decibel threshold of the sensor node obtained by the transmit power and the receive threshold power is \(h\), then the signal-to-noise decay is defined as Equation (3). \[\beta_{1}(u,v)=10\times h\lg s(u,v) \tag{3}\]  
Set the frequency to \(\beta_{th}\). If \(\beta_{1}(u,v)\leq\beta_{th}\), there is an edge between the two nodes, otherwise there is no edge between the two nodes. When \(\beta_{1}(u,v)=\beta_{th}\), the obtained \(s(u,v)\) is the maximum one-hop communication radius of the node \(u\), which is denoted as \(r_{0}\). Because the model does not consider the interference of the obstacle and the surrounding environment of the site to the node channel, the model has a large error. [PERSON] et al. designs a more practical and accurate time attenuation model based on the geometric model of road loss [15]. The interference of various bad factors in the network to the communication ability of the node is characterized by a random variable obeying the normal distribution, and the probability density function is given in Equation (4). \[f(\beta_{2})=\frac{1}{2\pi\sigma}\exp(-\beta^{2}/(2\sigma^{2})) \tag{4}\]  
In Equation (4), \(\beta\) represents the characteristics of density distribution, and \(\sigma\) represents probability coefficient. Then, the signal-to-noise decay formula can be defined as Equation (5). \[\beta(u,v)=\beta_{1}(u,v)+f(\beta_{2}) \tag{5}\]  
If \(\beta_{1}(u,v)+\beta_{2}\leq\beta_{th}\), the two-node \(u\) and \(v\) can establish the side of direct communication. The probability of having an edge between two nodes is defined as Equation (6). \[P(\Lambda(u,v)\ket{s\;(u,v)})=P(\beta(u,v)\leq\beta_{th}\ket{s(u,v)}) \tag{6}\]  
Substituting the probability density function of the variable \(\beta_{2}\) into Equation (6), Equation (6) can be simplified to obtain Equation (7). \[P(\Lambda(u,v)\ket{s\;(u,v)})=\frac{1}{2}-\frac{1}{2}erfP(\frac{10a}{\sqrt{2 \sigma}}1g\frac{s(u,v)}{r_{0}}) \tag{7}\]  
The number of neighbors of a node is called the degree of the node, and its mean is defined as in Equation (8). \[E(D)=\sum_{i=1}^{\infty}P_{i}(\Lambda\ket{s_{i}}\pi(s_{i}^{2}-s_{i-1}^{2})_{\rho} \tag{8}\]  
In Equation (8), \(\rho\) represents node density. Simplify Equation (8) to obtain Equation (9). \[E(D)=2\pi_{\rho}\int_{0}^{\infty}P(\Lambda\ket{s}sds+0 \tag{9}\]  
The mobile node degree is a random variable obeying the Poisson distribution with an intensity of \(E(D)\). Using the properties of the Poisson distribution, the probability that a node is an isolated node can be defined as Equation (10). \[P(D=0)=e^{-E(D)} \tag{10}\]In an infinitely large area or a closed spherical area, the WSN is connected equivalent to no isolated nodes in the network. However, the two are not equivalent to a limited area or a non-closed spherical area. The conditions of no isolated nodes in the network are weak, and the conditions under which the network is connected are strong [16]. As the density of nodes increases, the network first reaches the state of no isolated nodes, and further increases the node density to reach the fully connected state [14]. In a limited or un-closed area, you can first find the node density \(\rho\) when the network reaches the state of no isolated nodes. Based on this, the one-step transition probability matrix of the signal is used to find the sooner or later probability \(f(u,v)\) of the signal mutual access between any pair of nodes, and it is close to \(1\) to approximate the node density \(\rho^{*}\) when the network is fully connected. \(P(\textit{noisolation}\mid\textit{number of nodes is }n)=(1-e^{-E(D)})^{n}\) can be found as the mean of the average number of neighbors of a given node.