## 5 Conclusions  
In this work we have presented and analyzed the different options to make a Stochastic Collaborative Beamforming (SCB) using conventional motes. With this, we have demonstrated the possibility of implementing communications from WSN to BS, when it is at a great distance. In order to be able to implement communications at great distances (long range communications), it has been seen that the transmission power of the motes, as well as the techniques based on multihop routing protocols are insufficient. Thus the need arises to introduce the technique proposed and described in this article. We have considered the implementation of collaborative transmission by assuming random retransmissions of the motes that make up the WSN network, introducing synchronization errors that are imperfections inherent to real motes existing in the market. These imperfections allow to obtain the offsets and the consequent pointing that allow the constructive interference after many repetitions of the emission. The necessary gain is obtained for the communication under the imposed limitations. The operation of SCB has been demonstrated using different types of topologies: uniform linear, irregular linear, as well as for a two-dimensional WSN. From all of them, it can be seen that the key factor is the number of motes, N, which forms the network. In all cases, N is the parameter that most influences the gain achieved, but this increase is asymptotic, and a trade-off must be found between the cost of a greater number of motes and their effective gain. Using the proposed Stochastic Collaborative Beamforming (SCB) algorithm, one can definitely think of locating the mote sink (or BS) at great distances, of the order of tens or hundreds of kilometers. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**WSN** & **5 \(\times\) 5** & **6 \(\times\) 6** & **7 \(\times\) 7** & **8 \(\times\) 8** \\ \hline Max (\(G_{2D}\)), (\(n\)) & 12.0 (\(n\) = 47) & 13.7 (\(n\) = 16) & 15.2 (\(n\) = 38) & 17.4 (\(n\) = 22) \\ Average (\(G_{2D}\)) & 4.5 & 5.0 & 6.2 & 6.63 \\
95\% CI & [4.0, 5.0] & [4.4, 5.5] & [5.6, 6.8] & [5.9, 7.4] \\ \hline \hline \end{tabular}
\end{table} 
Table 2: WSN with two-dimensional distribution \(N_{x}\times N_{y}\) motes, SCB transmission with 100 trials. It is shown maximum gain, iteration in which maximum gain is achieved, average gain, and 95% Confidence Interval. Figure 11: Distribution of the gain in the experiment of 100 stochastic transmissions for a two-dimensional 4 \(\times\) 4 WSN. Finally, it must be pointed out that the distribution of the motes could a priori be chosen quasilinear or two-dimensional, but this choice would not exist de facto since it would be determined by the geographical area to be monitored. For example, an almost regular two-dimensional distribution would be the most suitable for monitoring agronomic data in crops and a quasi-linear distribution for monitoring hydraulic parameters in watercourses or road traffic. In any of the cases analyzed it is demonstrated that it is possible to obtain cooperative gain, within the limitations imposed by the mote clocks, and the maximum attainable gain would be limited by N, being N the number of motes of the WSN, regardless of whether the distribution is linear, linear with uniform separation, linear with irregular spacing, linear with irregular spacing and random activation, or two-dimensional. In either case, gain is achieved by following the SCB algorithm described in this paper. Conceptualization, E.A.N.-C. and S.F.-C.; methodology, E.A.N.-C. and S.F.-C.; software, M.G.-P.; validation, E.A.N.-C.; formal analysis, E.A.N.-C.; investigation, S.F.-C.; resources, J.S.-G.; data curation, J.J.P.-S.; writing--original draft preparation, E.A.N.-C.; writing--review and editing, E.A.N.-C., S.F.-C. and M.G.-P.; funding acquisition, J.S.-G.