## 4 Theoretical Analysis of Network Congestion Detection Based on Flow Watermarking
### Analysis of the SRW When Packet Delay Occurs  
Figure 4 shows an example of the distortion of watermark '00' when packet delay occurs. If the packets of the first interval are delayed to arrive at the second interval, and the packets of the third interval are delayed to arrive at the fourth interval. The decoder obtains that \(Y_{k2}\) is greater than the average value and \(Y_{k3}\) is less than the average value. The decoded watermark is '01'. Similarly, when packets carrying different watermarks face different delays, the decoder also obtains different error results. The following is a theoretical analysis of the SRW when packet delay occurs, and take \(Pr[(\overline{Y_{r2}^{f}}\geq 0)(\overline{Y_{r3}^{f}}<0)]\) when \(f=01\) as an example. After the packet delay occurs, \(X_{i,k}^{f}\) (\(i=1,2,3,4\)), \(\overline{Y_{r2}^{f}}\) and \(\overline{Y_{r3}^{f}}\) are defined as \(X_{i,k}^{F}\) (\(i=1,2,\) 3, 4), \(\overline{Y_{r2}^{f}}\) and \(\overline{Y_{r3}^{f}}\). Let \(D_{2,k}\) be the number of packets that \(X_{2,k}^{f}\) reduced and define \(\mu_{d2}\) and \(\sigma_{d2}\) as the mean and variance of \(D_{2,k}\), respectively. Let \(D_{3,k}\) be the number of packets that \(X_{3,k}^{f}\) increased and define \(\mu_{d3}\) and \(\sigma_{d3}\) as the mean and variance of \(D_{3,k}\), respectively. For network with many flows, the packet delays introduced by network congestion or delay jitter satisfy randomness drawn from a general distribution with a sufficiently large sample, so \(D_{2,k}\) and \(D_{3,k}\) satisfy _iid._ We have  
\[X_{2,k}^{F}=X_{2,k}^{f}-D_{2,k},X_{3,k}^{F}=X_{3,k}^{f}+D_{3,k},\overline{X_{ k}^{F}}=\frac{1}{4}\Big{(}X_{1,k}^{F}+X_{2,k}^{F}+X_{3,k}^{F}+X_{4,k}^{F} \Big{)} \tag{23}\]  
Therefore,  
\[E\Big{(}X_{2,k}^{F}\Big{)}=2u_{x}-u_{d2},E\Big{(}X_{3,k}^{F}\Big{)}=u_{d3} \tag{24}\]  
\[V\Big{(}X_{2,k}^{F}\Big{)}\leq 4\sigma_{x}^{2}+\sigma_{d2}^{2},V\Big{(}X_{3,k}^{ F}\Big{)}=\sigma_{d3}^{2} \tag{25}\]  
The maximum occurs when \(Corr(X_{2,k},D_{2,k})=0\). It follows that,  
\[E\Big{(}\overline{Y_{r2}^{F}}\Big{)}=\frac{1}{4}(4u_{x}-3u_{d2}-u_{d3}),V\Big{(} \overline{Y_{r2}^{F}}\Big{)}\leq\frac{1}{16r}\Big{(}70\sigma_{x}^{2}+17\sigma _{d2}^{2}+\sigma_{d3}^{2}\Big{)} \tag{26}\]  
Figure 4: An example of the distortion of watermark ‘00’ when packet delay occurs. \[E\Big{(}\overline{Y_{r3}^{F}}\Big{)}=\frac{1}{4}(u_{d2}+3u_{d3}-4u_{x}),V\Big{(} \overline{Y_{r3}^{F}}\Big{)}\leq\frac{1}{16\tau}\Big{(}6\sigma_{x}^{2}+\sigma_{ d2}^{2}+17\sigma_{d3}^{2}\Big{)} \tag{27}\]  
Using the central limit theorem, we obtain:  
\[P\Big{[}\overline{Y_{r2}^{F}}\geq 0\Big{]}\approx 1-\Phi\left(\frac{-E\Big{(} \overline{Y_{r2}^{F}}\Big{)}}{\sqrt{V\Big{(}\overline{Y_{r2}^{F}}\Big{)}}} \right)\geq 1-\[PERSON]\left(\frac{-\sqrt{\tau}(4\mu_{x}-3u_{d2}-u_{d3})}{\sqrt{70 \sigma_{x}^{2}+17\sigma_{d2}^{2}+\sigma_{d3}^{2}}}\right). \tag{28}\]  
Similarly  
\[P\Big{[}\overline{Y_{r3}^{F}}<0\Big{]}\approx\[PERSON]\left(\frac{-E\Big{(} \overline{Y_{r3}^{F}}\Big{)}}{\sqrt{V\Big{(}\overline{Y_{r3}^{F}}\Big{)}}} \right)\geq\[PERSON]\left(\frac{\sqrt{\tau}(u_{d2}+3u_{d3}-4u_{x})}{\sqrt{6\sigma_ {x}^{2}+\sigma_{d2}^{2}+17\sigma_{d3}^{2}}}\right). \tag{29}\]  
The SRW when packet delay occurs is  
\[P\Big{[}\Big{(}\overline{Y_{r2}^{F}}\geq 0\Big{)}\Big{(}\overline{Y_{r3}^{F}} <0\Big{)}\Big{]}\geq(1-\Phi(\frac{-\sqrt{\tau}(4\mu_{x}-3u_{d2}-u_{d3})}{ \sqrt{70\sigma_{x}^{2}+17\sigma_{d2}^{2}+\sigma_{d3}^{2}}}))\cdot\Phi(\frac{ \sqrt{\tau}(4u_{x}-u_{d2}-3u_{d3})}{\sqrt{6\sigma_{x}^{2}+\sigma_{d2}^{2}+17 \sigma_{d3}^{2}}}) \tag{30}\]  
Obviously, the SRW when packet delay occurs is significantly lower than the SRW without any interference. Because of packet delay, the difference between the number of packets in second interval and the average number in four intervals decreases, and the variance increases. Similarly, the difference between the number of packets in third interval and the average number increases, and the variance also increases.