0% found this document useful (0 votes)
4 views

282

The document outlines various experiments in an Electronics and Communication Engineering lab, focusing on generating electromagnetic waves, verifying Maxwell's equations, and tracing electric and magnetic flux lines using MATLAB. It includes detailed theoretical explanations, MATLAB code for practical implementation, and insights into wave propagation in free space and conducting media. Each experiment aims to enhance understanding of electromagnetic principles through simulation and analysis.
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)
4 views

282

The document outlines various experiments in an Electronics and Communication Engineering lab, focusing on generating electromagnetic waves, verifying Maxwell's equations, and tracing electric and magnetic flux lines using MATLAB. It includes detailed theoretical explanations, MATLAB code for practical implementation, and insights into wave propagation in free space and conducting media. Each experiment aims to enhance understanding of electromagnetic principles through simulation and analysis.
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/ 17

Ref no: 211FA05282

Name:S.B.N.VENKSTESWARARAO
SEC-E

ELECTRONICS AND COMMUNICATION ENGINEERING


22ECE305
EMTL LAB EXPERIMENTS
MODULE-1
Exp-1
Generate Electromagnetic Waves using MATLAB software.
Aim: To generate Electromagnetic Waves using MATLAB software.
Apparatus/Software: Matlab 2014b
Theory: Electromagnetic waves are also known as EM waves. Electromagnetic radiations are
composed of electromagnetic waves that are produced when an electric field comes in contact
with the magnetic field. It can also be said that electromagnetic waves are the composition of
oscillating electric and magnetic fields. Electromagnetic waves are solutions of Maxwell’s
equations, which are the fundamental equations of electrodynamics.
 Generally, an electric field is produced by a charged particle. A force is exerted by this
electric field on other charged particles. Positive charges accelerate in the direction of
the field and negative charges accelerate in a direction opposite to the direction of the
field.
 The Magnetic field is produced by a moving charged particle. A force is exerted by this
magnetic field on other moving particles. The force on these charges is always
perpendicular to the direction of their velocity and therefore only changes the direction
of the velocity, not the speed.
 So, the electromagnetic field is produced by an accelerating charged particle.
Electromagnetic waves are nothing but electric and magnetic fields traveling through
free space with the speed of light c. An accelerating charged particle is when the
charged particle oscillates about an equilibrium position. If the charged particle’s
oscillation frequency is f, then it produces an electromagnetic wave with frequency f.
The wavelength λ of this wave is given by λ = c/f. Electromagnetic waves transfer
energy through space.
 Electromagnetic waves are shown by a sinusoidal graph. It consists of time-varying
electric and magnetic fields which are perpendicular to each other and are also
perpendicular to the direction of Propagation waves Electromagnetic waves are
transverse in nature. The highest point of the wave is known as the crest while the
lowest point is known as a trough which is shown in Fig.1. In a vacuum, the waves
travel at a constant velocity of 3 x 108 m.s-1.

Fig.1
Program/Matlab Code:
clc
clear all
close all
x = linspace(-4,4,100);
y = linspace(-4,4,100);
z = linspace(-4,4,100);
[X, Y, Z] = meshgrid(x, y, z);
Ex = sin(2*pi*(Z/3));
Ey = 0*X;
Ez = 0*X;
[Bx, By, Bz] = curl(X, Y, Z, Ex, Ey, Ez);
for k=1:100
E(k) = mean(mean(Ex(:,:,k),1),2);
B(k) = mean(mean(By(:,:,k),1),2);
end
plot3(0*x, y, E, 'red', 'LineWidth', 2); hold on
quiver3(0*x(1:3:100), y(1:3:100), 0*z(1:3:100), 0*x(1:3:100), 0*y(1:3:100), E(1:3:100),
0,'r','lineWidth', 1.5);
hold on
plot3(B, y, 0*z, 'g','LineWidth', 2);
quiver3(0*x(1:3:100), y(1:3:100), 0*z(1:3:100), B(1:3:100), 0*y(1:3:100), 0*z(1:3:100), 0,
'g', 'lineWidth', 1.5);
grid on, axis square
set(gca, 'FontSize', 15, 'lineWidth',2);
xlabel('x');
ylabel('y');
zlabel('z');

