Introduction

In the article, we present the diffusion model of the TCP NewReno transmission control where the congestion router implements an Active Queue Mechanism, based either on classical RED or fractional-order \(PI^\alpha\) controller. The AQM algorithms, recommended by IETF, enhance the efficiency of transfers and cooperate with TCP congestion window mechanism in adapting the intensity of flows to the congestion at a network [2]. They incorporate mechanisms of preventive packet dropping performed when there is still a place to store packets in the queue, to advertise that the queue is increasing and the danger of congestion is approaching. For most algorithms of this type, the packets are rejected randomly and the probability of packet dropping increases with the queue length. The basic active queue management algorithm is Random Early Detection (RED) algorithm proposed in 1993 [14]. Since then, numerous modifications to this algorithm have been discussed [22, 23, 41]. They differ in the way how the probability of the loss of packets is determined, a recently investigated option is to use in this purpose a \(PI^\alpha\) controller [24].

Our Contribution

The behavior of two AQM mechanisms applied to control Internet traffic is investigated. We compare in TCP transport protocol the basic RED algorithm and mechanism using a fractional-order controller. We explore the influence of parameters of the \(PI^\alpha\) controller on the queue length and evolution of the TCP congestion window. The second aim is to investigate the diffusion approximation perspectives for modeling TCP window changes.

A popular method for assessing the evolution of TCP congestion window is fluid flow approximation [29]. Therefore, we compare the proposed diffusion model with the other based on fluid flow approach. We are interested in diffusion model, because it gives also the distribution of the transport time, hence the information on the transmission jitter.

The remainder of the paper is organized as follows: section “Related works” describes the works related to this article. Section “RED and Non-integer order \(PI^\alpha\) controller” presents bases of RED and \(PI^\alpha\) controller. The fluid flow model is presented in the section “Fluid Flow model” and the basic notions of the diffusion approximation are presented in the section “Diffusion approximation”. Section “Diffusion approximation models of TCP NewReno mechanism” investigates the diffusion approximation model of TCP NewReno mechanism. Concluding remarks are presented in section “Conclusion”.

Related Works

The Active Queue Management mechanism is based on preventive packet dropping when there is still a place to store packets, the probability of packet rejection is increasing together with the level of congestion. Packets are dropped randomly, and hence, only chosen users are notified and the global synchronization of connections is avoided. A detailed discussion of the active queue management goals may be found in [2]. The AQM mechanism may be seen as part of a closed loop control of TCP/IP traffic intensity. The feedback control system includes the sender’s TCP congestion window increasing or decreasing the TCP flow as a function of losses in the queue of packets at a bottleneck router reacting to the changes in the input flow. AQM determines the loss probability which, in turn, after a certain delay, modifies the congestion window. Fluid flow modeling techniques were proposed to model the behavior of Internet traffic, e.g., [18, 19, 25], and they proved to be suitable for TCP traffic modeling [37]. Existing fluid flow models can simulate persistent TCP flows [31] and time-limited TCP flows [5]. The short-lived TCP flow, UDP flow, and XCP models have been presented in [1, 36]. Fluid network models with heterogenous flows were rarely investigated [31, 40]. In the last years, various AQM algorithms were proposed and studied [20, 21, 33]. Most of these studies were performed in a simulation environment. The analytical studies of AQM models are computationally complex, and hence, usually, they were investigated in open-loop scenario [4, 12, 26].

RED and Non-integer Order \(PI^{\alpha }\) Controller

The traffic control at TCP/IP is a classical closed loop control where the input signal, i.e., traffic intensity \(\lambda\) being sent is determined as a function of loss probability \(p_\mathrm{{loss}}\) witnessed at the queue of the congestion router between the sender and receiver. When \(p_\mathrm{{loss}} =0\), the traffic intensity is increased, and if \(p_\mathrm{{loss}} >0\), traffic intensity is decreased. With passive router queue losses start when the queue is full, with AQM, they start earlier anticipating the total congestion of the router.

In particular, RED algorithm determines dropping probability as a function of the weighted moving average avg acting as a low-pass filter and computed at the arrival of every packet; for the packet i:

$$\begin{aligned} \mathrm{{avg}} _i = (1-w)\mathrm{{avg}} _{i-1} + w q_i, \end{aligned}$$

