## 4 CL-APCC Protocol
### Network Congestion Control Methods
#### 4.1.2 The pre-control and adjustment method of system-level rate  
Now, we describe the system-level congestion control in detail (see Figure 6 for the flow chart of the system-level control method). Node \(i\) is analyzed in a certain grid \(k\). (The grid structure, period and A-type have been described in subsection 3.2). The A-type node has been set on promiscuous mode to record the rate \(\lambda_{i}^{k}\left(t\right),\mu_{i}^{k}\left(t\right)\) of the node \(i\) in grid \(k\) for average rate calculation \(\lambda_{avg}^{k}\left(t\right),\mu_{avg}^{k}\left(t\right)\). In order to conveniently adjust the average rate according to the local occupied memory resources \(E(t-1)\), as well as the average inputting and outputting rates in the previous period \(t-1\), CL-APCC predicts the occupied memory resources \(E(t)\) in period \(t\) and uses the relationship between \(E(t)\) and \(n\times L_{\max}\), as well as the ratio of \(E(t)\) and \(E(t-1)\) to decide the adjustment method of the average inputting and outputting rates in period \(t\), which avoids the occurrence of local congestion. At the beginning of the period \(t\), it is assumed that the number of nodes to transmit data in grid \(k\) is \(X(t)=n<N/k\) and the average rate is \(\lambda_{avg}^{k}\left(t\right)=\sum\limits_{i=1}^{n}\lambda_{i}^{k}\left(t \text{-}1\right)\middle/n\), \(\mu_{avg}^{k}\left(t\right)=\sum\limits_{i=1}^{n}\mu_{i}^{k}\left(t\text{-}1 \right)\middle/n\) ; if \(\leavevmode\ \textcircled{1}\) The probability that data inputted to grid \(k\) is in direct ratio with \(\Delta t\), recorded as \(b_{n}\times\Delta t\), inputting two or more data with a probability that is \(O(\Delta t)\), \(\leavevmode\ \textcircled{2}\) The probability that data outputted from grid \(k\) is in direct ratio with \(\Delta t\), recorded as \(d_{n}\times\Delta t\), outputting two or more data with a probability that is \(O(\Delta t)\). In order to analyze the change of the data quantity in the grid,, it first needs to get the mode of \(P_{n}(t)\)[41] which means that the event probability can be decompounded as:  
A. If \(X(t)=n-1\), input only one quantity of data in the grid within \(\Delta t\), so the probability is \(P_{n\text{-}1}(t)\times b_{n\text{-}1}\times\Delta t\);  
B. If \(X(t)=n+1\), output only one quantity of data in the grid within \(\Delta t\), so the probability is \(P_{n\text{-}1}(t)\times d_{n+1}\times\Delta t\);C. If \(X(t)=n\), there is not any inputting and outputting data in the grid within \(\Delta t\), the quantity of data hasn't changed, so the probability is \(P_{\mathrm{n}}(t)\)\(\times\)[\(1-d_{\mathrm{n}}\)\(\times\)\(\Delta t-b_{\mathrm{n}}\)\(\times\)\(\Delta t\)],  
According to the full probability Equation, we can see that:  
\[P_{n}\left(t+\Delta t\right)=P_{n-1}\left(t\right)\)\(\times\)\(b_{n-1}\)\(\times\)\(\Delta t+P_{n+1}\left(t\right)\)\(\times\)\(d_{n+1}\)\(\times\)\(\Delta t+P_{n}\left(t\right)\)\(\times\)\(\left(1-b_{n}\)\(\times\)\(\Delta t-d_{n}\)\(\times\)\(\Delta t\right)+O\left(\Delta t\right)\)  
The differential Equation of \(P_{n}(t)\) is:  
\[\frac{dP_{n}}{dt}=P_{n-1}\left(t\right)\)\(\times\)\(b_{n-1}\)\(+\)\(P_{n+1}\left(t\right)\)\(\times\)\(d_{n+1}\)\(-\)\(P_{n}\left(t\right)\)\(\times\)\(\left(b_{n}+d_{n}\right)\)  
It results that from Equation (9):  
\[\frac{dP_{n}}{dt}=P_{n-1}\left(t\right)\)\(\times\)\(\lambda_{\mathrm{agg}}^{k}\left(t\right)\)\(\times\)\(\left(n-1\right)\)\(+\)\(P_{n+1}\left(t\right)\)\(\times\)\(\mu_{\mathrm{agg}}^{k}\left(t\right)\)\(\times\)\(\left(n+1\right)\)\(-\)\(P_{n}\left(t\right)\)\(\times\)\(\left(\lambda_{\mathrm{agg}}^{k}\left(t\right)+\)\(\mu_{\mathrm{agg}}^{k}\left(t\right)\right)\)\(\times\)\(n\)  
Equation (10) is very complicated and with no easy solution value. Actually, we are only interested in the expectation value \(E(X(t))\) (namely \(E(t)\)) and variance of \(D(t)\).