## 4 BLJCAR Mechanism
### Network Jitter Training  
Let \(t\) be the fixed sample interval, \(p_{\bar{y}}\) be the successfully transmitted packet of the specific real-time flow corresponding to threshold \(i\), \(W(p_{\bar{y}})\) be the waiting time of packet \(p_{\bar{y}}\) in coding node, \(InTime(p_{\bar{y}})\) be the time at which \(p_{\bar{y}}\) entered the coding node, \(OutTime(p_{\bar{y}})\) be the time at which \(p_{\bar{y}}\) leave the coding node, \(K\) be the capacity of the coding queue in coding node, \(M_{i}\) be the number of successfully transmitted packets in a fixed sample interval \(t\) and \(\mathrm{AVPWD}(i)\) be the \(\mathrm{AVPWD}\) corresponding to threshold \(i\).  
Then, we have  
\[W(p_{\bar{y}})=OutTime(p_{\bar{y}})-InTime(p_{\bar{y}}) \tag{20}\]  
The variation in packet waiting delay between \(p_{\bar{y}+1}\) and \(p_{\bar{y}}\) is \((W(p_{\bar{y}+1})-W(p_{\bar{y}}))\). The total variation in packet waiting delay corresponding to threshold \(i\) in a fixed sample interval \(t\) is \(\sum\limits_{j=1}^{M_{i}}(W(p_{\bar{y}+1})-W(p_{\bar{y}}))\).  
Based on the above analysis, in the queue-length based threshold policy, the value of \(\mathrm{AVPWD}(i)\) is calculated as  
\[\mathrm{AVPWD}(i)=\frac{1}{M_{i}}\sum\limits_{j=1}^{M_{i}}(W(p_{\bar{y}+1})-W (p_{\bar{y}})) \tag{21}\]Combining (20) and (21), we obtain  
\[\mathrm{AVPWD}(i)=\frac{1}{M_{{}_{i}}}\sum_{j=1}^{M_{{}_{i}}}[(OutTime(p_{{}_{ \bar{y}+1}})-InTime(p_{{}_{\bar{y}+1}}))-(OutTime(p_{{}_{\bar{y}}})-InTime(p_{{}_ {\bar{y}}}))] \tag{22}\]  
After establishing the coding-aware route, the network enters a network jitter training phase which is described as follows:  
**Step 1:** The coding node initiates the threshold as 0. The source begins to send packets along the new selected path and the coding node makes an efficient \"transmit or wait\" decision for packets of both flows according to the queue-length based threshold policy. When the data transmission is stable, in a fixed sample interval \(t\), the coding node records \(InTime(p_{{}_{0j}})\) and \(OutTime(p_{{}_{0j}})\) for every successfully transmitted packet \(p_{{}_{0j}}\) and calculates the number of successfully transmitted packets \(M_{{}_{0}}\). According to (22), the coding node can obtain \(\mathrm{AVPWD}(0)\);  
**Step 2:** The coding node set threshold \(i\) to 1. In a fixed sample interval \(t\), the coding node records \(InTime(p_{{}_{1j}})\) and \(OutTime(p_{{}_{1j}})\) for every successfully transmitted packet \(p_{{}_{1j}}\) and calculates the number of successfully transmitted packets \(M_{{}_{1}}\). The coding node calculates \(\mathrm{AVPWD}(1)\) according to (22) and increases \(i\) by 1. Repeat above process, the coding node can obtain \(\mathrm{AVPWD}(2)\), \(\mathrm{AVPWD}(3),\mathrm{AVPWD}(4)...\mathrm{AVPWD}(\min(K-1,11))\);  
**Step 3:** After obtaining above values of \(\mathrm{AVPWD}(0)\), \(\mathrm{AVPWD}(1)...\mathrm{AVPWD}(\min(K-1,11))\), we can find the minimum value. The corresponding threshold is the optimal threshold for the network.  
Remark: Due to the fact that the length of the searching range is at most 12, searching the optimal threshold of the network can be completed quickly.