# Non-Uniform Fusion Tree Generation in a Dynamic Multi-Sensor System
## 4 NU-FTG Algorithm
### Algorithm Descriptions  
Algorithm 1 describes the pseudocode of the NU-FTG, which consists of two different parts. Before the start of the algorithm, radars initialize their variables: Sts, myCh, \(S_{rs}\), \(S_{ch}\), and \(S_{fch}\). The Sts, which stands for status of a node, is initialized as RS (role selection). myCh, used to save the ID of the cluster head of a node, is initialized as \"none\". \(S_{rs}\), which stands for the set of RS nodes in one hop, is initialized as \(\varnothing\). \(S_{ch}\), which stands for the set of available TCH or FCH nodes in one hop, is initialized as \(\varnothing\). \(S_{fch}\), which stands for the set of available FCH nodes in one hop, is initialized as \(\varnothing\). In the first part of the NU-FTG, radars repeat the loop until they have decided their status as FCH or FM. At the beginning of the loop, \(S_{rs}\) is updated with node-information of RS nodes in one hop, \begin{table}
\begin{tabular}{c l} \hline \hline
**Information** & **Descriptions** \\ \hline _ld_ & Identification number of a node \\ \hline \multirow{8}{*}{_Sts_} & Status of a node \\  & \(\bigcirc\) & RS (Role Selection) \\  & \(\bigcirc\) & TM (Temporal Member) \\  & \(\bigcirc\) & FM (Final Member) \\  & \(\bigcirc\) & TCH (Temporal Cluster Head) \\  & \(\bigcirc\) & FCH (Final Cluster Head) \\ \hline _Nbr_ & Number of neighbors in one hop \\ _Chd_ & Number of child nodes of a cluster head \\ _OT_ & Number of own tracks of a node \\ _NT_ & Number of tracks from neighbor nodes \\ _CT_ & Number of tracks from child nodes \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Node information. and \(S_{ch}\) is updated with the node-information of available TCH or FCH nodes in one hop. Initially, the status of nodes is RS, and RS nodes become TM or TCH nodes. TM and TCH nodes become FM and FCH nodes, respectively; or both TM and TCH nodes change back to RS. RS nodes select their role with node-information of their neighbors. Some RS nodes that have available TCH or FCH nodes in their \(S_{ch}\) change their status to TM. Others, whose _nscore_ is greater than or equal to the _nscore_ of nodes in \(S_{rs}\), change their status to TCH. The others stay in RS. TM nodes decide to become FM nodes or not. A TM node selects the TCH or FCH node which has the highest _nscore_ in \(S_{ch}\). as its parent; and the TM node sends a _req_join_ message to the selected parent. If the TM node is allowed to join, it updates its myCh with the ID of the selected parent and it becomes a FM node. Otherwise the TM node changes its status to RS. TCH nodes decide to become FCH nodes or not. A TCH node waits for the specified time duration which can be decided by considering the network latency. If the TCH node receives any _req_join_ message or has no available TCH or FCH nodes in \(S_{ch}\), then it changes its status to FCH. Otherwise it changes its status to RS. In the second part of the NU-FTG, FM nodes repeat the loop to balance tracks across the local fusion nodes. At the beginning of the loop, \(S_{fch}\) is updated with the node-information of available FCH nodes in one hop. A FM node selects the FCH node, which has the lowest _fscore_, in \(S_{fch}\). The FM node can migrate to the selected FCH node only when the _fscore_ of the selected FCH node is less than the _fscore_ of its current FCH node. Additionally, a FM node migrates to the selected FCH node with the specified probability of \(\epsilon\). This condition is required to prevent nearby FM nodes from continuing to change their FCH node. If the probability is too small or large, it takes a significant amount of time until the fusion tree is stabilized. The probability \(\epsilon\) can be acquired practically with some experiments. If an FM node decides to migrate, then it sends _req_join_ to the selected FCH node and wait for the specified time duration. If the FM node is allowed to join, it migrates to the selected FCH node.