## 5 Dynamic Tree (DT) Protocol
### Network Initiation  
Initially, the _DtA_ value of each data collector equals _DtA__Max_ + 1, where _DtA_ indicates the hop count to the data concentrator, and _DtA__Max_ is the maximum depth of the EMMNet. The _DtA_ value of the data concentrator is set to 0. When the collector is opened, it will regularly send a request message, RM. This request message includes two fields: _packet_sender_ID_ and _packet_DtA_. Here, _packet_sender_ID_ indicates who sends the message, and _packet_DtA_ describes the hop count between the sender and the concentrator. When any collector receives an RM packet, it can reply if its _DtA_ is smaller than the _packet_DtA_ in RM and does not equals _DtA__Max_. Therefore, only the data concentrator can reply to collector requests at the beginning. The reply to the request message, RRM, has the following fields: _packet_source_ID_, _packet_DtA_, and _packet_sender_ID_. Here, _packet_source_ID_ denotes the ID of the concentrator.  
If any collector receives an RRM and its _DtA_ equals _DtA__Max_ + 1, its _DtA_ is set to _packet_DtA_ + 1 no matter what the _packet_DtA_ value is. Meanwhile, its _father_ID_ list and _root_ID_ are updated according to _packet_sender_ID_ and _packet_source_ID_, where _father_ID_ list and _root_ID_ are used for recording the potential relay nodes and the concentrator ID.  
If a collector receives another RRM and its _DtA_ is smaller than _DtA__Max_ + 1, it should make judgments based on the value of _packet_DtA_ and its own _DtA_. If _packet_DtA_+1<_DtA_, the value of _DtA_ and _root_ID_ should be updated. Meanwhile, it should clear the _father_ID_ list before inserting _packet_sender_ID_ as a new relay node. If (1) _packet_DtA_+1=_DtA_, (2) _packet_source_ID_ equals _root_ID_, and (3) _packet_sender_ID_ is not in the _father_ID_ list, _packet_sender_ID_ is added to the end of the _father_ID_ list.  
In the electricity meter monitoring application, we not only collect the quantity of electric, but also control the parameters of the electricity meters. Transmission is divided into uplink and downlink channels. The uplink channel is used for transmission of information from the collectors to the concentrator. The downlink channel is used for transmission of information from the concentrator to the collectors, including resetting the sample ratio, altering the collection parameter, and sending query commands. Therefore, we should establish the downlink channel. Each collector needs to transmit a routing message to the concentrator when its _DtA_ is smaller than _DtA__Max_ + 1. If a collector receives routing messages from its child collectors, the routing information is recorded in the routing table and the messages are relayed to its parent collectors.  
The structure of the EMMNet after network initiation is shown in Figure 4. Each device has a communication range, which is illustrated by the dotted line. The communication range is not a perfect circle due to the complicated communication environment. The dashed lines indicate relationships among the collectors and the concentrator. The numbers in the circles indicate the value of _DtA_. The node whose _DtA_ value equals zero denotes the data concentrator. A collector whose _DtA_ value is larger than zero at least has a parent collector, and the _DtA_ value of this collector is larger than that of its parent collector by one.