0% found this document useful (0 votes)
17 views22 pages

Lab1 Actualizado

The document outlines a laboratory guide for a transmission lines course at Universidad Nacional del Callao, focusing on the simulation of electric fields in coaxial cables and waveguides using MATLAB. It includes objectives, code snippets for generating electric and magnetic field simulations, and graphical representations of the results. The guide is intended for students to understand the behavior of electromagnetic waves in different geometries and frequencies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views22 pages

Lab1 Actualizado

The document outlines a laboratory guide for a transmission lines course at Universidad Nacional del Callao, focusing on the simulation of electric fields in coaxial cables and waveguides using MATLAB. It includes objectives, code snippets for generating electric and magnetic field simulations, and graphical representations of the results. The guide is intended for students to understand the behavior of electromagnetic waves in different geometries and frequencies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

UNIVERSIDAD NACIONAL DEL CALLAO

Facultad De Ingeniería Eléctrica Y Electrónica


Escuela Profesional De Ingeniería Electrónica

LÍNEAS DE TRANSMISIÓN
GUIA DE LABORATORIO N°1

INTEGRANTES
Espinoza Garaz Ayrton Jesús
Estrada Portocarrero Miguel Alexander
Jorges Chávez Gianfranco
Orihuela Grovas Gianmarco

DOCENTE
Solis Tipian Martin Albino

PERIODO ACADÉMICO
2024 – A

2024
Callao - Perú
Objetivo
En el presente laboratorio se desarrolla la práctica por medio de un algoritmo que
desarrollaremos con ayuda del docente. Al realizarlo obtendremos la gráfica del campo
eléctrico en un cable coaxial en función de su ancho de blindaje sin perdías. Estos se
analizarán posteriormente en una gráfica por medio del software matlab. Luego de obtener
la gráfica podemos obtener la lectura de las características de señales encapsuladas o guiadas
dentro de una forma geométrica específica Asimismo se analizarán otros contextos
ligados al tema.
N°1
Cable coaxial
Grafica del campo eléctrico tanto en 2D y 3D en función de tres radios y la corriente que
circula a través de ella
Código
function pushbutton1_Callback(hObject,eventdata, handles)
I=str2double(get(handles.edit1,'string'))% definimos corriente
radioA=str2double(get(handles.edit2,'string'))
radioB=str2double(get(handles.edit3,'string'))
radioC=str2double(get(handles.edit4,'string'))
P=0:radioA/100:radioA; % root y para tener siempre 100 posiciones
H=I*P/(2*pi*radioA^2); % campoelectrico
cla % para limpiar las graficas
plot(handles.axes1,P,H)
hold on
P1=radioA:(radioB-radioA)/100:radioB; %
root y para tener siempre 100
posiciones
H1=I./(2*pi*P1) % campo electrico
plot(handles.axes1,[P,P1],[H,H1])
P2=radioB:(radioC-radioB)/100:radioC; %root y para tener siempre 100 posiciones
H2=I*(radioC^2-P2.^2)./((2*pi*P2)*(radioC^2-radioB^2))% campo electrico
plot(handles.axes1,[P,P1,P2],[H,H1,H2])
p=0:radioA/100:radioA;
phi=0:2*pi/100:2*pi;
[P,PHI]=meshgrid(p,phi);
H=I.*P/(2*pi*radioA^2);
surf(P.*cos(PHI),P.*sin(PHI),H,'edgecolor','none')
colormap jet
p1=radioA:(radioB-radioA)/100:radioB;
phi=0:2*pi/100:2*pi;
[P1,PHI1]=meshgrid(p1,phi);
H1=I./(2*pi*P1);
surf(P1.*cos(PHI1),P1.*sin(PHI1),H1,'edgecolor','none')
colormap jet
p2=radioB:(radioC-radioB)/100:radioC;
phi=0:2*pi/100:2*pi;
[P2,PHI2]=meshgrid(p2,phi);
H2=I*(radioC^2-p2.^2)./(2*pi*P2*(radioC^2-radioB^2));
surf(P2.*cos(PHI2),P2.*sin(PHI2),H2,"edgecolor",'none')
colormap jet
Interfaz

