Abstract-Collaborative beamforming has already demonstrated its potential of significant power savings in distributed sensor networks. In collaborative beamforming, the antennas of the sensor nodes form a distributed antenna array in an effort to direct the radiated energy to the desired direction and thus increase the overall power efficiency of the network. Existing studies, however, have not addressed several major design issues: how to (1) optimally select a subset of radiating sensors for a given receiver to obtain optimal beamforming performance, (2) alternate among subsets of radiating sensors to prolong the lifetime of the sensors and robustness of network connection to the receiver, and (3) do so in the presence of synchronization and localization uncertainties. In this paper, we first show that the problem of selecting the subset of sensors that achieve optimal beamforming performance is NP-complete. We then propose a heuristic algorithm with complexity O(M log M ), where M is the total number of distributed sensors, that simultaneously addresses the above three issues. In particular, we demonstrate its effectiveness in realistic scenarios with synchronization and localization errors. Further, we show that real-time grouping can be achieved even when thousands of sensors are spread over large distances of over 1000 wavelengths.