## 6 Simulation and Results
### Bandwidth Estimation Online Learning  
The sender monitors ACKs to estimate the bandwidth. More precisely, the sender uses the ACK reception rate and the information an ACK conveys regarding the amount of data. We assume that sender receives the ACK at \(t_{k}\), \(t_{k-1}\) is the time the previous ACK was received, \(d_{k}\) bytes have been received at the receiver, so the bandwidth such is that:  
\[b_{k}=\frac{d_{k}}{t_{k}-t_{k-1}}\]  
Due to the effect of the wireless transmission link attenuation or noise, individual ACK time intervals have a greater volatility. Filter logic, which can filter out the noise leading to ACK delay, is very necessary. The choice of filtering logic is very important. According to the experiments, the simple exponential filter cannot effectively filter out the high frequency part. We propose a discrete-time low-pass filter:  
\[\hat{b}_{k}=\frac{\frac{2\tau}{t_{k}-t_{k-1}}-1}{\frac{2\tau}{t_{k}-t_{k-1}}+1} \hat{b}_{k-1}+\frac{b_{k}+b_{k-1}}{\frac{2\tau}{t_{k}-t_{k-1}}+1} \tag{26}\]  
where, \(\hat{b}_{k}\) is the effective bandwidth. At \(t_{k}\), \(\frac{1}{\tau}\) is the filtering threshold. This means that all frequency that are higher than \(\frac{1}{\tau}\) will be filtered. According to the Nyquist sampling theorem, the sampling period must be less than or equal to \(\frac{\tau}{2}\) when the bandwidth sampling is \(\frac{1}{\tau}\). As shown in Figure 7, we insert virtual sample values \(b_{k+j}=0\) (j = 0,1,..., n - 1 ), and when the ACK is not received at \(t_{k}\), and virtual sampling interval is \(\frac{\tau}{m}(\text{m}\geq 2)\), namely \(\hat{t}_{k+j+1}-\hat{t}_{k+j}=\frac{\tau}{m}\), \(\hat{t}_{k+j}\) is the virtual sampling time, when an ACK arrival moment is \(t_{k+n}\), \(b_{k+n}=\frac{d_{k+n}}{t_{k+n}-t_{k+n-1}}\)[49, 50, 51].  
In order to analyze the response time interval and network congestion status, the simulation scenario is shown in Figure 8, where TCP-Learning and the two constant bit rate (CBR) model of UDP share a 5 Mb bottleneck link. Buffer queue is set to 30 packets, and first come first served (FCFS) mode is used.  
Figure 7: inserting virtual sample.  
To analyze the dynamic data model, the TCP-Learning continues to send data over the entire timeline, and the corresponding relation of time and UDP events is shown in Table 2.  
The bottleneck bandwidth link is 5 Mb. Link delay is 35 ms. The overall simulation time is 300 s. The parameter settings of the simulation are shown in Table 3.  
The simulation results analysis is as follows: according to Table 2, during the 0\(\sim\)25 s, TCP-Learning only sends data in the link. As can be seen from Figures 9 and 10, when the bandwidth is 5 Mb, the time interval of ACK Keep is around 0.0023 s; during the 25\(\sim\)50 s, the first UDP link starts sending 1 Mb constant data, and the bandwidth is 4 Mb, and the time interval of ACK extends about 0.004 s; during the 50\(\sim\)75 s period, the second UDP link starts sending 1 Mb constant data, and the bandwidth becomes 2 Mb, and the time interval of ACK extends about 0.0058 s. As can be seen from the entire simulation process, the ACK interval can better reflect the current situation of the link bandwidth.  
\begin{table}
\begin{tabular}{c c} \hline
**Time** & **Events** \\ \hline
0 s & TCP–Learning send data \\
25 s & The first UDP link start sending 1 M constant data \\
50 s & The second UDP link start sending 1 M constant data \\
75 s & The second UDP link stop sending \\
125 s & The second UDP link restart \\
175 s & The second UDP link stop sending \\
200 s & The first UDP link stop sending \\
300 s & TCP-Learning stop sending \\ \hline \end{tabular}
\end{table}
Table 2: The corresponding relation of time and events.  
Figure 8: Network topology.