Anda di halaman 1dari 5

UNIVERSIDAD NACIONAL DE CHIMBORAZO

CARRERA DE INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES

Nombre: Jonathan Obando Fecha: 21/05/2019

Semestre: Octavo “A”

UNIVERSIDAD NACIONAL DE
VERSIÓN: 1
CHIMBORAZO
FACULTAD DE INGENIERIA
Página 1 de 5
GUÍA DE PRÁCTICAS

PERIODO ACADÉMICO ABRIL 2019 – AGOSTO 2019


CARRERA: ELECTRÓNICA Y DOCENTE: Ing. José Jinez SEMESTRE: Octavo
TELECOMUNICACIONES PARALELO: A
NOMBRE DE LA ASIGNATURA: CÓDIGO DE LA ASIGNATURA: LABORATORIO A UTILIZAR: AULA
Telefonía Digital EET83

Práctica No. Tema: Tráfico telefónico Duración No. Grupos No. Estudiantes (por Grupo)
(horas)
Individual
4
2

Objetivos de la Práctica: Conocer el procedimiento de como calcular el tráfico telefónico

Equipos, Materiales e Insumos: Computadora, MATLAB

Procedimiento:
1. Abrir Matlab.
2. Creamos un nuevo script.
3. Creamos una función que se llame erlangb en la cual se calculara la probabilidad de bloqueo para esta
práctica.
4. Generamos una variable “lambda” que va desde 0 a 0.0065 con saltos de 0.0001, que serán las
llamadas por segundo.
5. Creamos una variable “d” que será la duración media de la llamada.
6. Generamos la intensidad de tráfico multiplicando la duración media por las llamadas por segundo.
7. Por último, enviamos los valores obtenidos a la función que se encarga de procesar la probabilidad de
bloqueo para n=1; n=2 n=3; n=4 canales.
Resultados:
% ex1.m example for erlangb function
close all
clear all
lambda=0:0.0001:0.0065; % mean arrival rate (calls per second)
d=200; % mean duration (seconds per call)
a = lambda.*d; % traffic intensity in Erlangs
n = 1;

TELEFONÍA DIGITAL – UNIDAD 1 Ing. José Luis Jinez


UNIVERSIDAD NACIONAL DE CHIMBORAZO
CARRERA DE INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES

b = erlangb(n, a); % n channels/servers


ii=find(b<0.1);
plot(a(ii), b(ii), 'b')
hold on
n = 2;
b = erlangb(n, a); % n channels/servers
ii=find(b<0.1);
plot(a(ii), b(ii), 'g')
n = 3;
b = erlangb(n, a); % n channels/servers
plot(a, b, 'r')
n = 4;
b = erlangb(n, a); % n channels/servers
plot(a, b, 'k')
legend('1', '2', '3', '4')
xlabel('Traffic Intensity (Erlangs)');
ylabel('Blocking Probability');
title('Erlang B formula');
plot(a, 0.02, ':k') % 2% line

------------------------------------------------------------------------------------------------------------------------------------------------

ERLANGB

function B = erlangb(N, A)
% ERLANGB Erlang-B blocking probability of a telecommunications systems
% with n servers (channels) and a traffic intensity a
% where ...
% a is lambda * d.
% lambda is average call arrival rate (call/s).
% d is average call duration (s/call). (note: most textbooks talk in terms of mu =
1/d)
%
% elements of a must be real and positive
% n must be a scalar positive integer. However, n = 0 yields the
% (trival) result of 100% blocking irrespective of traffic intensity.
% Reference: "Telecommunications Networks", by Mischa Schwartz, ISBN 0-201-16423-X
%
% Rule of thumb #1: Subscribers can tolerate a busy hour (i.e. peak) blocking
% probability of no more than 2% (landline) to 5% (mobile)
% example:
% lambda=0:0.0001:0.0065; % mean arrival rate (calls per second)
% d=200; % mean duration (seconds per call)
% a = lambda.*d;
% b = erlangb(4, a); % n=4 channels
% plot(a, b)
% The plot shows 2% blocking occurs at approx a=1.1
% The number of subscribers supported is a / m,
% where m is the busy hour intensity for per subscriber.
%
% Rule of thumb #2: m = ~20% for land lines and ~4% for mobile
% example: b=0.02, n=4 (==> a=1.1), m=0.05 supports ~22 subscribers
%
% Rule of thumb #3: Average intensity (~proportional to metered revenue) is
% one fifth of busy hour intensity i.e. 0.2*a.

TELEFONÍA DIGITAL – UNIDAD 1 Ing. José Luis Jinez


UNIVERSIDAD NACIONAL DE CHIMBORAZO
CARRERA DE INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES

% In the USA, local loops avg ~60 MOU (minutes of use) per day per subscriber.
% However, usage is increasing with popularity of the Internet.
% In the USA, wireless access avg ~12 MOU per day per subscriber,
% again increasing as the price/min drops.
% SEE ALSO INVERLANGB ("inverse" Erlang B) to calculate intensity for given n and
b
% This code is freeware as defined by Free Software Foundation "copyleft"
agreement. (C)2000 Colin Warwick
% Comments, bugs, MRs to cwarwick@home.com. Offered "as is". No warranty express
or implied.
% version 2000-Sep-10
if (length(N)~=1) | (fix(N) ~= N) | (N < 0)
error('N must be a scalar positive integer');
end
% TODO: test that elements of A are real and positive here?
esum = zeros(size(A));
for ii=0:N
esum = esum + A .^ ii ./ factorial(ii);
end
B = A .^ N ./ (factorial(N) .* esum);

------------------------------------------------------------------------------------------------------------------------------------------------
ERLANGBPRIME

function eprime = erlangbprime(N, A)


% eprime = ERLANGBPRIME(N, A) 1st derivative of Erlang-B blocking probability with
respect to
% a (traffic intensity in Erlangs)
% Mainly a helper function for Newton-Raphson method used in INVERLANG
% This code is freeware as defined by Free Software Foundation "copyleft"
agreement. (C)2000 Colin Warwick
% Comments, bugs, MRs to cwarwick@home.com. Offered "as is". No warranty express
or implied
% version 2000-Sep-10
if (length(N)~=1) | (fix(N) ~= N) | (N < 1)
error('N must be a scalar positive integer');
end
% TODO: test that elements of A are real and positive here?
u = A .^ N;
uprime = N * A .^ (N-1);
v = zeros(size(A));
for ii=0:N
v = v + A .^ ii ./ factorial(ii);
end
vprime = zeros(size(A));
for ii=1:N
vprime = vprime + ii .* A .^ (ii-1) ./ factorial(ii);
end
% d(u/v)/dx = (v*du/dx - u*dv/dx)/v^2
eprime = (v .* uprime - u .* vprime) ./ (factorial(N) .* v .^ 2);

------------------------------------------------------------------------------------------------------------------------------------------------
INVERLANGB
function A = inverlangb(N, B)

TELEFONÍA DIGITAL – UNIDAD 1 Ing. José Luis Jinez


UNIVERSIDAD NACIONAL DE CHIMBORAZO
CARRERA DE INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES

% INVERLANGB inverse Erlang-B. Newton-Raphson iteration of traffic intensity


% A is the traffic intensity in Erlangs
% B is the blocking probability
% N is the number of channels (must be a positive integer)
% Example:
% a = [];
% b = 0.04
% n=1:12
% for ii=n(1):n(12)
% a(ii) = inverlangb(ii, b); % inverlangb not vectorized in this release
% end
% plot(n, a)
%
% see also ERLANGB ERLANGBPRIME
% References: Erlang: "Telecommunications Networks", by Mischa Schwartz, ISBN 0-
201-16423-X
% Newton-Raphson: "Advanced Engineering Mathematics", by Erwin Kreyszig, ISBN 0-
471-55380-8
% This code is freeware as defined by Free Software Foundation "copyleft"
agreement. (C)2000 Colin Warwick
% Comments, bugs, MRs to cwarwick@home.com. Offered "as is". No warranty express
or implied
% version 2000-Sep-10
if (length(N)~=1) | (fix(N) ~= N) | (N < 0)
error('N must be a scalar positive integer');
end
if (length(B)~=1) | (B < 0)
error('B must be a scalar & positive');
end
% TODO: It would be neat to vectorize with respect to N or B (e.g. for plots)
if (B == 0) | (N == 0)
A = 0; % weed out some trival, but awkward, cases
else
An=N; %initial guess (aim high)
fn=erlangb(N, An)-B;
for ii=1:1000
fprimen = erlangbprime(N, An);
if fprimen == 0
error('fprimen == 0')
end
Anplus1 = An - fn/fprimen;
if abs(Anplus1-An) < eps*10
break
end
if Anplus1 > 0
An=Anplus1; % don't allow An to go negative
else
An=N*rand(1,1); %try another guess
end
fn=erlangb(N, An)-B;
if ii == 1000
error('no convergence in 1000 loops')
end
end
A=Anplus1;
end

TELEFONÍA DIGITAL – UNIDAD 1 Ing. José Luis Jinez


UNIVERSIDAD NACIONAL DE CHIMBORAZO
CARRERA DE INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES

Anexos:

Referencias bibliográficas: Sistemas electrónicos de comunicaciones


https://la.mathworks.com/matlabcentral/fileexchange/192-erlangb

TELEFONÍA DIGITAL – UNIDAD 1 Ing. José Luis Jinez

Anda mungkin juga menyukai