Figure 1

Figure 2

Figure 3
A partir de aqui se representará lo solicitado de manera general, alejándonos de lo
especifico. Esto debido a la dificultad de poder estructurar el código e interfaz.
N°2
Simulación de Propagación en una Guía de Onda Rectangular:

❖ Utilizando MATLAB, simular la propagación de una onda electromagnética en una guía


de onda rectangular.

❖ Graficar la distribución del campo eléctrico y magnético en la guía de onda.

❖ Estudiar cómo varía la propagación con respecto a la frecuencia y la geometría de la guía


de onda
Consideramos variables como Ancho, Altura y Frecuencia

Para el caso del Campo Eléctrico


Código
function varargout = Interfaz(varargin)
% INTERFAZ MATLAB code for Interfaz.fig
% INTERFAZ, by itself, creates a new INTERFAZ or raises the existing
% singleton*.
%
% H = INTERFAZ returns the handle to a new INTERFAZ or the handle to
% the existing singleton*.
%
% INTERFAZ('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in INTERFAZ.M with the given input
arguments.
%
% INTERFAZ('Property','Value',...) creates a new INTERFAZ or raises
the
% existing singleton*. Starting from the left, property value pairs
are
% applied to the GUI before Interfaz_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property
application
% stop. All inputs are passed to Interfaz_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 Interfaz

% Last Modified by GUIDE v2.5 25-Apr-2024 20:38:27

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Interfaz_OpeningFcn, ...
'gui_OutputFcn', @Interfaz_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 Interfaz is made visible.


function Interfaz_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 Interfaz (see VARARGIN)

% Choose default command line output for Interfaz


handles.output = hObject;

% Update handles structure


guidata(hObject, handles);

% UIWAIT makes Interfaz wait for user response (see UIRESUME)


% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = Interfaz_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 w1_Callback(hObject, eventdata, handles)


% hObject handle to w1 (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 w1 as text


% str2double(get(hObject,'String')) returns contents of w1 as a
double

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


function w1_CreateFcn(hObject, eventdata, handles)
% hObject handle to w1 (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 h1_Callback(hObject, eventdata, handles)


% hObject handle to h1 (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 h1 as text


% str2double(get(hObject,'String')) returns contents of h1 as a
double

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


function h1_CreateFcn(hObject, eventdata, handles)
% hObject handle to h1 (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 f1_Callback(hObject, eventdata, handles)


% hObject handle to h1 (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 h1 as text


% str2double(get(hObject,'String')) returns contents of h1 as a
double
% --- Executes during object creation, after setting all properties.
function f1_CreateFcn(hObject, eventdata, handles)
% hObject handle to h1 (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 btn_Callback(hObject, eventdata, handles)


% Obtener valores de los campos de texto
Ancho = str2double(get(handles.w1,'String'));
Altura = str2double(get(handles.h1,'String'));
Frecuencia = str2double(get(handles.f1,'String'));

% Definir los límites de los ejes X e Y en función de Ancho y Altura


x = linspace(0, Ancho, 100);
y = linspace(0, Altura, 100);

% Generar la cuadrícula en el plano XY


[X, Y] = meshgrid(x, y);

% Generar los datos de la guía de onda


Z = sin(2 * pi * Frecuencia * X / Ancho) .* sin(2 * pi * Frecuencia *
Y / Altura);

% Generar los datos del campo eléctrico (podrías modificar estos


valores según tus ecuaciones)
E = cos(2 * pi * Frecuencia * X / Ancho) .* cos(2 * pi * Frecuencia *
Y / Altura);

% Visualizar la simulación de la propagación de la onda en el cuadro


Axes1
axes(handles.axes1); % Selecciona el cuadro Axes
imagesc(x, y, Z); % Muestra los datos como una imagen en el plano XY
colorbar; % Agrega una barra de color para mostrar los valores de Z
xlabel('Ancho (cm)'); % Etiqueta del eje X
ylabel('Altura (cm)'); % Etiqueta del eje Y
title('Simulación de propagación de la onda en un plano XY'); %
Título del gráfico

% Visualizar la simulación de la propagación de la onda en el cuadro


Axes2 (tridimensional)
axes(handles.axes2); % Selecciona el cuadro Axes2
surf(X, Y, Z); % Muestra los datos como una superficie tridimensional
shading(handles.axes2, 'interp'); % Interpolación de color para una
apariencia más suave
xlabel('Ancho (cm)'); % Etiqueta del eje X
ylabel('Altura (cm)'); % Etiqueta del eje Y
zlabel('Amplitud de la onda'); % Etiqueta del eje Z
title('Simulación de propagación de la onda en un espacio
tridimensional'); % Título del gráfico

% Visualizar la distribución del campo eléctrico de la onda en el


cuadro Axes3
axes(handles.axes3); % Selecciona el cuadro Axes3
plot(x, E(1,:), 'LineWidth', 2); % Muestra la distribución del campo
eléctrico en forma de línea
xlabel('Ancho (cm)'); % Etiqueta del eje X
ylabel('Campo eléctrico'); % Etiqueta del eje Y
title('Distribución del campo eléctrico de la onda a lo largo del eje
X'); % Título del gráfico

function perm_Callback(hObject, eventdata, handles)


% hObject handle to perm (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 perm as text


% str2double(get(hObject,'String')) returns contents of perm as a
double

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


function perm_CreateFcn(hObject, eventdata, handles)
% hObject handle to perm (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
Interfaz

Figure 4

Figure 5

Figure 6

Esta sería la representación del campo eléctrico en los modos TE, TM Y TEM

Figure 7
Para el caso del Campo Magnético
Código
La única modificación que se realizó en el código, fue en esta sección, el resto del código
es el mismo que en la parte del Campo Eléctrico.
function btn_Callback(hObject, eventdata, handles)
% Obtener valores de los campos de texto
Ancho = str2double(get(handles.w1,'String'));
Altura = str2double(get(handles.h1,'String'));
Frecuencia = str2double(get(handles.f1,'String'));

% Definir los límites de los ejes X e Y en función de Ancho y Altura


x = linspace(0, Ancho, 100);
y = linspace(0, Altura, 100);

% Generar la cuadrícula en el plano XY


[X, Y] = meshgrid(x, y);

% Generar los datos de la guía de onda


Z = sin(2 * pi * Frecuencia * X / Ancho) .* sin(2 * pi * Frecuencia *
Y / Altura);

% Generar los datos del campo magnético


B = sin(2 * pi * Frecuencia * X / Ancho) .* cos(2 * pi * Frecuencia *
Y / Altura);

% Visualizar la simulación de la propagación de la onda en el cuadro


Axes1
axes(handles.axes1); % Selecciona el cuadro Axes1
imagesc(x, y, Z); % Muestra los datos como una imagen en el plano XY
colorbar; % Agrega una barra de color para mostrar los valores de Z
xlabel('Ancho (cm)'); % Etiqueta del eje X
ylabel('Altura (cm)'); % Etiqueta del eje Y
title('Simulación de propagación de la onda en un plano XY'); %
Título del gráfico

% Establecer la paleta de colores 'jet' para el Axes1


colormap(handles.axes1, 'jet'); % Cambia la paleta de colores a 'jet'

% Visualizar la simulación de la propagación de la onda en el cuadro


Axes2 (tridimensional)
axes(handles.axes2); % Selecciona el cuadro Axes2
surf(X, Y, Z); % Muestra los datos como una superficie tridimensional
shading(handles.axes2, 'interp'); % Interpolación de color para una
apariencia más suave
xlabel('Ancho (cm)'); % Etiqueta del eje X
ylabel('Altura (cm)'); % Etiqueta del eje Y
zlabel('Amplitud de la onda'); % Etiqueta del eje Z
title('Simulación de propagación de la onda en un espacio
tridimensional'); % Título del gráfico

% Establecer la paleta de colores 'jet' para el Axes2


colormap(handles.axes2, 'jet'); % Cambia la paleta de colores a 'jet'
% Visualizar la distribución del campo magnético de la onda en el
cuadro Axes3
axes(handles.axes3); % Selecciona el cuadro Axes3
plot(x, B(1,:), 'LineWidth', 2, 'Color', 'red'); % Muestra la
distribución del campo magnético en forma de línea con color rojo
xlabel('Ancho (cm)'); % Etiqueta del eje X
ylabel('Campo magnético'); % Etiqueta del eje Y
title('Distribución del campo magnético de la onda a lo largo del eje
X'); % Título del gráfico

Interfaz

Figure 8

Figure 9

Esta sería la representación del Campo Magnético en los modos TE, TM Y TEM

Figure 10
Cálculo de Parámetros Característicos:
• Utilizar MATLAB para calcular parámetros característicos de la guía de onda, como la
impedancia característica y la velocidad de fase.

1. Código GUIDE:

classdef IMPEDANCIA < matlab.apps.AppBase

% Properties that correspond to app components


properties (Access = public)
UIFigure matlab.ui.Figure
IngreselossiguientesvaloresLabel matlab.ui.control.Label
radsLabel matlab.ui.control.Label
FmLabel matlab.ui.control.Label
HmLabel matlab.ui.control.Label
SmLabel matlab.ui.control.Label
OhmsmLabel matlab.ui.control.Label
msLabel matlab.ui.control.Label
OhmsLabel matlab.ui.control.Label
CALCULADORDEPARAMETROSCARACTERISTICOSZ0uDELAGUIADEONDALabel
matlab.ui.control.Label
CalcularVelocidaddeFaseButton matlab.ui.control.Button
uEditField matlab.ui.control.NumericEditField
uLabel matlab.ui.control.Label
Z0EditField matlab.ui.control.EditField
Z0Label matlab.ui.control.Label
wEditField matlab.ui.control.NumericEditField
wEditFieldLabel matlab.ui.control.Label
CEditField matlab.ui.control.NumericEditField
CLabel matlab.ui.control.Label
GEditField matlab.ui.control.NumericEditField
GEditFieldLabel matlab.ui.control.Label
LEditField matlab.ui.control.NumericEditField
LLabel matlab.ui.control.Label
REditField matlab.ui.control.NumericEditField
REditFieldLabel matlab.ui.control.Label
CalcularImpedanciaCaractersticaButton matlab.ui.control.Button
end

% Callbacks that handle component events


methods (Access = private)

% Button pushed function: CalcularImpedanciaCaractersticaButton


function CalcularImpedanciaCaractersticaButtonPushed(app, event)
% Obtener los valores de R, L, G, C desde los campos de edición

% Calcular la impedancia característica (Z0)


Z0 = sqrt((app.REditField.Value +
1j*app.wEditField.Value*app.LEditField.Value) / (app.GEditField.Value +
1j*app.wEditField.Value*app.CEditField.Value));
% Mostrar el resultado en el objeto con el tag "Text3"
Z0_str = sprintf('%0.4f + %0.4fj', real(Z0), imag(Z0));

% Mostrar el resultado en el campo de edición numérico


Z0EditField
app.Z0EditField.Value = Z0_str;

end

% Button pushed function: CalcularVelocidaddeFaseButton


function CalcularVelocidaddeFaseButtonPushed(app, event)

% Calcular la velocidad de fase (u)


u = (1/sqrt(app.LEditField.Value*app.CEditField.Value));

% Mostrar el resultado en el campo de edición de texto uEditField


app.uEditField.Value = u;
end
end

% Component initialization
methods (Access = private)

% Create UIFigure and components


function createComponents(app)

% Create UIFigure and hide until all components are created


app.UIFigure = uifigure('Visible', 'off');
app.UIFigure.Color = [0 0.4471 0.7412];
app.UIFigure.Position = [100 100 640 386];
app.UIFigure.Name = 'MATLAB App';

% Create CalcularImpedanciaCaractersticaButton
app.CalcularImpedanciaCaractersticaButton =
uibutton(app.UIFigure, 'push');
app.CalcularImpedanciaCaractersticaButton.ButtonPushedFcn =
createCallbackFcn(app, @CalcularImpedanciaCaractersticaButtonPushed, true);
app.CalcularImpedanciaCaractersticaButton.FontWeight = 'bold';
app.CalcularImpedanciaCaractersticaButton.Position = [81 103 215
23];
app.CalcularImpedanciaCaractersticaButton.Text = 'Calcular
Impedancia Característica';

% Create REditFieldLabel
app.REditFieldLabel = uilabel(app.UIFigure);
app.REditFieldLabel.HorizontalAlignment = 'right';
app.REditFieldLabel.FontWeight = 'bold';
app.REditFieldLabel.Position = [61 275 25 22];
app.REditFieldLabel.Text = 'R:';

% Create REditField
app.REditField = uieditfield(app.UIFigure, 'numeric');
app.REditField.Tag = 'REditField';
app.REditField.Position = [101 275 100 22];
% Create LLabel
app.LLabel = uilabel(app.UIFigure);
app.LLabel.HorizontalAlignment = 'right';
app.LLabel.FontWeight = 'bold';
app.LLabel.Position = [344 275 25 22];
app.LLabel.Text = 'L:';

% Create LEditField
app.LEditField = uieditfield(app.UIFigure, 'numeric');
app.LEditField.Tag = 'LEditField';
app.LEditField.FontWeight = 'bold';
app.LEditField.Position = [384 275 100 22];

% Create GEditFieldLabel
app.GEditFieldLabel = uilabel(app.UIFigure);
app.GEditFieldLabel.HorizontalAlignment = 'right';
app.GEditFieldLabel.FontWeight = 'bold';
app.GEditFieldLabel.Position = [61 233 25 22];
app.GEditFieldLabel.Text = 'G:';

% Create GEditField
app.GEditField = uieditfield(app.UIFigure, 'numeric');
app.GEditField.Tag = 'GEditField';
app.GEditField.FontWeight = 'bold';
app.GEditField.Position = [101 233 100 22];

% Create CLabel
app.CLabel = uilabel(app.UIFigure);
app.CLabel.HorizontalAlignment = 'right';
app.CLabel.FontWeight = 'bold';
app.CLabel.Position = [344 233 25 22];
app.CLabel.Text = 'C:';

% Create CEditField
app.CEditField = uieditfield(app.UIFigure, 'numeric');
app.CEditField.Tag = 'CEditField';
app.CEditField.FontWeight = 'bold';
app.CEditField.Position = [384 233 100 22];

% Create wEditFieldLabel
app.wEditFieldLabel = uilabel(app.UIFigure);
app.wEditFieldLabel.HorizontalAlignment = 'right';
app.wEditFieldLabel.FontWeight = 'bold';
app.wEditFieldLabel.Position = [188 183 25 22];
app.wEditFieldLabel.Text = 'w:';

% Create wEditField
app.wEditField = uieditfield(app.UIFigure, 'numeric');
app.wEditField.Tag = 'wEditField';
app.wEditField.FontWeight = 'bold';
app.wEditField.Position = [228 183 100 22];

% Create Z0Label
app.Z0Label = uilabel(app.UIFigure);
app.Z0Label.HorizontalAlignment = 'right';
app.Z0Label.FontWeight = 'bold';
app.Z0Label.Position = [343 103 25 22];
app.Z0Label.Text = 'Z0:';

% Create Z0EditField
app.Z0EditField = uieditfield(app.UIFigure, 'text');
app.Z0EditField.Tag = 'Z0EditField';
app.Z0EditField.HorizontalAlignment = 'right';
app.Z0EditField.FontWeight = 'bold';
app.Z0EditField.Position = [383 103 150 22];

% Create uLabel
app.uLabel = uilabel(app.UIFigure);
app.uLabel.HorizontalAlignment = 'right';
app.uLabel.FontWeight = 'bold';
app.uLabel.Position = [341 52 25 22];
app.uLabel.Text = 'u:';

% Create uEditField
app.uEditField = uieditfield(app.UIFigure, 'numeric');
app.uEditField.Tag = 'uEditField';
app.uEditField.FontWeight = 'bold';
app.uEditField.Position = [381 52 150 22];

% Create CalcularVelocidaddeFaseButton
app.CalcularVelocidaddeFaseButton = uibutton(app.UIFigure,
'push');
app.CalcularVelocidaddeFaseButton.ButtonPushedFcn =
createCallbackFcn(app, @CalcularVelocidaddeFaseButtonPushed, true);
app.CalcularVelocidaddeFaseButton.FontWeight = 'bold';
app.CalcularVelocidaddeFaseButton.Position = [81 52 170 23];
app.CalcularVelocidaddeFaseButton.Text = 'Calcular Velocidad de
Fase';

% Create
CALCULADORDEPARAMETROSCARACTERISTICOSZ0uDELAGUIADEONDALabel
app.CALCULADORDEPARAMETROSCARACTERISTICOSZ0uDELAGUIADEONDALabel =
uilabel(app.UIFigure);

app.CALCULADORDEPARAMETROSCARACTERISTICOSZ0uDELAGUIADEONDALabel.FontSize =
14;

app.CALCULADORDEPARAMETROSCARACTERISTICOSZ0uDELAGUIADEONDALabel.FontWeight =
'bold';

app.CALCULADORDEPARAMETROSCARACTERISTICOSZ0uDELAGUIADEONDALabel.Position =
[28 341 581 22];

app.CALCULADORDEPARAMETROSCARACTERISTICOSZ0uDELAGUIADEONDALabel.Text =
'CALCULADOR DE PARAMETROS CARACTERISTICOS (Z0, u) DE LA GUIA DE ONDA ';

% Create OhmsLabel
app.OhmsLabel = uilabel(app.UIFigure);
app.OhmsLabel.FontWeight = 'bold';
app.OhmsLabel.Position = [538 103 47 22];
app.OhmsLabel.Text = '(Ohms)';

% Create msLabel
app.msLabel = uilabel(app.UIFigure);
app.msLabel.FontWeight = 'bold';
app.msLabel.Position = [536 52 34 22];
app.msLabel.Text = '(m/s)';

% Create OhmsmLabel
app.OhmsmLabel = uilabel(app.UIFigure);
app.OhmsmLabel.FontWeight = 'bold';
app.OhmsmLabel.Position = [212 275 61 22];
app.OhmsmLabel.Text = '(Ohms/m)';

% Create SmLabel
app.SmLabel = uilabel(app.UIFigure);
app.SmLabel.FontWeight = 'bold';
app.SmLabel.Position = [212 233 35 22];
app.SmLabel.Text = '(S/m)';

% Create HmLabel
app.HmLabel = uilabel(app.UIFigure);
app.HmLabel.FontWeight = 'bold';
app.HmLabel.Position = [497 275 36 22];
app.HmLabel.Text = '(H/m)';

% Create FmLabel
app.FmLabel = uilabel(app.UIFigure);
app.FmLabel.FontWeight = 'bold';
app.FmLabel.Position = [498 233 34 22];
app.FmLabel.Text = '(F/m)';

% Create radsLabel
app.radsLabel = uilabel(app.UIFigure);
app.radsLabel.FontWeight = 'bold';
app.radsLabel.Position = [337 183 42 22];
app.radsLabel.Text = '(rad/s)';

% Create IngreselossiguientesvaloresLabel
app.IngreselossiguientesvaloresLabel = uilabel(app.UIFigure);
app.IngreselossiguientesvaloresLabel.FontWeight = 'bold';
app.IngreselossiguientesvaloresLabel.Position = [28 311 180 22];
app.IngreselossiguientesvaloresLabel.Text = 'Ingrese los
siguientes valores:';

% Show the figure after all components are created


app.UIFigure.Visible = 'on';
end
end

% App creation and deletion


methods (Access = public)

% Construct app
function app = IMPEDANCIA

% Create UIFigure and components


createComponents(app)

% Register the app with App Designer


registerApp(app, app.UIFigure)

if nargout == 0
clear app
end
end

% Code that executes before app deletion


function delete(app)

% Delete UIFigure when app is deleted


delete(app.UIFigure)
end
end
end

2. Interfaz GUIDE:
Producto del código anterior obtenemos, utilizando la herramienta GUIDE de
MATLAB, la siguiente interfaz gráfica para poder calcular los parámetros
característicos de la guía de onda (Impedancia característica y velocidad de fase).

Interfaz diseñada:
Ejecución:
Utilizaremos el siguiente caso para comprobar la funcionalidad de nuestra interfaz.
Caso:
A 6 × 108 rad/s, los parámetros de cierta línea de transmisión valen 𝑅 = 20 Ω/m ,
𝐿 = 0.4 𝜇𝐻/𝑚 , 𝐺 = 80 𝜇𝑆/𝑚 y 𝐶 = 40𝑝𝐹/𝑚. Calcular la impedancia
característica 𝑍0 (Ohms) y la velocidad de fase u(m/s).

Comprobación teórica
La impedancia característica se calcula con la siguiente expresión:

𝑅 + 𝑗𝜔𝐿
𝑍0 = √ = 𝑅0 + 𝑗𝑋0 (𝑂ℎ𝑚𝑠)
𝐺 + 𝑗𝜔𝐶

Reemplazando los datos del problema:

20 + 𝑗 × (6 × 108 ) × (0.4 × 10−6 )


𝑍0 = √ = 100.08 − 𝑗4.01 𝑂ℎ𝑚𝑠
(80 × 10−6 ) + 𝑗 × (6 × 108 ) × (40 × 10−12 )
La velocidad de fase se calcula con la siguiente expresión:
1
𝑢= (𝑚/𝑠)
√𝐿𝐶

Reemplazando los datos del problema:


1
𝑢= = 2.5 × 108 𝑚/𝑠
√(0.4 × 10−6 )(40 × 10−12 )

Diseño de componentes en guía de onda:


1) Acoplador direccional:
En este caso emos optado por diseñar lo que viene hacer un acoplador direccional es un
dispositivo utilizado en sistemas de radiofrecuencia y microondas para dividir la señal de
entrada en dos o más señales de salida con niveles de potencia desiguales, al mismo tiempo
que proporciona aislamiento entre las salidas con ayuda del programa Matlab no sirvo para
ver su comportamiento.

Código:

% Parámetros de la guía de onda


%% vamos definir la variable a,b,f
a = 0.05; % Ancho de la guía de onda
b = 0.025; % Altura de la guía de onda
f = 10e9; % Frecuencia de operación

% Constantes físicas
c = 3e8; % Velocidad de la luz en el vacío

% Longitud de onda en la guía de onda


lambda_g = c / sqrt((2*a)^2 + (2*b)^2);
% Longitud de onda en el vacío
lambda_0 = c / f;
% Longitud de onda efectiva
lambda_e = lambda_0 / sqrt(1 - (lambda_0 / lambda_g)^2);

% Longitud del acoplador direccional (1/4 de longitud de onda)


L = lambda_e / 4;
% Impedancia característica de la guía de onda
Z_0 = (120 * pi) / sqrt((a/b)^2);

% Impedancia del acoplador direccional


Z_c = Z_0 / (pi * sqrt(1 - (lambda_0 / lambda_g)^2));

% Dimensiones del acoplador direccional


L1 = L;
L2 = L;
L3 = L;
L4 = L;

% Dibujar el acoplador direccional


x = [0 L1 L1+L2 L1+L2+L3 L1+L2+L3+L4];
y = [0 0 b b 0];
plot(x, y, 'LineWidth', 2);
title('Acoplador Direccional de Tres Puertos');
xlabel('Longitud (metros)');
ylabel('Altura (metros)');
axis equal;
grid on;
La ejecución:
2) Filtro:
Es un filtro electrónico que es diseñado y construido utilizando los principios sobre los cuales
trabaja la tecnología de guía de onda. Las guías de onda son tubos de metal vacío dentro de
las cuales una onda electromagnética puede viajar. Los filtros son dispositivos que pueden ser
mecánicos o electrónicos y son usados para permitir el paso de señales de cierta frecuencia
(la banda de paso), mientras que rechazan otras frecuencias (banda de rechazo).
Para deseñarlo en este caso usamos el porgrama llamado Matlab mas epecifico usamos
simulinik:

Desarrollo del sistema:

Simulación:

You might also like