legend('Electric Field','Electric Field Vector','magnatic Field','magnatic Field vector’);


Exp - 2

Verification of Maxwell Equations


Aim: To Verify Maxwell Equations using Matlab
Apparatus/Software: Matlab 2014b
Theory:

1.Maxwell First Equation

Maxwell’s first equation is based on the Gauss law of electrostatic, which states that “when a
closed surface integral of electric flux density is always equal to charge enclosed over that
surface”

Gauss Law

Gauss law describes the nature of the electric field around electric charges. The law is
expressed in terms of electric charge density and electric charge density. The inverted triangle
is called the divergence operator.

The equations hold well at any point in space. When the electric charge exists somewhere,
the divergence of D at that particular point is nonzero, else it is zero.

2.Maxwell Second Equation

Maxwell second equation is based on Gauss law on magnetostatics.

Gauss law on magnetostatics states that “closed surface integral of magnetic flux density is
always equal to total scalar magnetic flux enclosed within that surface of any shape or size
lying in any medium.”

Gauss’ Magnetism Law

You need to be familiar with Gauss Law for the electric field to understand this
equation. You can see that both equations indicate the divergence of the field. The top
equation states that the divergence of the electric flux density D equals the volume of electric
charge density.
The second equation states the divergence of the Magnetic Flux Density (B) is null.

3. Maxwell Third Equation

Statement: Time-varying magnetic field will always produce an electric field. Maxwell’s 3rd
equation is derived from Faraday’s laws of Electromagnetic Induction. It states that “Whenever
there are n-turns of conducting coil in a closed path placed in a time-varying magnetic field, an
alternating electromotive force gets induced in each coil.” Lenz’s law gives this. Which states,”
An induced electromotive force always opposes the time-varying magnetic flux.”

Faraday’s Law

Fig.2
Faraday was a scientist whose experiment setup led to Faraday’s Law which is shown in the
above figure .2. The experiment is not very complex. When a battery is disconnected, no
electricity flows through the wire. Hence, no magnetic flux is induced in the iron (Magnetic
Core). The iron acts like a magnetic field that flows easily in a magnetic material. The purpose
of the core is to form a path for the flow of magnetic flux.

4. Maxwell Fourth Equation

It is based on Ampere’s circuit law. To understand Maxwell’s fourth equation, it is crucial to


understand Ampere’s circuit law, Consider a wire of a current-carrying conductor with the
current I. Since there is an electric field, there has to be a magnetic field vector around it.
Ampere’s circuit law states that “The closed line integral of magnetic field vector is always
equal to the total amount of scalar electric field enclosed within the path of any shape”, which
means the current flowing along the wire (which is a scalar quantity) is equal to the magnetic
field vector (which is a vector quantity)

Ampere’s Law

The law shows the relationship between the flow of electric current and the magnetic field
around it. Suppose the wire carries a current I, the current produces a magnetic field that
surrounds the wire.

Program / Matlab Code:


i)Ampere’s Law Example:

clc;
close all;
clear all;
mu0 = pi*4E-7;
AmpereB = @(m0u,I,r) (mu0.*I)./(2*pi*r);
radius = linspace(1E-3, 1);
I = 1;
Figure (1)
semilogy(radius, AmpereB(mu0,I,radius))
grid
xlabel('r (m)')
ylabel('B')

ii) Faraday Law Example


clc;
clear all;
close all;
J = 500;
N = 20;
pi = 4 * atan(1);
f = 1;
omega = 2 * pi * f;
k = 2 * pi;
c = omega / k;
lambda = c / f;
a = 3 * lambda;
dx = a / J;
dt = dx / c;
x = [0:dx:a];
%axis("manual",[0,a,-2,2])
t = 0;
u0 = sin(omega*t-k*x);
v0 = omega * cos(omega*t-k*x);
u = sin(omega*t-k*x);
plot(x,[u;u0]);
t = dt;
u1 = u0 + dt * v0;
u = sin(omega*t-k*x);
plot(x,[u;u1]);
for n=1:N
t = t + dt;
u = sin(omega*t-k*x);
for j=2:J
u2(j) = u1(j+1) + u(j-1) - u0(j);
end;
end;
u2(1) = u1(2) + u(J) - u0(1);
u2(J+1) = u2(1);
plot(x,[u;u2]);
u0 = u1;
u1 = u2;
Exp-3

