Wireless Network
蛙读后感Experiment Three:
Queuing Theory
ABSTRACT
This experiment is designed to learn the fundamentals of the queuing theory. Mainly about the M/M/S and M/M/n/n queuing models.
KEY WORDS: queuing theory, M/M/s, M/M/n/n, Erlang B, Erlang C.
INTRODUCTION
A queue is a waiting line and queueing theory is the mathematical theory of waiting lines. More generally, queueing theory is concerned with the mathematical modeling and analysis of systems that provide rvice to random demands. In communication networks, queues are encountered everywhere. For example, the incoming data packets are randomly arrived
and buffered, waiting for the router 微信名字符号to deliver. Such situation is considered as a queue. A queueing model is an abstract description of such a system. Typically, a queueing model reprents (1) the茶的起源简单介绍 system's physical configuration, by specifying the number and arrangement of the rvers, and (2) the stochastic nature of the demands, by specifying the variability in the arrival process and in the rvice process.
The esnce of queueing theory is that it takes into account the randomness of the arrival process and the randomness of the rvice process. The most common assumption about the arrival process is that the customer arrivals follow a Poisson process, where the times between arrivals are exponentially distributed. The probability of the exponential distribution function is .
奶骑手法
●Erlang B model
One of the most important queueing models is the Erlang B model (i.e., M/M/n/n). It assumes that the arrivals follow a Poisson process and have a finite n rvers. In Erlang B model, it assumes that the arrival customers are blocked and cleared when all the rv
ers are busy. The blocked probability of a Erlang B model is given by the famous Erlang B formula,
where n is the number of rvers and A= is the offered load in Erlangs, is the arrival rate and is the average rvice time. Formula (1.1) is hard to calculate directly from its right side when n and A are large. However, it is easy to calculate it using the following iterative scheme:
●Erlang C model
The Erlang delay model (M/M/n) is similar to Erlang B model, except that now it assumes that the arrival customers are waiting in a queue for a rver to become available without considering the length of the queue. The probability of blocking (all the rvers are busy) i
s given by the Erlang C formula,
Where if and if . The quantity indicates the rver utilization. The Erlang C formula (1.3) can be easily calculated by the following iterative scheme
where is defined in Eq.(1.1).
DESCRIPTION OF THE EXPERIMENTS
1.Using the formula (1.2), calculate the blocking probability of the Erlang B model. Draw the relationship of the blocking probability PB(n,A) and off木腿正义ered traffic A with n = 1假睫毛胶水,2, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100. Compare it with the table in the text book (P.281, table 10.3).
From the introduction, we know that when the n and A are large, it is easy to calculate the blocking probability using the formula 1.2 as follows.
it u the theory of recursion for the calculation. But the denominator and the numerator of the formula both need to recurs() when doing the matlab calculation, it waste time and reduce the matlab calculation efficient. So we change the formula to be :
T科学教育hen the calculation only need recurs once time and is more efficient.
The matlab code for the formula is: erlang_b.m
%**************************************
% File: erlanb_b.m
% A = offered traffic in Erlangs.
% n = number of truncked channels.
% Pb is the result blocking probability.
%**************************************
吃蛋白粉function [ Pb ] = erlang_b( A,n )
if n==0
Pb=1; % P(0,A)=1
el
Pb=1/(1+n/(A*erlang_b(A,n-1))); % u recursion "erlang(A,n-1)"
end
end
As we can e from the table on the text books, it us the logarithm coordinate, so we also u the logarithm coordinate to plot the result. We divide the number of rvers(n) into three parts, for each part we can define a interval of the traffic intensity(A) bad on the figure on the text books :
1. when 0<n<10, 0.1<A<10.
2. when 10<n<20, 3<A<20.
3. when 30<n<100, 13<A<120.
For each part, u the “erlang_b” function to calculate and then u “loglog” function to figure the logarithm coordinate.
The matlab code is :
%*****************************************
% for the three parts.
% n is the number rvers.