# Congestion Control and Traffic Differentiation for Heterogeneous 6 TiSCH Networks in IIoT
## 4 Multi-Queue Model and Priority-Based Transmission
### The Multi-Queue Transmission Model  
As discussed in Section 2, the conventional single queue model in 6 TiSCH networks cannot guarantee the real-time requirements of high priority data in IIoT applications. To deal with this issue, we design a multi-queue model to support traffic differentiation in heterogeneous 6 TiSCH networks in IIoT applications. Each node exploits a different output queue for each traffic type. We consider a 6 TiSCH network that supports up to three traffic types:  
* T\({}_{1}\): represents the safety-critical traffic that has the highest priority, e.g., fire alarms and emergency shutdown. * T\({}_{2}\): denotes the acyclic control traffic, which is often time critical. T\({}_{2}\) has lower priority than T\({}_{1}\), but higher priority than T\({}_{3}\). * T\({}_{3}\): represents periodic monitoring traffic that is less critical and generated at predictable time instants, e.g., periodic temperature measurements. T\({}_{3}\) has the lowest priority with relaxed timing requirements. In our proposed multi-queue model, each node maintains three equally-sized queues, Q\({}_{1}\), Q\({}_{2}\), and Q\({}_{3}\) for T\({}_{1}\), T\({}_{2}\), and T\({}_{3}\), respectively. The packets in Q\({}_{1}\) are given the highest priority and are always transmitted first, followed by the packets in Q\({}_{2}\), and lastly, Q\({}_{3}\), which is given the lowest priority. In order to elaborate our proposed multi-queue model, we consider an industrial real-world scenario of heterogeneous traffic, which is the process monitoring of plastic extrusion [35]. Plastic extrusion is a high volume manufacturing process in which raw plastic material is melted and formed into a continuous profile to form product items such as pipe/tubing, weather stripping, window frames, adhesive tape, and wire insulation. Firstly, it is critically important to measure pressure in the extruder to prevent serious accidents that can happen when excessively high pressures are generated [36]. Exceeding the safety pressure threshold may ultimately cause an explosion, the barrel may crack, or the die may be blown from the extruder. Melt temperature is also one of the most important variables that has to be maintained very carefully to produce a good quality product. It is important to ensure that the melt is not degraded or overheated during extrusion. A tight temperature profile along the barrel is very important for obtaining a constant quality of plastic material [36]. The whole process could be controlled remotely where all the collected information is transmitted to the Internet through the DODAG root. To map the different traffic within the plastic extrusion scenario to our defined multi-queue model, we have: T\({}_{1}\) refers to the safety alarms that are generated when the extruder pressure exceeds the predefined threshold to either inform the operator to shut-down the extruder or initiate an automatic shut-down command. T\({}_{2}\) refers to the control traffic generated when a notable deviation is detected in the temperature profile readings, and this in turn initiates a temperature control mechanism to avoid excessive economical loss. Lastly, T\({}_{3}\) represents the periodic temperature measurements from the thermocouple temperature sensors. The proposed queuing model is shown in Figure 5, and its working principle is described as follows. A classifier is responsible of sorting the incoming heterogeneous traffic either generated from the node itself or incoming from its children. Based on type and priority, i.e., T\({}_{1}\), T\({}_{2}\), or T\({}_{3}\), the packet is placed in the corresponding queue. The scheduler selects the packet to be transmitted first according to the priority of each queue. If there are T\({}_{1}\) packets in Q\({}_{1}\), the scheduler selects the packet to be transmitted first according to the Earliest-Deadline-First (EDF) approach [37], i.e., the T\({}_{1}\) packet with the minimum absolute deadline is selected.