Input:

The number of users *K*, and the number of antennas *N*; Channel vectors: **h***k* for *k* = 1, 2, ···*K* RF chains: *NRF* Output: 1. User-grounding T1 Select number of cluster-heads; *Nt* = *NNRF* For g=1:G **~ H** = [ /////**~h**1/////, /////**~h**2/////, ···, /////**~h***K*/////] **~ h***n* = **<sup>h</sup>***n*((*g* − 1) ∗ *Nt* + 1 : *g* ∗ *N*t, :) [a,order] = (sort(H),'descend') O(g)= [order (1)] **~ H** = **~ H**/ /////**~h**a(1)///// end 2. Include other users into each cluster; *O<sup>C</sup>* = *K*/*O* max ///**h***Hi* **<sup>h</sup>***j*///, ∀*i* ∈ *O*, *j* ∈ *<sup>O</sup>C*, Grouping the cluster channel with a high correlationReturn T1.

When operating the user grouping in Algorithm 1, the complexities of calculating the channel correlation and the norm channel vector are *O*(*KN*) and *<sup>O</sup>*(*K*2*N*). The complexity of Algorithm 1 is *O*(*NK* + *<sup>K</sup>*2*N*). In Algorithm 2, the complexities of calculating channel correlation and norm effective channel vector are *O*(*N*(*K* − 1+*NRF* 2 )) and *OK*2*<sup>N</sup> NRF* . Then the complexity of Algorithm 2 is *O*(*N*(*K* − 1+*NRF* 2 ) + *K*2*N NRF* ). By comparing the complexity of the two algorithms, we can know that the complexity of algorithm 2 is lower than that of Algorithm 1.
