Sunteți pe pagina 1din 21

UNIVERSIDAD CATLICA BOLIVIANA

SAN PABLO
LA PAZ - BOLIVIA

PLANIFICADOR
DE
FRECUENCIAS
Estudiantes:
MANUEL IBIETA
RODRIGO URUCHI
GABRIELA VILCHES
Docente:
ING. JOSE CAMPERO
Materia:
TELECOMUNICACIONES MOVILES
Fecha de Entrega:
11 DE MARZO DE 2016

LA PAZ BOLIVIA

INFORME DE LABORATORIO
PLANIFICADOR DE FRECUENCIAS
1. Introduccin
La telefona mvil es una comunicacin cuando por lo menos un nodo se
desplaza, ha crecido bastante a lo largo de los aos y en muy poco tiempo, debido
a la movilidad que ofrece y la rebaja de precios en comparacin con la telefona
fija.
Sin embargo por el crecimiento que la telefona mvil tiene exige un gran problema
que es la capacidad de canales que no soporta a tantos usuarios, por lo que a lo
largo de los aos se empez a mejorar estas redes mviles dando paso a la
primera generacin (1G) pasando por 2G y finalmente hasta la actualidad llegando
a 4G LTE.
Para el diseo de una red de comunicaciones mviles se hace un estudio
profundo del rea de cobertura, adems se debe segn cada tecnologa cuntos
clusters se utilizar y cuantas frecuencias se debe utilizar segn el requerimiento
del rea de cobertura.
Por esta razn este laboratorio se basar en realizar un sistema experto que
calcule cuantas frecuencias se utilizar en un rea de cobertura, cuantos clusters
se usar, tomando en cuenta la tecnologa que utilizaremos.
2. Marco terico
La tecnologa mvil tuvo una evolucin pasando desde 1G hasta 4G LTE.
La primera generacin 1G usa frecuencias que van de 800MHz a 900MHz y tiene
un ancho de banda (BW) de 25MHz; utiliza conmutacin de circuitos y se modula
en FM con 10KHz en banda estrecha y en banda normal 30KHz. Su BW se divide
en 2 una que es la banda A y la otra que es la banda B.

La segunda generacin (2G) tambin conocida como GSM nace en Europa,


realizando una mejora a la anterior generacin, cubriendo las necesidades del
usuario en esa poca. Esta generacin utiliza conmutacin de circuitos y evita la
clonacin, definiendo el uso del chip o SIM CARD y mejora el roaming, tambin
incluye una mejora importante que hace que los dispositivos sean mucho ms
baratos y es compatible con RDSI.
Tiene 200KHz de subportadoras y es remodulada TDM, tiene base de datos que
utilizan plataforma Oracle, los sistemas de Radio Base van desde los 320mW
hasta las 2.5W.
Utiliza FDMA y TDMA aumenta la capacidad y mejora las prestaciones que tiene
esta generacin respecto a la anterior, administra mejor las frecuencias de uso y
en su reutilizacion.
Estructura celular
La estructura celular es llamada de esta manera debido a que est divida por
celdas, que son hexagonales y permite cubrir un Area de servicio sin huecos, esto
permite a que se use bien el Area de cobertura.
Existen distintos tipos de celdas:

Pico celdas: usualmente usadas en edificios y cuando hay alta densidad de

trfico.
Micro celdas: (400m a 2km) para zonas urbanas, es parecida a la pico

celda pero con ms alcance.


Macro celdas: (2 a 20km) para cubrir reas externas.

Dimensionamiento de celdas
Se debe asignar a una celda una frecuencia por medio de divisin de frecuencias
(15MHz de Uplink y 15MHz de Downlink).
Para dimensionar las celdas se debe tomar en cuenta varios factores que son:

Radio de cobertura (cubrir toda la demanda del rea).


Nmero de usuarios que atender la celda.
Juego de frecuencias que utilizaremos.
Eficiencia entre seal a capacidad de canales por unidad de superficie.

