## 4 Hierarchical Cooperative MIMO Clustering
### Routing Clusterhead Selection  
Routing clusterheads (RCHs) collect data from different clusters (via any of the MIMO modes), aggregate that data and send it forward to the next RCH in the routing table. For their own cluster, they act as normal CHs with additional responsibilities of aggregation and forwarding for CH data in addition to their own data. Selection of cooperative nodes and participation in cooperative communication for RCHs follow same rules as CHs. Routing clusterheads carry the highest amount of energy, and provide maximum connectivity. Selection of routing clusterheads is based on energy efficiency and continues across layers if the next layer of clusterheads offer more energy conservation. For routing clusterhead selection, we need to find best links between the nodes to ensure reliable energy efficient data transfer. This asks for careful selection of clusterheads. A systematic procedure follows below.  
We first construct our notation:  
* \(c_{ij}\) is a boolean variable which indicates a link between node \(i\) and node \(j\). Two nodes have a link between them if they are in each other's transmission range.
* \(Q_{ij}\) is the weighted cost for sending an \(L\) bits message from node \(i\) to node \(j\). Since, the goal is to minimize energy expenditure therefore cost \(Q_{ij}\) is measured in terms of energy expended.  
We use a weighted approach to determine the cost of each link.  
\[min\sum_{i\in I}\sum_{j\in J}Q_{ij}c_{ij} \tag{2}\]  
Subject to:  
\[p\leq\sum_{i\in I}c_{ij}\leq q \tag{3}\]  
where \(i\) is the clusterhead and \(j\) a sensory (ordinary) node. \(p\) and \(q\) are boundary constraints on the number of nodes in a cluster.  
Weighted cost for all the links in the network is given by:  
\[\left(\begin{array}{ccccc}Q_{11}&Q_{12}&...&...&Q_{1n}\\ Q_{21}&Q_{22}&...&...&Q_{2n}\\...&...&...&...&...\\...&...&...&...&...\\ Q_{n1}&Q_{n2}&...&...&Q_{nn}\end{array}\right)\]  
The cost of a link is determined by the following factors:  
1. Transmission distance: Neighboring clusters determine links between each other on the basis of allowed transmission distance. If the distance between node i and j is greater than the allowed transmission distance, the link \(c_{ij}\) is assigned 0, otherwise link \(c_{ij}\) is assigned 1.
2. Energy: Once links between the clusterheads are decided, the clusterheads start clustering algorithm to elect a routing clusterhead. The neighboring clusterheads exchange a ROUTE message. In this message, clusterheads announce the cluster ID of the cluster whose clusterhead possesses the highest residual energy. Only the clusterheads take part in this process and not the cooperating nodes since clusterheads are default communication centers with all the required knowledge about sensory nodes in clusters.  
3. Geographic distance: A RCH gets added in the routing table of a clusterhead if it takes less hops than the clusterhead itself to reach the BS.  
Based on the above three metrics, each cluster announces its cost \(Q_{i\ldots n}\). Cluster with minimum cost becomes the routing clusterhead. Routing clusterheads announce their presence to all neighbor clusterheads in the network. The clusterheads update their routing tables.  
At the end of clustering, each node is either a clusterhead, a routing clusterhead or an ordinary node affiliated with a clusterhead. Thus the network is fully connected, except for the case where the network gets partitioned in a way such that no two border nodes are in the communication range of each other. Thus our algorithm satisfies the _ad hoc clustering properties_ mentioned in [13]. Our algorithm is distributed because every node has knowledge about its one hop neighbors only. Similarly, routing clusters are selected by triggering clustering algorithm at a distance of one hop from each clusterhead.