## 4 Oscar: Tsch Optimized Cell Allocation Algorithm
### Design
#### 4.1.3 Duty Cycle Adjustment Algorithm  
Each node in the system operates on a duty cycle. Each interval is made up of sleep and wake times. In sleep time slots, the node turns off its radio, and in wake up time slots, the node turns on its radio to transmit or receive packets. With Orchestra, regular reception and transmission time slots are clearly defined and included in the unicast slotframe. All nodes in the network exhibit a 100% duty cycle within the time slots assigned to them to receive. This is not particularly efficient in terms of energy. The idea here is that in the absence of data to receive, a node does not switch on its radio.  
Algorithm 2 provides a method to adjust the radio duty cycle of each node and improve energy efficiency. This establishes a complementary mechanism to reduce the allocated slots so that the node turns off its radio even when a node has a good rank. This is done by downgrading the node progressively (class by class). For example, if node X which is in class 1 does not present any activity for a period of time, it is switched to class 2 then to class 3 if the packet exchange does not resume and so on until class 5. Consequently, it  
Figure 1: An example of classification of the network topology and the first network topology used in the performance evaluation.  
Figure 2: An example of timeslot allocation of the proposed solution.  
benefits from fewer slots allocated progressively. Subsequently, once activity resumes on this node, i.e., a packet is detected to have been received or sent, the initial slot number calculated on the basis of the rank is restored using the rescheduling algorithm.  
```
initialization; while(1)do Wait_10_seconds; if(current_class!= rank_class_max &S no_packet_selected)then  New_Class = Current_Class + 1;  Reschedule(New_Class);  end if  end while
```  
**Algorithm 2**Duty cycle adjustment  
This process is done using a timer that is triggered every 10 s and which monitors the activity of each node, namely, the packets received and sent. Basically, when a node's timer expires and there are no activities, fewer slots are gradually allocated. The main advantage of this mechanism is that it considerably reduces the energy consumption of the network. The goal is to minimize the energy consumption of the entire network with the constraint that the end-to-end delay expected from each node is as short as possible. The length of a slotframe in OSCAR introduces a trade-off in the end-to-end delay and energy consumption. The shorter the slotframe, the more often nodes have to wake up to listen or transmit, resulting in a higher energy baseline. Notably, shorter slotframes have their slots repeat more often, resulting in a higher traffic capacity and a lower end-to-end delay when approaching the sink. With this algorithm, when traffic is heavy, the size of the slotframe remains the same to support demand and reduce delay. However, once the traffic decreases, the size of the slotframe begins to increase, resulting in a reduction of the energy usage. The flow graph presented in Figure 3 illustrates the process of Algorithm 2 to address network energy requirements.  
Figure 3: Algorithm 2 design flow graph.