Cluster
Un cluster es una agrupacin de ellas (son un nmero determinado de celdas,
debe ser un nmero rombico) te permite repetir el patrn de manera indefinida.
Las agrupaciones que se puede utilizar son J-1, J-3, J-7, J-12.
Los cluster se pueden dividir en C canales, o en J celdas.
MATLAB
MATLAB (abreviatura de MATrix LABoratory, "laboratorio de matrices") es una
herramienta de software matemtico que ofrece un entorno de desarrollo integrado
(IDE) con un lenguaje de programacin propio (lenguaje M). Est disponible para
las plataformas Unix, Windows, Mac OS X y GNU/Linux.
Entre sus prestaciones bsicas se hallan: la manipulacin de matrices, la
representacin de datos y funciones, la implementacin de algoritmos, la creacin
de interfaces de usuario (GUI) y la comunicacin con programas en otros
lenguajes y con otros dispositivos hardware. El paquete MATLAB dispone de dos
herramientas adicionales que expanden sus prestaciones, a saber, Simulink
(plataforma de simulacin multidominio) y GUIDE (editor de interfaces de usuario GUI). Adems, se pueden ampliar las capacidades de MATLAB con las cajas de
herramientas (toolboxes); y las de Simulink con los paquetes de bloques
(blocksets).
Es un software muy usado en universidades y centros de investigacin y
desarrollo. En los ltimos aos ha aumentado el nmero de prestaciones, como la
de programar directamente procesadores digitales de seal o crear cdigo VHDL.

La plataforma de MATLAB est optimizada para resolver problemas de ingeniera


y cientficos. El lenguaje de MATLAB, basado en matrices, es la forma ms natural
del mundo para expresar las matemticas computacionales. Los grficos
integrados facilitan la visualizacin de los datos y la obtencin de informacin a
partir de ellos. Una vasta librera de toolboxes preinstaladas le permiten empezar a
trabajar inmediatamente con algoritmos esenciales para su dominio. El entorno de
escritorio invita a experimentar, explorar y descubrir. Todas estas herramientas y
prestaciones de MATLAB estn probadas y diseadas rigurosamente para trabajar
juntas.
3. Objetivos
3.1. Objetivo general
Realizar un sistema experto elemental que sea capaz de planificar la
distribucin de frecuencias para un sistema de telefona mvil celular.
3.2. Objetivos especficos
El proyecto usar la plataforma de MATLAB para realizar el clculo de

frecuencias.
Realizar un mtodo de entrada de variables fcil y comprensible para el

usuario.
Desplegar un mensaje de error si es que se introduce un dato erroneo.
Desplegar una advertencia si en el resultado hay algn valor exagerado o

muy pequeo.
Realizar un mtodo de entrada al usuario para que escoges tecnologa 1G

o 2G.
Validar el valor J de agrupacin de celdas.
Desplegar los resultados de:
Numero de subportadoras
Distancia de reutilizacion
Area del cluster
Area total cubierta por la red
Relacin de proteccin Rp, nmero de canales por sector, por celda, por
cluster y por rea de servicio.
4. Especificaciones
El programa pedir que se ingresen los siguientes datos:

Tecnologa
Se podr escoger entre 1G o 2G
Ancho de Banda
Si la tecnologa escogida es 1G el valor de ancho de banda ser fijo
en 10 MHz, mientras que si es 2G el valor de ancho de banda se
podr elegir entre 15 MHz o 25 MHz, ancho de banda Boliviano o

Europeo respectivamente.
N de Sectores
Se podr elegir entre 1 o 3 sectores (como estipula la gua de
laboratorio)
Radio de cobertura
Se ingresar el valor en Km.
Valor del Cluster
Se ingresar J que sera validado si es o no un numero rombico.
Path Loss Slope
Se ingresar el valor n entre 2,7 y 5 que ser validado.
Factor de Reutilizacion
Se ingresar Q que es el factor de reutilizacin (N de clusters por
rea de servicio)

5. Codigo Utilizado
El cdigo utilizado es el siguiente:
function varargout = sinerror(varargin)
% SINERROR MATLAB code for sinerror.fig
%
SINERROR, by itself, creates a new SINERROR or raises the existing
%
singleton*.
%
%
H = SINERROR returns the handle to a new SINERROR or the handle to
%
the existing singleton*.
%
%
SINERROR('CALLBACK',hObject,eventData,handles,...) calls the local
%
function named CALLBACK in SINERROR.M with the given input
arguments.
%
%
SINERROR('Property','Value',...) creates a new SINERROR or raises
the
%
existing singleton*. Starting from the left, property value pairs
are
%
applied to the GUI before sinerror_OpeningFcn gets called. An
%
unrecognized property name or invalid value makes property
application
%
stop. All inputs are passed to sinerror_OpeningFcn via varargin.
%
%
*See GUI Options on GUIDE's Tools menu. Choose "GUI allows only
one
%
instance to run (singleton)".
%

% See also: GUIDE, GUIDATA, GUIHANDLES


