




















Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Prepara tus exámenes
Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Prepara tus exámenes con los documentos que comparten otros estudiantes como tú en Docsity
Los mejores documentos en venta realizados por estudiantes que han terminado sus estudios
Estudia con lecciones y exámenes resueltos basados en los programas académicos de las mejores universidades
Responde a preguntas de exámenes reales y pon a prueba tu preparación
Consigue puntos base para descargar
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Comunidad
Pide ayuda a la comunidad y resuelve tus dudas de estudio
Descubre las mejores universidades de tu país según los usuarios de Docsity
Ebooks gratuitos
Descarga nuestras guías gratuitas sobre técnicas de estudio, métodos para controlar la ansiedad y consejos para la tesis preparadas por los tutores de Docsity
Una serie de ejercicios prácticos para el cálculo del campo eléctrico generado por diferentes configuraciones de cargas en un plano 2d utilizando matlab. Los ejercicios incluyen la implementación de código para calcular el campo eléctrico debido a dipolos y arreglos de cargas, y la visualización de los resultados mediante gráficos de contorno. Útil para estudiantes de ingeniería que buscan comprender los conceptos básicos del campo eléctrico y su aplicación en el diseño de antenas.
Tipo: Ejercicios
1 / 28
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!
% This simple program computes the Electric Fields due to dipole % in a 2-D plane using the Coulomb's Law %-------------------------------------------------------------------------% clc close all; clear all; %-------------------------------------------------------------------------% % SYMBOLS USED IN THIS CODE %-------------------------------------------------------------------------% % E = Total electric field % Ex = X-Component of Electric-Field % Ey = Y-Component of Electric-Field % n = Number of charges % Q = All the 'n' charges are stored here % Nx = Number of grid points in X- direction % Ny = Number of grid points in Y-Direction % eps_r = Relative permittivity % r = distance between a selected point and the location of charge % ex = unit vector for x-component electric field % ey = unit vector for y-component electric field %-------------------------------------------------------------------------% %-------------------------------------------------------------------------% % INITIALIZATION % Here, all the grid, size, charges, etc. are defined %-------------------------------------------------------------------------% % Constant 1/(4piepsilon_0) = 910^ k = 910^9; % Enter the Relative permittivity eps_r = 1; charge_order = 10^-9; % milli, micro, nano etc.. const = k*charge_order/eps_r; % Enter the dimensions Nx = 101; % For 1 meter Ny = 101; % For 1 meter % Enter the number of charges. n = 2;
xlabel('x ','fontsize',14); ylabel('y ','fontsize',14); title('Electric field distribution, E (x,y) in V/m','fontsize',14); %-------------------------------------------------------------------------% % REFERENCE % SADIKU, ELEMENTS OF ELECTROMAGNETICS, 4TH EDITION, OXFORD %-------------------------------------------------------------------------% Grafica: Explicación:
% This simple program computes the Electric Fields due to dipole % in a 2-D plane using the Coulomb's Law %-------------------------------------------------------------------------% clc close all; clear all; %-------------------------------------------------------------------------% % SYMBOLS USED IN THIS CODE %-------------------------------------------------------------------------% % E = Total electric field % Ex = X-Component of Electric-Field % Ey = Y-Component of Electric-Field % n = Number of charges % Q = All the 'n' charges are stored here % Nx = Number of grid points in X- direction % Ny = Number of grid points in Y-Direction % eps_r = Relative permittivity % r = distance between a selected point and the location of charge % ex = unit vector for x-component electric field % ey = unit vector for y-component electric field %-------------------------------------------------------------------------% %-------------------------------------------------------------------------% % INITIALIZATION % Here, all the grid, size, charges, etc. are defined %-------------------------------------------------------------------------% % Constant 1/(4piepsilon_0) = 910^ k = 910^9; % Enter the Relative permittivity eps_r = 1; charge_order = 10^-9; % milli, micro, nano etc.. const = k*charge_order/eps_r; % Enter the dimensions Nx = 101; % For 1 meter Ny = 101; % For 1 meter % Enter the number of charges. n = 3;
xlabel('x ','fontsize',14); ylabel('y ','fontsize',14); title('Electric field distribution, E (x,y) in V/m','fontsize',14); %-------------------------------------------------------------------------% % REFERENCE % SADIKU, ELEMENTS OF ELECTROMAGNETICS, 4TH EDITION, OXFORD %-------------------------------------------------------------------------% GRAFICA : EXPLICACION: En ese código tenemos 3 cargas positivas en un plano 2d
k = 910^9; % Enter the Relative permittivity eps_r = 1; charge_order = 10^-9; % milli, micro, nano etc.. const = kcharge_order/eps_r; % Enter the dimensions Nx = 101; % For 1 meter Ny = 101; % For 1 meter % Enter the number of charges. n = 3; % Electric fields Initialization E_f = zeros(Nx,Ny); Ex = E_f; Ey = E_f; % Vectors initialization ex = E_f; ey = E_f; r = E_f; r_square = E_f; % Array of charges Q = [-1,1,-1,1]; % Array of locations X = [5,-5,0]; Y = [0,0,-5]; %------------------------------------------------------------------------ -% % COMPUTATION OF ELECTRIC FIELDS %------------------------------------------------------------------------ -% % Repeat for all the 'n' charges for k = 1:n q = Q(k); % Compute the unit vectors for i=1:Nx for j=1:Ny r_square(i,j) = (i-51-X(k))^2+(j-51-Y(k))^2; r(i,j) = sqrt(r_square(i,j)); ex(i,j) = ex(i,j)+(i-51-X(k))./r(i,j);
GRAFICA : EXPLICACION: Se modifica el código del punto 2 para que genere carga positivas y negativas
fontSize = 20; A = 10; % Amplitude. t = linspace(0, 2 * pi, 40); signal = A .* cos(t) + A .* sin(t); stem(t, signal, 'bo-', 'LineWidth', 2); xlabel('t', 'FontSize', fontSize); ylabel('signal', 'FontSize', fontSize); title('RHCP', 'FontSize', fontSize); grid on; % Enlarge figure to full screen. set(gcf, 'units','normalized','outerposition',[0 0 1 1]); % Give a name to the title bar. set(gcf,'name','Demo by ImageAnalyst','numbertitle','off')
plot( x2, 0x2,'k','LineWidth',3); plot( x2, 0.3x2,'k','LineWidth',3); plot(0*x2, x2,'k','LineWidth',3); hold off axis([-4 20 -2 3]) title('Linear polarized wave','fontsize',18) % title('Right-handed circularly polarized wave','fontsize',18) % title('Left-handed circularly polarized wave','fontsize',18) M(:,n) = getframe(gcf); end clf reset set(gcf,'Position',[100 100 800 600]) axis off movie(M,1,6) close all Grafica:
clear all % Parameters for different media % free space: kr=1, ki=1, phi= % plasma medium: kr=0, ki=1, phi=pi/ % very lossy medium: kr=1, ki=1, phi=pi/ kr = 11; ki = 01; phi = pi/2; xmax = 30; xmin = -4; delx = 0.1; x = [ 0:delx:xmax]; x2 = [xmin:delx:xmax]; framemax = 48; M = moviein(framemax); set(gcf,'Position',[100 100 640 480]) for n=1:framemax % % ==== Right-handed circularly polarized wave % E1 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax ); % E2 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax+phi); % ==== Left-handed circularly polarized wave E1 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax ); E2 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax-phi); E=E1+E2; figure(1)
GRAFICA: EXPLICACION: Notamos que con una polarización diferente la onda se graficada en 3d tiene un movimiento diferente en el espacio
clear all % Parameters for different media % free space: kr=1, ki=1, phi= % plasma medium: kr=0, ki=1, phi=pi/ % very lossy medium: kr=1, ki=1, phi=pi/ kr = 11; ki = 01; phi = 0; xmax = 30; xmin = -4; delx = 0.1; x = [ 0:delx:xmax]; x2 = [xmin:delx:xmax]; framemax = 48; M = moviein(framemax); set(gcf,'Position',[100 100 640 480]) for n=1:framemax % % ==== Right-handed circularly polarized wave % E1 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax ); % E2 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax+phi); % ==== Left-handed circularly polarized wave E1 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax ); E2 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax-phi); E=E1+E2; figure(1) whitebg([1 1 1]); %plot(x, E ,'r' ,'LineWidth',3); plot(x+round(100E2)/30,E,'b' ,'LineWidth',3); hold on plot(x(1)+round(100E2(1))/30,E(1),'ro' ,'LineWidth',3); % plot(x, S ,'g' ,'LineWidth',3);
EXPLICACION: Notamos que con una polarización diferente la onda se graficada en 3d tiene un movimiento diferente en el espacio
clear all % Parameters for different media % free space: kr=1, ki=1, phi= % plasma medium: kr=0, ki=1, phi=pi/ % very lossy medium: kr=1, ki=1, phi=pi/ kr = 11; ki = 01; phi = pi/2; xmax = 30; xmin = -4; delx = 0.1; x = [ 0:delx:xmax]; x2 = [xmin:delx:xmax]; framemax = 48; M = moviein(framemax); set(gcf,'Position',[100 100 640 480]) for n=1:framemax % % ==== Right-handed circularly polarized wave % E1 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax ); % E2 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax+phi); % ==== Left-handed circularly polarized wave E1 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax ); E2 = exp(-0.3.x.ki).cos(kr.x-2pin/framemax-phi); E=E1+E2; figure(1) whitebg([1 1 1]); %plot(x, E ,'r' ,'LineWidth',3); plot(x+round(100*E2)/30,E,'b' ,'LineWidth',3);