Generate tracing of electric and magnetic flux lines for


standard configuration
Aim: To generate tracing of electric and magnetic flux lines for standard configuration using
MATLAB

Apparatus/Software: Matlab 2014b


Theory:
The theory of electric and magnetic flux lines is based on the fundamental principles of
electromagnetism, which is a branch of physics that deals with the interaction of electric and
magnetic fields. Electric and magnetic fields are vector fields that describe the distribution of
electric and magnetic forces in space.In this theory, electric flux lines and magnetic flux lines
are imaginary lines used to visualize and understand the behavior of electric and magnetic
fields. These lines help to illustrate the direction and strength of the fields at different points in
space.
Electric flux lines:
Electric flux lines, also known as electric field lines, are used to represent the electric field
around charged particles or configurations of charges. Electric field lines originate from
positive charges and terminate on negative charges. The density of the lines indicates the
strength of the electric field, with closer lines representing a stronger field. The direction of the
electric field is given by the tangent to the electric flux lines at any point, pointing in the
direction that a positive test charge would experience a force.
Magnetic flux lines:
Magnetic flux lines, also called magnetic field lines, are used to depict the magnetic field
around magnets or current-carrying conductors. Unlike electric flux lines, magnetic flux lines
do not have a definite starting or ending point. Instead, they form closed loops, either in a
straight line or in more complex patterns. The density of the lines indicates the strength of the
magnetic field, with denser lines representing a stronger field. The direction of the magnetic
field is given by the tangent to the magnetic flux lines at any point, indicating the direction a
north magnetic pole would experience a force.
Both electric and magnetic field lines obey certain properties and laws, such as the inverse
square law, which states that the strength of the field decreases with the square of the distance
from the source, and the superposition principle, which states that the total field at a point due
to multiple sources is the vector sum of the fields produced by each source individually.
Program/Matlab Code:
clc;
clear all;
close all;
x = linspace(-1, 1, 100); % x-coordinates
y = linspace(-1, 1, 100); % y-coordinates
[X, Y] = meshgrid(x, y); % 2D grid

% Magnetic Field Components (Modify these according to your configuration)


Bx = -Y; % x-component of magnetic field
By = X; % y-component of magnetic field

% Electric Field Components (Modify these according to your configuration)


Ex = X; % x-component of electric field
Ey = Y; % y-component of electric field

% Plotting
figure;
quiver(X, Y, Bx, By, 'b'); % Plot magnetic field vectors
hold on;
quiver(X, Y, Ex, Ey, 'r'); % Plot electric field vectors
title('Electric and Magnetic Field Flux Lines');
xlabel('x');
ylabel('y');
axis tight;

% Tracing Magnetic Flux Lines


start_points = [-0.8, 0; -0.6, 0; -0.4, 0; -0.2, 0; 0, 0; 0.2, 0; 0.4, 0; 0.6, 0; 0.8, 0]; % Starting
points for magnetic flux lines
streamline(X, Y, Bx, By, start_points(:,1), start_points(:,2)); % Trace magnetic flux lines
% Tracing Electric Flux Lines
start_points = [-0.8, -0.8; -0.6, -0.6; -0.4, -0.4; -0.2, -0.2; 0, 0; 0.2, 0.2; 0.4, 0.4; 0.6, 0.6; 0.8,
0.8]; % Starting points for electric flux lines
streamline(X, Y, Ex, Ey, start_points(:,1), start_points(:,2)); % Trace electric flux lines

% Adjust plot properties


