## 1 Introduction
In the context of our paper, sensors within IoT environment are considered to be an area of interest that acts as a collaboratively distributed antenna array that forms a specific network topology such as linear, mesh, ring, tree or even random according to the connectivity among the collaborative sensors. These collaborative sensors adjust the initial phases of their carriers such that signals from individual sensors add constructively and form a beam toward the direction of the intended base station. Moreover, CB can increase the coverage area of WSN, and can be also viewed as an alternative scheme to the multihop relay communications. Consequently, CB brings many advantages compared to the multihop relay communications for several reasons. First, no dependency of communication quality on individual sensors. Secondly, CB enables operating a single-hop directly to the base station, thus, it reduces the data overhead and delay. Finally, CB in directional antenna transmission achieves higher connectivity compared omnidirectional transmission with the same transmit power. Beside these challenges and advantages, the one concern in CB design is the uncontrolled sidelobes of the beamforming pattern due the following reasons:  
1. Random deployment whereas the sensors are randomly distributed over a specific area which collaboratively form an antenna array for beamforming purposes which is referred to as virtual random antenna array [4]. The location of each sensor must be considered on its own. Moreover, these randomly located sensors must be controlled by a cluster head. Hence, the locations, phase offset and transmit capabilities of each sensor must be known quantities to be taken into consideration during weight calculations,2 Synchronizing the distributed sensors to achieve the desired beamforming, and
3 Hardware limitations and processing of sensors which are restricted to simple circuitry. For these reasons, it might be concluded that the method for determining the complex weights should be carried out individually by each sensor without sharing information. Meanwhile, if the sensors have abilities to share and exchange information, initial phases can be used to calculate the weights based on global information in terms of the positions and disseminated through the network by cluster heads. This method strategically controls the deployment of distributed sensors according to pre-calculated and optimized global parameters of each sensor using various metaheuristic optimization algorithms. This paper proposes a local neighbor search method based on robust Canonical Swarm Optimization (CPSO) algorithm to investigate the effects of random deployment of disjointed sensors to achieve beamforming with sharp beamwidth while minimizing interference from undesired interferers. The resultant beampattern is crucial to decide whether the attainment of a CB technique is considered feasible with respect to the requirements of IoT applications. We claim that the random deployment and sharing of information among the selected participating sensors motivate CB to determine the characteristics of the beampattern based on the requirements of IoT applications. Furthermore, various network topologies of participating sensors produce different effects on transmission gain. The algorithm proposed in this paper creates a network topology of a virtual antenna array whereas the weight coefficient of each sensor is adjusted to control the reduction of sidelobe levels (SLL) while satisfying the connectivity among them that is constrained by the distance among the collaborating sensors. We establish the CPSO algorithm using directional antenna model [6] to analyze local connectivity i.e., the probability of isolation of the sensor, as well as the overall global connectivity by evaluating the probability of connectivity of at least one connected path that identifies the network topology in terms of ring, tree, mesh, and random from the entire network.