# Escalator: An Autonomous Scheduling Scheme for Convergecast in TSCH
## 4 Proposed Autonomous Scheduling Scheme for Convergecast
### Baseline Slotframe Size Determination  
In Escalator, the baseline slotframe is used to transmit routing messages and downward traffic. The baseline slotframe \(S_{Base}\) of length \(L(S_{Base})\) consists of a single shared timeslot for all traffic and idle timeslots. All nodes in the network use this shared timeslot to create the DODAG topology with RPL. We give the baseline slotframe a higher priority than the convergecast slotframe, because the schedule of the convergecast slotframe depends on the DODAG topology information, which is generated from the baseline slotframe. The baseline and convergecast slotframes are executed simultaneously in Escalator, and thus, a collision may occur between the two slotframes' schedules. The collision between the two schedules means that the number of operations that a node must perform in one timeslot is two or more. If a collision occurs between the two simultaneous schedules of the two slotframes at any timeslot, the operation of the convergecast slotframe is suppressed, because its priority is lower than that of the baseline slotframe. The transmission of the convergecast traffic scheduled in the timeslot where the collision occurred is delayed until the next cycle of the convergecast slotframe. If a collision occurs at the same timeslot in the next cycle again, the convergecast traffic scheduled in the timeslot is delayed again. In order to deliver data packets to the sink with minimal delay, this schedule delay from the schedule collisions should be bound to the minimum. We set the size of the baseline slotframe so that convergecast traffic can be transmitted with minimal delay even if there is a collision between schedules. If the size of the baseline slotframe is the same as the convergecast slotframe, the operation using a particular timeslot of the convergecast slotframe might be continuously suppressed due to collisions at the specific timeslot of the baseline slotframe. Then, links that use the timeslot will not be able to send traffic. To solve this problem, we define conditions for the size of the baseline slotframe to prevent the continuous suppression of certain timeslots. Before describing the conditions for the size of the baseline slotframe, we define the maximum hop counts of the packet forwarding path \(H_{max}(G)\) of the network \(G\) in Escalator as follows:  
\[H_{max}(G)\leq\text{min}\;(N-1,\quad Ch\times 2), \tag{7}\]  
Figure 5: An example of the Escalator schedule. DODAG, Destination-Oriented Directed Acyclic Graph. where \(N\) is the number of nodes in the network and \(Ch\) is the number of available channels. For graph \(G_{l}\) in a linear topology consisting of \(N\) nodes, the hop counts of the packet forwarding path from a node to the sink can be as long as \(N-1\) hops. Escalator allocates one channel per two hops using the channel offset selection mechanism of Section 4.3, so the hop counts of the packet forwarding path for the number of available channels \(Ch\) can be as long as \(Ch\times 2\) hops. In summary, the maximum hop counts of the packet forwarding path for graph \(G\) is less than or equal to the smaller value of the two cases. If a collision occurs at timeslot \(ts\) of the convergecast slotframe \(T\), collisions should be avoided in the timeslots \([ts,ts+H_{max}(G)-1]\) of the next slotframe \(T+1\) so that the delayed packets could be transmitted to the sink without a collision. Figure 6 shows the timeslots of the convergecast slotframe where collisions should be avoided in network \(G\) with \(N=6\). In Figure 6, the maximum hop counts of the packet forwarding path \(H_{max}(G)\) are five. If the transmission of packets is delayed due to a collision with the baseline slotframe at timeslot \(ts=3\) in convergecast slotframe \(T\), collisions should be avoided in the timeslots from 3-7 of convergecast slotframe \(T+1\) to transmit the delayed packets to the sink. If a collision occurs in the timeslots from 3-7 of slotframe \(T+1\), the packets not transmitted in the slotframe \(T\) is delayed until the slotframe \(T+2\).