xlim([-1.1 1.1]);
ylim([-1.1 1.1]);
grid on;
legend('Magnetic Field', 'Electric Field');
Exp -4
Wave propagation in free space and conducting medium
AIM: Calculation of Wave propagation in free space and conducting medium using
MATLAB
Apparatus/Software: Matlab 2014b
Theory:
Wave propagation in free space and conducting mediums follows different principles due to
the interaction of electromagnetic waves with the surrounding environment.
Wave Propagation in Free Space:
In free space, which refers to a vacuum or an environment devoid of any matter,
electromagnetic waves propagate without any significant interaction or loss. These waves are
characterized by their wavelength (λ) and frequency (f), related by the equation c = λf, where
c is the speed of light in a vacuum (approximately 3 x 10^8 meters per second). Electromagnetic
waves in free space travel at the speed of light and exhibit properties such as reflection,
refraction, and diffraction. When an electromagnetic wave propagates in free space, the electric
and magnetic fields oscillate perpendicular to each other and perpendicular to the direction of
wave propagation, forming transverse waves. These waves can be described using Maxwell's
equations, which govern the behaviour of electromagnetic fields. In free space, the electric and
magnetic fields are orthogonal and mutually perpendicular to the direction of wave
propagation.
Wave Propagation in Conducting Media:
When electromagnetic waves propagate through conducting media, such as metals or
electrolytes, the interaction between the waves and the conducting medium leads to absorption
and attenuation of the wave energy. This interaction is primarily caused by the conductivity of
the medium. Conducting media contain free charge carriers (e.g., electrons) that can respond
to the oscillating electric field of an electromagnetic wave. The presence of these charge
carriers results in the absorption of energy from the wave and the conversion of that energy
into heat. This absorption process causes the amplitude of the wave to decrease exponentially
as it propagates through the conducting medium. The rate of attenuation depends on the
conductivity of the medium and the frequency of the wave. Higher conductivities and higher
frequencies result in faster attenuation.
In addition to attenuation, electromagnetic waves in conducting media also experience
reflection and refraction at the interfaces between different media. The reflection and refraction
coefficients depend on the angle of incidence, the conductivity of the media, and the frequency
of the wave. It's worth noting that in highly conductive materials, such as metals,
electromagnetic waves are almost entirely reflected at the surface due to the rapid attenuation
of the fields within the material. This behaviour is exploited in applications such as mirrors and
conductive shielding.
Note: wave propagation in free space follows the principles of electromagnetic wave theory,
where waves travel at the speed of light without significant attenuation. However, in
conducting media, the interaction between the wave and the conducting material leads to
absorption, attenuation, and altered reflection and refraction characteristics.

Program/Matlab Code:
Iclc;
clear all;
close all;
% Parameters
c0 = 3e8; % Speed of light in vacuum (m/s)
delta = 1e-3; % Spatial step size (m)
dt = delta/c0; % Time step size (s)
T = 2000; % Total number of time steps
L = 400; % Total number of spatial steps

% Constants for the conducting medium


sigma = 0.01; % Conductivity of the medium (S/m)
eps0 = 8.854e-12; % Permittivity of free space (F/m)

% Initialization
Ex = zeros(T, L); % Electric field in x-direction
Hy = zeros(T, L); % Magnetic field in y-direction

% Main loop (FDTD algorithm)


for t = 2:T
for x = 2:L-1
% Update magnetic field (Hy) using Faraday's law
Hy(t, x) = Hy(t-1, x) + (Ex(t-1, x+1) - Ex(t-1, x)) * dt / (delta * eps0);
end

for x = 2:L-1
% Update electric field (Ex) using Ampere's law with the conductivity
Ex(t, x) = Ex(t-1, x) + (Hy(t, x) - Hy(t, x-1)) * dt * c0 / delta;
Ex(t, x) = Ex(t, x) - (sigma * dt / (eps0)) * Ex(t, x);
end
end

% Plotting the results


x = delta * (1:L);
t = dt * (1:T);
[X, T] = meshgrid(x, t);

