# A Type of Low-Latency Data Gathering Method with Multi-Sink for Sensor Networks
## 4 Data Gathering with the Help of Multi-Sink
### Moving Path for Multi-Sink
In Formula (21), \(t_{p}\) is the time when \(TP(n)\) was visited by another Sink last time. \(Num(DGA_{n})\) is regarded as the number of active nodes in the DGA where \(TP(n)\) locates at. \(\pi R_{S}{}^{2}(S_{i})u_{i}\) is just the data gathering rate of each active node \(S_{i}\) whose sensing radius is \(R_{S}(S_{i})\). When \(Sink(i)\) stays at \(TP(m)\) for a period time slot \(t_{0}\), other TPs in the neighbor DGAs calculate the value of their weight. The TP with the maximum value of \(P_{TP(m)\_TP(j)}\) and has not yet being visited by \(Sink(i)\) is selected as the next TP of \(Sink(i)\). If there is no such traversal points, \(Sink(i)\) moves back to the previous traverse point \(TP(k)\) and chooses one of the unvisited TPs with the maximum weight value from the neighbor DGAs as its next TP. Thus, the hop distance of the mobile Sink will not be too long and the probability that TPs in the neighboring DGAs being visited by \(Sink(i)\) will also be increased. Moreover, the amount of data waiting for uploading in one DGA is another important factor in determining which TP \(Sink(i)\) will visit next, just as Formula (21) shows. Therefore, the possibility of buffer overflow on leaders could be effectively decreased. It is also known that the longest period of time that the leader could cache data in DGA\({}_{\text{n}}\) could be calculated as follows. \[T_{th}\left(n\right)=Cache/\sum\limits_{i=1}^{Num(DGA_{n})}\pi R_{S}{}^{2} \left(S_{i}\right)u_{i} \tag{22}\]  
Without loss of generality, the value of the parameter \(Cache\) is set to 4 KB (just the buffer size of MicaZ). Thus, for the network with \(k\) mobile Sinks, the period \(T\) for one round of data collection is defined as follows. \[T=MAX\left(Num\left(R\right)t_{0}+\frac{1}{v_{\eta}}\sum\limits_{j=1}^{Num(R )-1}l_{j}\right|\eta=1,2,...k\right) \tag{23}\]  
Parameter \(t_{0}\) is defined as the time slot that Sink stays at each TP and \(v_{\eta}\) is the moving speed of Sink(\(\eta\)). While \(l_{j}\) is the straight line distance between two adjacent TPs on the trajectory of one Sink. So the value of \(T\) in Formula (23) is just the longest time that the Sink spends on visiting all the TPs. For one DGA, if the time intervals between any two successive arrivals of different Sinks could be approximately equal, the efficiency of LDGM could be further improved and the burden on the leader could also be reduced. In this case, the time interval \(T_{o}\)' is,  
\[T_{o}^{\prime}=\frac{1}{k}MAX\left(Num\left(R\right)t_{0}+\frac{1}{v_{\eta}} \sum\limits_{j=1}^{Num(R)-1}l_{j}\right|\eta=1,2,...,k\right) \tag{24}\]  
To avoid buffer overflow, the value of \(T_{o}\)' should meet,  
\[T_{o}^{\prime}\leq MAX\left(T_{th}\left(n\right)\left|n=1,2,...,Num\left(R \right)\right) \tag{25}\]  
So, with the help of Formulas (22)-(24), we get,  
\[k\geq\frac{MAX\left(Num\left(R\right)t_{0}+\frac{1}{v_{\eta}}\sum\limits_{j= 1}^{Num(R)-1}l_{j}\right|\eta=1,2,...,k\right)}{Cache/MAX\left(\sum\limits_{i= 1}^{Num(DGA_{n})}\pi R_{S}{}^{2}\left(S_{i}\right)u_{i}\left|n=1,2,...,Num \left(R\right)\right)} \tag{26}\]  
However, in LDGM, trajectories of the mobile Sinks are not fixed and their moving paths could also be affected by the value of \(P_{TP(m)\_TP(n)}(t)\). Thus, \(T_{o}\)' is just the optimal value of time interval. In the worst case, no Sinks visit the DGA during the time of \(T\)-\(kt_{0}\), so the longest time interval \(T_{m}\)' is,\[T^{\prime}_{m}=MAX\left(Num\left(R\right)t_{0}+\frac{1}{v_{\eta}}\sum\limits_{j=1 }^{Num\left(R\right)-1}l_{j}\Bigg{|}\eta=1,2,...,k\right)-kt_{0} \tag{27}\]  
In this case, if and only if \(T_{m^{\prime}}\) satisfies the following conditions, the cache overflow does not occur. \[P_{TP(m)\_TP(n)}\left(t\right)=\left(t-t_{p}-t_{0}\right)\sum_{i=1}^{Num(DGA_ {n})}{\pi{R_{S}}^{2}\left(S_{i}\right)u_{i}} \tag{21}\]0  
Accordingly, from Formulas (22), (27) and (28), we could also get,  
\[