% Edit the above text to modify the response to help sinerror
% Last Modified by GUIDE v2.5 10-Mar-2016 21:40:13
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',
mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @sinerror_OpeningFcn, ...
'gui_OutputFcn', @sinerror_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback',
[]);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before sinerror is made visible.


function sinerror_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject
handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% varargin
command line arguments to sinerror (see VARARGIN)
% Choose default command line output for sinerror
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes sinerror wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = sinerror_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject
handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;

function r_Callback(hObject, eventdata, handles)


% hObject
handle to r (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of r as text
%
str2double(get(hObject,'String')) returns contents of r as a
double

% --- Executes during object creation, after setting all properties.


function r_CreateFcn(hObject, eventdata, handles)
% hObject
handle to r (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function j_Callback(hObject, eventdata, handles)


% hObject
handle to j (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of j as text
%
str2double(get(hObject,'String')) returns contents of j as a
double

% --- Executes during object creation, after setting all properties.


function j_CreateFcn(hObject, eventdata, handles)
% hObject
handle to j (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function n_Callback(hObject, eventdata, handles)


% hObject
handle to n (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of n as text
%
str2double(get(hObject,'String')) returns contents of n as a
double

% --- Executes during object creation, after setting all properties.


function n_CreateFcn(hObject, eventdata, handles)
% hObject
handle to n (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function q_Callback(hObject, eventdata, handles)


% hObject
handle to q (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of q as text
%
str2double(get(hObject,'String')) returns contents of q as a
double

% --- Executes during object creation, after setting all properties.


function q_CreateFcn(hObject, eventdata, handles)
% hObject
handle to q (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on key press with focus on j and none of its controls.
function j_KeyPressFcn(hObject, eventdata, handles)

global j
letra=get(gcf,'CurrentCharacter'); % detecta la letra digitada
letra=double(letra);
palabra=get(handles.j,'UserData'); % vector de datos de usuario
%--------------------------------------------------------------------------------if letra ~= 8
palabra=[palabra,letra] % agrego la letra a la palabra
elseif length(palabra)~= 0
palabra(end) = [];
end
%------------------------------------------------------------------------------------------set(handles.j,'UserData',palabra);
%Esto hace mas o menos lo que hace el if de arriba, pero lo otro da menos
%problemas
% buscarBorrados = find(palabra == 8);
% palabra(buscarBorrados) = [];
palabra=char(palabra) % los datos numricos son convertidos en letras
j=str2num(palabra);
%------------------------------------------------------------------------------------------------------------%Ahora nos Enfocaremos en J y en verificar que el numero sea rombico
%el algoritmo crea en un vector numeros rombicos
op = 1;
j2=[];
i=1;
for x=0:10
for y=1:10
j2(i)=(x^2)+(y^2)+(x*y);%formula de nros rombicos
%disp(j2(i));
i=i+1;
end
end
%---------------------------------for f=1:length(j2)
if j==j2(f)
op = 2;
if j2==0
op = 1;
end
end
end

%---------------------------------------set(handles.pruebaJ,'string',j);
if op==2

set(handles.j,'ForegroundColor',[0 0 0]);
set(handles.mensajeJ,'ForegroundColor',[0 1 0]);
set(handles.mensajeJ,'string','Numero rombico comprobado');
else
set(handles.j,'ForegroundColor',[1 0 0]);
set(handles.mensajeJ,'ForegroundColor',[1 0 0]);
set(handles.mensajeJ,'string','ERROR! Debe ingresar un numero
rombico');
end
% hObject
handle to j (see GCBO)
% eventdata structure with the following fields (see UICONTROL)
%
Key: name of the key that was pressed, in lower case
%
Character: character interpretation of the key(s) that was pressed
%
Modifier: name(s) of the modifier key(s) (i.e., control, shift)
pressed
% handles
structure with handles and user data (see GUIDATA)

% --- Executes on key press with focus on n and none of its controls.
function n_KeyPressFcn(hObject, eventdata, handles)
global n;
letra=get(gcf,'CurrentCharacter'); % detecta la letra digitada
letra=double(letra);
palabra=get(handles.n,'UserData'); % vector de datos de usuario
%--------------------------------------------------------------------------------if letra ~= 8
palabra=[palabra,letra] % agrego la letra a la palabra
elseif length(palabra)~= 0
palabra(end) = [];
end
%------------------------------------------------------------------------------------------set(handles.n,'UserData',palabra);
%Esto hace mas o menos lo que hace el if de arriba, pero lo otro da menos
%problemas
% buscarBorrados = find(palabra == 8);
% palabra(buscarBorrados) = [];
palabra=char(palabra) % los datos numricos son convertidos en letras
n=str2num(palabra);
op = 1;
if 2.7 <= n
if n <= 5
op = 2;
end
end
set(handles.pruebaN,'string',n);
if op==2
set(handles.n,'ForegroundColor',[0 0 0]);
set(handles.mensajeN,'ForegroundColor',[0 1 0]);
set(handles.mensajeN,'string','Valor de n comprobado');

else
set(handles.n,'ForegroundColor',[1 0 0]);
set(handles.mensajeN,'ForegroundColor',[1 0 0]);
set(handles.mensajeN,'string','ERROR! n debe estar entre

2.7 y 5');
end
% hObject
handle to n (see GCBO)
% eventdata structure with the following fields (see UICONTROL)
%
Key: name of the key that was pressed, in lower case
%
Character: character interpretation of the key(s) that was pressed
%
Modifier: name(s) of the modifier key(s) (i.e., control, shift)
pressed
% handles
structure with handles and user data (see GUIDATA)

% --- Executes on key press with focus on q and none of its controls.
function q_KeyPressFcn(hObject, eventdata, handles)
global q;
letra=get(gcf,'CurrentCharacter'); % detecta la letra digitada
letra=double(letra);
palabra=get(handles.q,'UserData'); % vector de datos de usuario
%--------------------------------------------------------------------------------if letra ~= 8
palabra=[palabra,letra] % agrego la letra a la palabra
elseif length(palabra)~= 0
palabra(end) = [];
end
%------------------------------------------------------------------------------------------set(handles.q,'UserData',palabra);
%Esto hace mas o menos lo que hace el if de arriba, pero lo otro da menos
%problemas
% buscarBorrados = find(palabra == 8);
% palabra(buscarBorrados) = [];
palabra=char(palabra) % los datos numricos son convertidos en letras
q=str2num(palabra);
op = 1;
pruebaE = q - fix(q); %obtiene la parte decimal del valor Q
if pruebaE == 0
op = 2;
end
set(handles.pruebaQ,'string',q);
if op==2
set(handles.q,'ForegroundColor',[0 0 0]);
set(handles.mensajeQ,'ForegroundColor',[0 1 0]);
set(handles.mensajeQ,'string','Valor de q comprobado');
else
set(handles.q,'ForegroundColor',[1 0 0]);
set(handles.mensajeQ,'ForegroundColor',[1 0 0]);
set(handles.mensajeQ,'string','ERROR! Q debe ser un numero entero');
end

% hObject
handle to q (see GCBO)
% eventdata structure with the following fields (see UICONTROL)
%
Key: name of the key that was pressed, in lower case
%
Character: character interpretation of the key(s) that was pressed
%
Modifier: name(s) of the modifier key(s) (i.e., control, shift)
pressed
% handles
structure with handles and user data (see GUIDATA)

% --- Executes when selected object is changed in uipanel1.


function uipanel1_SelectionChangeFcn(hObject, eventdata, handles)
global bw;
global sp;
global generacion;
% seleccionando la norma
norma=get(hObject,'String');
switch norma
case '1G'
bw = 10000;
sp = 30;
set(handles.BW15,'Enable','off');
set(handles.BW25,'Enable','off');
set(handles.pruebaTEC,'string','Tecnologa = 1G');
set(handles.pruebaBW,'string',bw);
set(handles.pruebaBWsub,'string',sp);
generacion = 1;
case '2G'
sp = 200;
set(handles.BW15,'Enable','on');
set(handles.BW25,'Enable','on');
set(handles.pruebaTEC,'string','Tecnologa = 2G');
generacion = 2;
case ''
bw = 10000;
sp = 30;
set(handles.BW15,'Enable','off');
set(handles.BW25,'Enable','off');
set(handles.pruebaTEC,'string','Tecnologa = 1G');
generacion = 1;
end
% hObject
handle to the selected object in uipanel1
% eventdata structure with the following fields (see UIBUTTONGROUP)
%
EventName: string 'SelectionChanged' (read only)
%
OldValue: handle of the previously selected object or empty if none
was selected
%
NewValue: handle of the currently selected object
% handles
structure with handles and user data (see GUIDATA)

% --- Executes when selected object is changed in uipanel2.

function uipanel2_SelectionChangeFcn(hObject, eventdata, handles)


global bw;
global sp;
global generacion;
% seleccionando la norma
if generacion == 1
sp = 30;
bw = 10000;
else
norma=get(hObject,'String');
switch norma
case '25 MHz'
bw = 25000;
sp = 200;
set(handles.pruebaBW,'string',bw);
set(handles.pruebaBWsub,'string',sp);
generacion = 2;
case '15 MHz'
sp = 200;
bw = 15000;
set(handles.pruebaBW,'string',bw);
set(handles.pruebaBWsub,'string',sp);
generacion = 2;
case ''
bw = 25000;
sp = 200;
set(handles.pruebaBW,'string',bw);
set(handles.pruebaBWsub,'string',sp);
generacion = 2;
end
%nested
end
% hObject
handle to the selected object in uipanel2
% eventdata structure with the following fields (see UIBUTTONGROUP)
%
EventName: string 'SelectionChanged' (read only)
%
OldValue: handle of the previously selected object or empty if none
was selected
%
NewValue: handle of the currently selected object
% handles
structure with handles and user data (see GUIDATA)

% --- Executes when selected object is changed in uipanel3.


function uipanel3_SelectionChangeFcn(hObject, eventdata, handles)
global s;
% seleccionando la norma
norma=get(hObject,'String');
switch norma
case '1'
s = 1;
set(handles.pruebaSEC,'string',s);
case '3'
s = 3;
set(handles.pruebaSEC,'string',s);
case ''
s = 1;
set(handles.pruebaSEC,'string',s);

end
% hObject
handle to the selected object in uipanel3
% eventdata structure with the following fields (see UIBUTTONGROUP)
%
EventName: string 'SelectionChanged' (read only)
%
OldValue: handle of the previously selected object or empty if none
was selected
%
NewValue: handle of the currently selected object
% handles
structure with handles and user data (see GUIDATA)

% --- Executes on key press with focus on r and none of its controls.
function r_KeyPressFcn(hObject, eventdata, handles)
global r;
letra=get(gcf,'CurrentCharacter'); % detecta la letra digitada
letra=double(letra);
palabra=get(handles.r,'UserData'); % vector de datos de usuario
%--------------------------------------------------------------------------------if letra ~= 8
palabra=[palabra,letra] % agrego la letra a la palabra
elseif length(palabra)~= 0
palabra(end) = [];
end
%------------------------------------------------------------------------------------------set(handles.r,'UserData',palabra);
%Esto hace mas o menos lo que hace el if de arriba, pero lo otro da menos
%problemas
% buscarBorrados = find(palabra == 8);
% palabra(buscarBorrados) = [];
palabra=char(palabra) % los datos numricos son convertidos en letras
r=str2num(palabra);
set(handles.pruebaRADIO,'string',r);
% hObject
handle to r (see GCBO)
% eventdata structure with the following fields (see UICONTROL)
%
Key: name of the key that was pressed, in lower case
%
Character: character interpretation of the key(s) that was pressed
%
Modifier: name(s) of the modifier key(s) (i.e., control, shift)
pressed
% handles
structure with handles and user data (see GUIDATA)

% --- Executes on button press in pushbutton1.


function pushbutton1_Callback(hObject, eventdata, handles)
global r;
global s;
global bw;
global sp;
global q;
global n;
global j;

global generacion;
opJ = 1;
opN = 1;
opQ = 1;
op = 1;
%---------------------------------------------------------------------%Se comprueba nuevamente que J sea rombico
%el algoritmo crea en un vector numeros rombicos
op = 1;
j2=[];
i=1;
for x=0:10
for y=1:10
j2(i)=(x^2)+(y^2)+(x*y);%formula de nros rombicos
%disp(j2(i));
i=i+1;
end
end
%---------------------------------for f=1:length(j2)
if j==j2(f)
opJ = 2;%Si es 2, puede continuar con el calculo
if j2==0
opJ = 1;
end
end
end
%---------------------------------------------------------------------%---------------------------------------------------------------------%Se comprueba nuevamente que Q es entero
pruebaE = q - fix(q); %obtiene la parte decimal del valor Q
if pruebaE == 0
opQ = 2;
end
%-----------------------------------------------------------------------%---------------------------------------------------------------------%Se comprueba nuevamente que n esta entre 2.7 y 5
if 2.7 <= n
if n <= 5
opN = 2;
end
end
%-----------------------------------------------------------------------%Se comprueba que los 3 terminos sean correctos
%-----------------------------------------------------------------------if opN ==2 & opQ==2 & opJ==2
op=2;
end

%------------------------------------------------------------------------

switch op
case 1
set(handles.respB,'string','ERROR');
set(handles.respC,'string','ERROR');
set(handles.respD,'string','ERROR');
set(handles.respE,'string','ERROR');
set(handles.respF,'string','ERROR');
set(handles.respG,'string','ERROR');
set(handles.respH1,'string','ERROR');
set(handles.respH2,'string','ERROR');
set(handles.respH3,'string','ERROR');
set(handles.respH4,'string','ERROR');
case 2
%---------------------------------------------------------------------%RESPUESTA B
respb=floor(bw/sp);
set(handles.respB,'string',respb);
%---------------------------------------------------------------------%---------------------------------------------------------------------%RESPUESTA C
respc=r*sqrt(3*j);
set(handles.respC,'string',respc);
%---------------------------------------------------------------------%---------------------------------------------------------------------%RESPUESTA D
respd=(r^2)*(3*sqrt(3)/2)*j;
set(handles.respD,'string',respd);
%---------------------------------------------------------------------%---------------------------------------------------------------------%RESPUESTA E
respe=respd*q;
set(handles.respE,'string',respe);
%---------------------------------------------------------------------%---------------------------------------------------------------------%RESPUESTA F
respf=10*log10((((sqrt(3*j))-1)^n)/6);
set(handles.respF,'string',respf);
if (respf < 8)
set(handles.advertencia,'ForegroundColor',[1 0 0]);
set(handles.advertencia,'string','Advertencia: Valor menor a 8dB. No es
viable');
end
if respf > 12
set(handles.advertencia,'ForegroundColor',[1 0 0]);
set(handles.advertencia,'string','Advertencia: Valor mayor a 12dB. No es
viable');
end

if(respf>=8 && respf<=12)


set(handles.advertencia,'ForegroundColor',[0 1 0]);
set(handles.advertencia,'string','Si es viable');
end
%---------------------------------------------------------------------%---------------------------------------------------------------------%RESPUESTA G
respg=ceil(respb/(s*j));
set(handles.respG,'string',respg);
%---------------------------------------------------------------------%---------------------------------------------------------------------%RESPUESTA H
if(generacion==1) %en el caso de 1G
resph1=respg;
set(handles.respH1,'string',resph1);
resph2=resph1*s;
set(handles.respH2,'string',resph2);
resph3=respb;
set(handles.respH3,'string',resph3);
resph4=resph3*q;
set(handles.respH4,'string',resph4);

else %En el caso de 2G


resph1=respg*8;
set(handles.respH1,'string',resph1);
resph2=resph1*s;
set(handles.respH2,'string',resph2);
resph3=(respb*8)-1;
set(handles.respH3,'string',resph3);
resph4=resph3*q;
set(handles.respH4,'string',resph4);
end
end
% hObject
% eventdata
% handles

handle to pushbutton1 (see GCBO)


reserved - to be defined in a future version of MATLAB
structure with handles and user data (see GUIDATA)

% --- Executes on button press in pushbutton2.


function pushbutton2_Callback(hObject, eventdata, handles)

global
global
global
global
global
global
global

r;
s;
bw;
sp;
q;
n;
j;
set(handles.respB,'string',0);
set(handles.respC,'string',0);
set(handles.respD,'string',0);
set(handles.respE,'string',0);
set(handles.respF,'string',0);
set(handles.respG,'string',0);
set(handles.respH1,'string',0);
set(handles.respH2,'string',0);
set(handles.respH3,'string',0);
set(handles.respH4,'string',0);
set(handles.pruebaSEC,'string',0);
set(handles.pruebaRADIO,'string',0);
set(handles.pruebaJ,'string',0);
set(handles.pruebaN,'string',0);
set(handles.pruebaQ,'string',0);
set(handles.pruebaBW,'string',0);
set(handles.pruebaBWsub,'string',0);
set(handles.advertencia,'string',' ');

6.
7. Relacin Interfaz Grfica Variables
8.

A continuacin se muestra la interfaz grafica utilizada, adems se

muestran las variables utilizadas en cada uno de los campos.


9.

10.

11.
12.

13. Conclusiones
El programa cumple con los requerimientos y obtienes los valores

necesitados
Un planificador de frecuencias programado ahorra mucho tiempo en

la planificacin de un proyecto de cobertura de red celular


14.
15. Bibliografa
Apuntes realizados en clases de Telecomunicacines mviles, Universidad

Catlica Boliviana.
Diapositivas otorgadas por el Ing. Jos Campero.
es.mathworks.com
Manual MatlabR2006

16.

S-ar putea să vă placă și