You are on page 1of 4

Subject:

Microwave Engineering
Experiment No. 9

Title:
To represent TE mode in Rectangular Waveguide
using MATLAB
Date :

Doc. Code: DIET/EC


Rev. No.: 2.00/July-2013

AIM: To represent TE mode in Rectangular Waveguide using MATLAB


MATLAB CODE:
clc;
close all;
clear all;
m=input('Input m=');
n=input('Input n=');
x=0:0.1:10;
y=0:0.05:5;
z=0:0.2:20;
Hoz=1;
f=12e9;
w=2*pi*f;
t=1/f;
g=i*2*pi*f/3e11;
mu=4*3.14e-7;
eb=8.854e-12;
c=abs(1/(mu*eb)^(1/2));
h=((g^2)+(w^2)*mu*eb)^(1/2);
Hz=abs(Hoz.*cos(((m.*pi)/a).*x).*cos(((n.*pi)/b).*y).*(exp(i*w*t-g.*z)));
[Z]=meshgrid(Hz);
[X,Y]=meshgrid(x,y);
Hoy=(g./(h^2))*((n*pi)/b)*Hoz;
Hy=abs(Hoy.*cos(((m.*pi)/a).*x).*sin(((n.*pi)/b).*y).*(exp(i*w*t-g.*z)));
Hox=(g./(h^2))*((m*pi)/a)*Hoz;
Hx=abs(Hox.*sin(((m.*pi)/a).*x).*cos(((n.*pi)/b).*y).*(exp(i*w*t-g.*z)));
Ez=0;
Eox=((i*w*mu)/(h^2))*(Hoz)*((n*pi)/b);
Ex=abs(Eox.*cos(((m.*pi)/a).*x).*sin(((n.*pi)/b).*y).*(exp(i*w*t-g.*z)));
Eoy=-((i*w*mu)/(h^2))*(Hoz)*((m*pi)/a);
Ey=abs(Eoy.*sin(((m.*pi)/a).*x).*cos(((n.*pi)/b).*y).*(exp(i*w*t-g.*z)));
EZ=zeros(101);
[EX]=meshgrid(Ex);
[EY]=meshgrid(Ey);
[HX,HY]=meshgrid(Hx,Hy);
[HZ]=meshgrid(Hz);
[Z]=meshgrid(z);
set(gcf,'Color',[1,1,1])
subplot(2,3,1);mesh(EX,Y,Z);title('EX Component in Y and Zdirection','Color','b','FontName','Helvetica','FontSize',12,'FontWeight','d
emi');;
xlabel('Ex');
ylabel('Y'),zlabel('Z');
subplot(2,3,2);mesh(X,EY,Z);title ('EY Component in X and Zdirection','Color','b','FontName','Helvetica','FontSize',12,'FontWeight','d
emi');
xlabel('X');
ylabel('Ey'),zlabel('Z');
subplot(2,3,3);mesh(X,Y,EZ);title ('For TE mode Ez = 0; Ez Component in X
and Ydirection','Color','b','FontName','Helvetica','FontSize',12,'FontWeight','d
emi');
xlabel('X');

Darshan Institute of Engineering & Technology, Rajkot

Page 1

Subject:
Microwave Engineering
Experiment No. 9

Title:
To represent TE mode in Rectangular Waveguide
using MATLAB
Date :

Doc. Code: DIET/EC


Rev. No.: 2.00/July-2013

ylabel('Y'),zlabel('Ez');
subplot(2,3,4);mesh(HX,Y,Z);title ('Hx Component in Y and Zdirection','Color','b','FontName','Helvetica','FontSize',12,'FontWeight','d
emi');
xlabel('Hx');
ylabel('Y'),zlabel('Z');
subplot(2,3,5);mesh(X,HY,Z);title ('Hy Component in X and Zdirection','Color','b','FontName','Helvetica','FontSize',12,'FontWeight','d
emi');
xlabel('X');ylabel('Hy'),zlabel('Z');
subplot(2,3,6);mesh(X,Y,HZ);title ('Hz Component in X and Zdirection','Color','b','FontName','Helvetica','FontSize',12,'FontWeight','d
emi');
xlabel('X');ylabel('Y'),zlabel('Hz');

RESULTS:
For TE00 Mode:

Darshan Institute of Engineering & Technology, Rajkot

Page 2

Subject:
Microwave Engineering
Experiment No. 9

Title:
To represent TE mode in Rectangular Waveguide
using MATLAB
Date :

Doc. Code: DIET/EC


Rev. No.: 2.00/July-2013

For TE01 Mode:

For TE10 Mode:

Darshan Institute of Engineering & Technology, Rajkot

Page 3

Subject:
Microwave Engineering
Experiment No. 9

Title:
To represent TE mode in Rectangular Waveguide
using MATLAB
Date :

Doc. Code: DIET/EC


Rev. No.: 2.00/July-2013

For TE11 Mode:

CONCLUSION:

LAB IN-CHARGE
Darshan Institute of Engineering & Technology, Rajkot

H.O.D.
Page 4

You might also like