figure;
surf(X, T, Ex);
shading flat;
colormap jet;
xlabel('Distance (m)');
ylabel('Time (s)');
zlabel('Electric Field (V/m)');
title('Wave Propagation in a Conducting Medium');
Exp 5

Uniform plane wave equation (Lossy or Lossless)


AIM: Calculation of uniform plane wave equation using MATLAB
Apparatus/Software: Matlab 2014b

Theory:
Explaining Wave Propagation in Lossless Media:
A lossless medium is a medium with zero conductivity and finite permeability and
permittivity. When an electromagnetic wave propagates through a lossless medium, the
amplitude of its electric field or magnetic field remains constant throughout the propagation.
The properties of the lossless medium affect the speed of propagation, and it is reduced by a
factor of 1/ ( √𝝁r𝜺r) compared to the speed of the electromagnetic waves in the vacuum. A
lossless medium for electromagnetic waves is a medium with
zero conductivity (𝞂)
finite permeability (𝝁)
permittivity(𝜺).
It can be described using the equation below:

Consider a plane wave propagating in the y-direction, with electric and magnetic fields
mutually perpendicular to each other and to the wave propagation. A set of wave equations
are used to define the electromagnetic waves:

The general solution to the linear, homogenous second order differential equations can be
given in equations 4 and 5.

From the above equations, we can conclude that other than the field amplitudes, E1, E2, H1,
and H2, the electromagnetic wave characteristics of the fields are identical. Characteristics of
the electromagnetic waves defined by the general field solutions can be determined by
investigating the corresponding instantaneous electric or magnetic fields. Taking this into
consideration, the time-domain solution of the wave equation in terms of the electric field can
be represented by equation 6.

In the equation, 𝛂 is the attenuation constant, 𝛃 is the phase constant, and 𝛚 is the angular
velocity of propagation.
Explaining Wave Propagation in Lossy Dielectrics:
A lossy dielectric can be described as a medium where some fraction of the
electromagnetic wave power is lost as the wave propagates. This power loss is due to poor
conduction. A lossy dielectric offers a partially conducting medium with conductivity 𝜎≠0.
The lossy dielectric can be represented with the conductivity, permeability, and permittivity
parameters as follows:

Maxwell’s equations governing a linear, isotropic, homogenous, charge-free lossy dielectric


can be given by equations (1) to (4):

By taking the curl on both sides of equations (3) and (4), we can obtain Helmholtz’s
equations or the wave equations given by equations (5) and (6), respectively.

Where the following is true:

In terms of dielectric material property, 𝛂 and 𝛃 can be given as:


With these considerations, if we assume that an electromagnetic wave is propagating along
+az direction and Es is the electric field that has only an x component, then the following is
true:

Substituting equation (10) into equation (5), the scalar wave equation is:

According to the assumption that the field must be finite at infinity, E,0 =0. Equation (11) can
be rewritten using factor e-𝛼z as:

From equation (12), the magnitude of E versus t can be plotted. Only the x component of E
travels along the +z direction. H(z,t) can also be obtained in a similar way, and can be given
as:

𝜂 is the intrinsic impedance of the medium, given by:

Substituting (14) and (15) into (13), H can be written as:

Program/Matlab Code:
clc;
clear all;
close all;
t=0:0.0005:5;
z=0:0.0005:5;
eta=377;
theta=pi/2;
E0=50;
a=0;
u=1.256*(10.^-6);
e=8.854*(10.^-12);
f=600000000;
w=2*pi*f;
b=w*((u*e).^0.5);
E=E0/eta;
H=E*exp(-a*z).*cos(w*t-b*z-theta);
Ez=E0*exp(-a*z).*cos(w*t-b*z);
figure(1);
subplot(211),plot(z,H,'r');
xlabel('Dispalcement(metres)');
ylabel('Magnetic Field Intensity(H)');
title('Plane wave propagation in Lossy medium');
subplot(212),plot(z,Ez,'g');
xlabel('Dispalcement(metres)');
ylabel('Electric Field Intensity(E)');
title ('Plane wave propagation in Lossy medium');

You might also like