## 4 Collaborative Distributed Scheduling Approach
### Two-step Collaborative Distributed Scheduling Approach
#### 4.3.2 Scheduling Update  
When in T-CDSA, there are three steps for a node to obtain its SM. The three steps are upstream update, downstream update and probability calculation. The upstream update and the downstream update steps are illustrated in Figure 7, which is the reason that we call this approach a two step CDMA.  
1) Upstream update  
The upstream update step refers to the process that the statistical parameters are transmitted for the upstream direction and the parameters \(v\) and \(m\) can be achieved by Equations (1) and (2). This can help a node learn the behavior of its child nodes. This step is same as the updating process of O-CDSA.  
2) Downstream update  
The downstream update aims to let child nodes learn the sleep behavior of their parent node. After all nodes completed the upstream update, the sink node initiates the downstream update by broadcasting  
Figure 6: State transition diagram of a node in T-CDSA.  
Figure 7: Parameter delivery procedure in T-CDSA.  
a downstream update packet (DUP). This DUP will be propagated to the leaf node along each route. After a node receives the DUP from its parent node, it extracts the probability information of Sleep state of its parent node and calculates its own parameter \(g\) - the scheduling probability from F to S as shown below. The \(g\) is certainly related to the next-hop and its child nodes:  
\[g=g_{p}\times(1-v) \tag{4}\]  
where \(g\) represents the scheduling probability from state F to state S, \(g_{p}\) represents the probability of its parent node from state F to state S.  
Then the node inserts the parameter \(g\) into the DUP, and sends the DUP to its child nodes. In this paper, we insert the parameter \(g\) into the payload of the DUP. Otherwise, if we select the sum of probability from F to S and probability from I\({}_{0}\) to S as the delivery parameter in DUP, the parameter \(g\) will probably be bigger than 1. Moreover, let's assume that the WSN system runs into an equilibrium state. Only after all child nodes have transmitted their all data packets and have gone to Sleep, the parent node can choose to Sleep state, i.e. the F state of child nodes is caused by the serious conflict. Only if the next-hop of the parent node goes to sleep earlier than before, it will make the parent node transfer to state F and then move to Sleep state from F state. As the parent node enters to Sleep state earlier than before, it will lead to the F state of child nodes. So it is the probability from F to S that should be inserted in the DUP. And the initial probability value in the DUP is set as follows: the probability of the sink node is 0. And that of the nodes with only one hop distance to the sink node equals to their probability from I\({}_{0}\) to S.  
3) Parameter calculation  
The calculation of parameter \(\beta\) is same as Equation (3). The new SM of a node can be calculated from Table 2 below (where the first column is the current state, the second column denotes the next state, the third column is the state transition probability value from current state to the next state). The new SM can be derived from the Section 4.3.1 and 4.3.2, which is similar to that of Table 1.