where \(q_i\) is the queue seen by packet i and \(\mathrm{{avg}}_{i-1}\) is the moving average computed at arrival of previous packet. The loss probability for small values of avg is \(p_\mathrm{{RED}}=0\), and then, it is increasing linearly from 0 to \(p_{\max }\) between two thresholds \(\mathrm{{Min}}_{\rm th}\) and \(\mathrm{{Max}}_{\rm th}\):

$$\begin{aligned} P _\mathrm{{RED}}(\mathrm{{avg}})=p_{\max }\frac{{\mathrm{{avg}}} - \mathrm{{Min}}_\mathrm{{th}}}{\mathrm{{Max}}_\mathrm{{th}}-\mathrm{{Min}}_\mathrm{{th}}} \end{aligned}$$
(1)

and becomes \(p_\mathrm{{RED}}=1\) for \(\mathrm{{avg}} > \mathrm{{Max}}_\mathrm{{th}}\). Probability \(p_\mathrm{{loss}}\) may be also determined by a controller having as the input the “error”, i.e., the difference between the current queue \(q_{i}\) and a specified desired queue \(q_{0}\). This controller may be a classical PID one or, as it is investigated recently, a proportional-integral, \(PI^\alpha\) fractional non-integer order controller.

Fractional-Order Derivatives and Integrals (FOD/FOI) are a natural extension of the well-known integrals and derivatives. Differ-integrals of non-integer orders enable better and more precise control of physical processes [35].

In case of \(PI^\alpha\) controller, the loss probability \(p_i\) of a packet i is:

$$\begin{aligned} p_i=\max \{0,-(K_P e_i+K_I \Delta ^\alpha {e_i})\}, \end{aligned}$$
(2)

and it depends on the error \(e_i = q_i-q_0\), the proportional and integral terms \(K_P, K_I\), and the integration order \(\alpha\). The articles [6,7,8, 10] discuss their impact.

Packet drop probabilities are determined at discrete moments of packet arrivals; there is only one definition of discrete differ-integrals of non-integer order. This definition [28] is a generalization of the traditional definition of the difference of integer order to the non-integer order, and it is analogous to a generalization used in Grunwald–Letnikov (GrLET) formula [3, 34].

For a given sequence \(f_{0}, f_{1}, ..., f_{j}, ..., f_{k}\):

$$\begin{aligned} \triangle ^{\alpha } f_k=\sum _{j=0}^k(-1)^j {{\alpha }\atopwithdelims (){j}}{f_{k-j}}, \end{aligned}$$
(3)

where \(\alpha \in R\) is generally a non-integer fractional order, \(f_k\) is a differentiated discrete function, and \({{\alpha }\atopwithdelims (){j}}\) is generalized Newton symbol defined as follows:

$$\begin{aligned} {{\alpha }\atopwithdelims (){j}} = \left\{ \begin{array}{l l } 1 & {} \quad \text{ for } j=0\\ \displaystyle \frac{\alpha (\alpha -1)(\alpha -2)..(\alpha -j+1)}{j!}& {} \quad \text{ for } j=1, 2, \ldots \end{array} \right. \end{aligned}$$
(4)

Fluid Flow Model

Fluid flow model presented in [29] demonstrates TCP protocol dynamics. The model ignores the TCP timeout mechanisms and is based on the following nonlinear differential equation describing the evolution of the congestion window size [22]:

$$\begin{aligned} \frac{\mathrm{{d}}W_i(t)}{\mathrm{{d}}t}=\frac{1}{R_i(t)}-\frac{W_i(t)}{2} \frac{W_i(t-R(t))}{R_i(t-R_i(t))}p(t-R_i(t)). \end{aligned}$$
(5)

The next equation is related to the queue evolution of the congested router:

$$\begin{aligned} \frac{\mathrm{{d}}q(t)}{\mathrm{{d}}t}=\sum _{i=1}^{N}\frac{W_i(t)}{R_i(t)}-C, \end{aligned}$$
(6)

where \(W_i\) is the expected TCP congestion window size (expressed in packets) for a flow i, it defines how many packets may be sent without waiting for the acknowledgements of previous packets reception, \(R_i\) is the round-trip time, \(R_i= {q}/{C} + T_p\), the sum \(\sum \frac{W_i}{R_i}\) is the total input flow to the congestion router, q is the queue length in packets, C is the link capacity (packets/time unit), the constant output flow of the router, \(T_p\) is the propagation delay, N is the number of TCP sessions passing through the router, and p is the packet drop probability.

Equations (5) and (6) should be supplemented with additional one giving dropping probability, and it may be Eq. (1) or Eq. (2).

The maximum values of q and W depend on the buffer capacity and maximum window size. This fluid flow model may be extended to any network topology with any number of TCP flows [39]. The article [32] presents a numerical example for a real network topology with 134 023 nodes and 50 000 flows.

Diffusion Approximation

The method of diffusion approximation, e.g., [15,16,17, 30] replaces the number of customers in a queueing system N(t) which is a discrete value process by a continuous diffusion process X(t). The density function \(f(x,\ t;x_{0})\):

$$\begin{aligned} f(x,\ t;x_{0})\ dx=P[x\le X(t)\ <x+dx|X(0)=x_{0}] \end{aligned}$$
(7)

of X(t), determined by the diffusion equation:

$$\begin{aligned} \displaystyle \frac{\partial f(x,t;x_{0})}{\partial t}\ =\frac{\alpha }{2}\frac{\partial ^{2}f(x,t;x_{0})}{\partial x^{2}}-\beta \frac{\partial f(x,t;x_{0})}{\partial x} \end{aligned}$$
(8)

approximates the distribution of the number of customers in the system. Both processes, N(t) and X(t), have normal distribution of changes. In case of N(t), for a \(\mathrm {G}/\mathrm {G}/\mathrm {1}\) queueing system where A(x) and B(x) are the interarrival and service time distribution station, the mean and the variance of the changes observed in \(\Delta t\) are \((\lambda - \mu )\Delta t\) and \((\sigma _{A}^{2}\lambda ^{3}+\sigma _{B}^{2}\mu ^{3})\Delta t\), where \(E[A] =1/\lambda ,\) \(E[B] =1/\mu , Var[A] =\sigma _{A}^{2}\), \(Var[B] =\sigma _{B}^{2}\).

For the diffusion process, the mean and the variance of the changes in dt are \(\beta dt\) and \(\alpha dt\), where \(\alpha\) and \(\beta\) are the parameters of the diffusion equation. If we assume \(\beta = \lambda - \mu\), \(\alpha = \lambda ^{3} \sigma _{A}^{2} + \mu ^{3}\sigma _{B}^{2}\), both the processes have not only normally distributed changes, but the mean and the variance of these distributions depend in the same way on the observation time. The process N(t) is non-negative, and thus, also X(t) should be limited to \(x \ge 0\) by a barrier at \(x=0\). In case of a limited queue, e.g., in \(\mathrm {G}/\mathrm {G}/\mathrm {1}/\mathrm {L}\) station, the second barrier is introduced at \(x=L\) to limit the diffusion process to the interval [0, L]. As it was proposed by Gelenbe [15], we apply here the absorbing barriers with instantaneous jumps: when the process comes to \(x = 0\), it is absorbed by the barrier, and then, after a certain time, jumps to \(x = 1\). Similarly, if X(t) comes to \(x=L\), it is absorbed and then jumps to \(x = L-1\). The time spent in barriers corresponds to the idle time or to saturation time of the system. The diffusion equation with two barriers has the form:

$$\begin{aligned} \frac{\partial f(x,t;x_{0})}{\partial t}= & {} \frac{\alpha }{2}\frac{\partial ^{2}f(x,t;x_{0})}{\partial x^{2}} -\beta \frac{\partial f(x,t;x_{0})}{\partial x} \nonumber \\&+\lambda p_{0}(t)\delta (x-1)\ + \lambda p_{L}(t) \delta (x - L + 1) ,\nonumber \\ \frac{dp_{0}(t)}{dt}= & {} \lim _{x\rightarrow 0}\left[ \frac{\alpha }{2}\frac{\partial f(x,t;x_{0})}{\partial x} -\beta f(x,\ t;x_{0})\right] -\lambda p_{0}(t)\ , \nonumber \\ \frac{dp_{L}(t)}{dt}= & {} \lim _{x\rightarrow L}\left[ \frac{\alpha }{2}\frac{\partial f(x,t;x_{0})}{\partial x} -\beta f(x,\ t;x_{0})\right] -\lambda p_{L}(t), \end{aligned}$$
(9)

where: \(p_{0}(t) = P[X(t)\ =\ 0]\), \(p_{L}(t) = P[X(t) = L]\).

Of course, in case of \(\mathrm {G}/\mathrm {G}/\mathrm {1}\), model terms related to \(p_L\) are omitted, as there is only one barrier at \(x = 0\). The steady-state solution of Eq. (9) is relatively straightforward and has the form of exponential functions, different in intervals [0, 1], \([1, L-1]\), \([L-1, L]\) with \(p_0\) and \(p_L\) given by normalization, see [15]. In case of transient states, as applied here, we use a solution in the form of Laplace transform presented in [38] which is then inverted numerically. The solution of the diffusion process with jumps from the barriers is expressed as a convolution of solutions obtained for purely absorbing barriers and the intensity of jumps is given by balance equations for flows coming and leaving the barriers.

These \(\mathrm {G}/\mathrm {G}/\mathrm {1}\) and \(\mathrm {G}/\mathrm {G}/\mathrm {1}/\mathrm {L}\) models are valid for transient behavior, but assume constant parameters \(\alpha , \beta\). To include time-varying model parameters (e.g., for \(\lambda = \lambda (t)\)), we should divide the time axis into short periods where the parameters of the model are constant. In this approach, the results obtained at the end of a period serve as the initial condition for the next period.

Diffusion Approximation Models of TCP NewReno Mechanism

Here, we propose a diffusion approximation model of the TCP NewReno connection having an intermediate router with AQM (\(PI^\alpha\) or RED) policy. Diffusion approximation gives the router queue distribution at time t. Its mean value modifies the probability of packet rejection. This probability changes the input stream intensity \(\lambda\), as the congestion window is increased by one in the case of lossless transmission or is halved in the case of a packet loss.

As in fluid flow model, we assume that the flow \(\lambda\), the size of the congestion window W, and the delay \(q/\mu\) of the router are linked together in the following way:

$$\begin{aligned} \lambda = \frac{W \mu }{q}, \end{aligned}$$
(10)

where \(1/\mu\) is mean service time. The diffusion model is performed calculations are carried out inside intervals of the length \(\Delta t = 1/\lambda\). As \(\lambda\) is changing, the length of the interval is also changing. We obtain a queue distribution at time \(t_i\) at the end of the interval i. Based on it, we have the average queue length \(E[q_i]\) and then the probability of packet rejection \(p_i\) which due to AQM algorithm defines new value of \(\lambda\), \(\lambda _{i+1} = \lambda _i + \Delta \lambda _i\), where

$$\begin{aligned} \Delta \lambda _i=\frac{\mu _i}{E[q_{i}]}-\frac{\lambda _{i}^2}{2}\frac{E[q_i]}{\mu } p_{i} . \end{aligned}$$
(11)

In the time \(t_{i+1} = t_i + 1/\lambda _i\), we repeat the calculations for new value of \(\lambda\).

The changes to \(\Delta \lambda\) in the time t depend on the source intensity, dispatching time, and queue length.

In numerical examples, we use the G / G / 1 / 30 model, and the length of the buffer \(L=30\) is enough to neglect full congestion probability. We only consider losses due to the AQM mechanism. Below, we compare the results obtained by the proposed solution with the results obtained by the fluid flow method. Both models give similar results. The advantage of the proposed diffusion model compared to fluid flow one is the ability to obtain more detailed results concerning transmission time. In this new model, we have the distribution of the queue, and in fluid flow approximation, we have only its mean value. The distribution of the queue size \(f(n,t, n_0)\) allows us to compute the density function r(tx) of the router delay:

$$\begin{aligned} r(t,x) = \sum _{n=0}^{L} f(n,r; n_0)b(x)^{(n+1)*}, \end{aligned}$$
(12)

where \(i^*\) denotes the i-fold convolution and b(x) is probability density function of the service time distribution, and this way the information on the jitter of the transmission time.

Fig. 1
figure 1

Mean queue and congestion \(\rho =\lambda /\mu\), diffusion approximation (left), fluid flow (right), \(PI^{\alpha }\): \(K_P = 0.0001\), \(K_I = 0.0014\), \(\alpha = -0.8\)

Fig. 2
figure 2

Mean queue and congestion \(\rho =\lambda /\mu\), diffusion approximation (left), fluid flow (right), \(PI^{\alpha }\): \(K_P = 0.0001\), \(K_I = 0.005\), \(\alpha = -0.4\)

Fig. 3
figure 3

Mean queue and congestion \(\rho =\lambda /\mu\), diffusion approximation (left), fluid flow (right), \(PI^{\alpha }\): \(K_P = 0.0001\), \(K_I = 0.0004\), \(\alpha\) is changing in the range \([-0.1, -0.9]\)

Fig. 4
figure 4

Mean queue and congestion \(\rho =\lambda /\mu\), diffusion approximation (left), fluid flow (right), RED: \(w = 0.1, p_{max}= 0.04\)

Fig. 5
figure 5

Mean queue and congestion \(\rho =\lambda /\mu\), diffusion approximation (left), fluid flow (right), RED: \(w = 0.08\), \(p_{max}\) is changing in the range [0.01, 0.09]

Figures 12,  3 refer to \(PI^\alpha\) controller display the behavior of the AQM queue due to changes of the congestion window and the evolution of congestion \(\rho =\lambda /\mu\) itself for selected sets of parameters \(K_P\), \(K_I\), \(\alpha\). They visualize the similarity of results obtained by fluid flow and diffusion approximations. Figure 1 displays the system behavior in the case of a “strong”, i.e., giving relatively high loss probability and low queue length. In this case, the queue size tends to ten packets. The controller in Fig. 2 is weaker. In its steady state, the mean size of the queue is around 11 packets. Figure 3 presents the influence of \(\alpha\) on the queue length. The queue decreases as the integral order increases. The same may be observed for the RED algorithm. The queue size decreases as the parameter \(p_{max}\) increases (Fig. 4). Figure 5 illustrates the influence of \(p_{max}\) in RED.

Tables 1,  2 show the obtained average queue lengths. The detailed results also show small differences between the results obtained with both methods.

Table 1 Average queue length, \(PI^{\alpha }\):\(K_P = 0.0001\), \(K_I = 0.0004\)
Table 2 Average queue length, RED: \(w = 0.08\)

The results of the \(PI^\alpha\) controller presented in Table 1 show the influence of the parameter \(PI^\alpha\) on the average queue length. Increasing the integration order decreases the average queue size. The mean queue length depends on the integral order and oscillates between 10 and 18 packets. It is associated with a significant increase in the probability of a packet loss. The same relationship is clearly visible both for the fluid flow method and diffusion \(\mathrm {G}/\mathrm {G}/\mathrm {1}/\mathrm {L}\) queue. Table 2 presents the results of the for the RED mechanism. The increasing of \(P_{max}\) results in a reduction of the average queue length. The reasons for these results are the same as in the case of the \(PI^\alpha\) controller. In the case of RED, the mean queue oscillates between 11 and 17 packets.

The results show that the parameters \(\alpha\) and \(P_{\max }\) strongly influence the behavior of the \(PI^\alpha\) and RED controllers. The problem of the choice of parameters is still discussed, see, e.g., [13, 27]. The influence of the \(PI^\alpha\) parameters on the queue behavior was shown in [6, 9,10,11]. These articles describe also the advantages of \(PI^\alpha\) controllers, associated with a larger number of variable control parameters.

Conclusions

In the article, we present two models of the TCP/AQM mechanism which are based on diffusion approximation. The AQM algorithm is either RED or \(PI^\alpha\) controller. The results of the diffusion models are compared with the output of often used fluid flow approximation models. We note a significant similarity of the results for the various RED and \(PI^\alpha\) parameters. Diffusion approximation approach gives more detailed information on the transmission delays: not only mean values, but whole distributions of these times. Therefore, we consider the proposed here model as a useful tool in TCP/IP control evaluation. In future work, we will consider more realistic Internet case studies.