EEE 161
Applied Electromagnetics, Fall 2009.
Laboratory Exercise 8
Waves on a Transmission Line
Problem 1. Using Matlab plot the sinusoidal signal as a function of distance at the time t=0.1ns, 0.2ns, ,.. 1ns. Assume that the frequency of the signal is f=1GHz. Which direction is the signal propagating towards the generator or away from the generator?
Problem 2. Repeat the previous problem if the sign in front of beta is positive. Which direction is the signal propagating now?
Problem 3.To make a movie in Matlab, we use getframe command. Getframe will store the last figure plotted. For example, the following code will generate forward, reflected voltage and current waves for predefined input parameters, and it will generate the graphs to run the movie.Using the code below as a guidance (this code has more than you need to solve this problem), generate a code to make a movie showing the sinusoidal signal as a function of distance. Select appropriate time steps, so that the signal moves smoothly (T/10 time step may be appropriate). Assume that the frequency of the signal is f=1GHz. Length of the line is 0.6m. Which way is the signal moving?
Zl=Z0*(1+reflmag*exp(i*reflph*pi/180))/(1-reflmag*exp(i*reflph*pi/180))
f=freq*10^9
c=3*10^8
beta=2*pi*f/c
gamma=reflmag*exp(i*reflph*pi/180)
omega=2*pi*f
lambda=2*pi/beta
i1=1
frperiod=1/f
gammag=(Zg-Z0)/(Zg+Z0)
Vff=Vg*(Z0/(Z0+Zg))*(exp(-alpha*l-i*beta*l))/(1-reflmag*(exp(i*reflph*pi/180))*gammag*exp(-2*alpha*l-i*2*beta*l))
lim=Vg
for t=0:0.01*frperiod:frperiod
z=[-l:0.01*lambda:0]
vf=Vff*exp(-alpha*z-i*beta*z+i*omega*t)
ifw=(Vff/Z0)*exp(-alpha*z-i*beta*z+i*omega*t)
pf=plot(z,real(vf),z,real(ifw))
set(pf(1),'Color',[1 0.5 0],'LineWidth',2)
set(pf(2),'Color',[0 1 0.5],'LineWidth',2)
axis([-l 0 -lim lim])
%axis vis3d off
mf(i1)=getframe
vr=gamma*Vff*exp(alpha*z+i*beta*z+i*omega*t)
ir=-(gamma/Z0)*Vff*exp(alpha*z+i*beta*z+i*omega*t)
pr=plot(z,real(vr),z,real(ir))
set(pr(1),'Color','magenta','LineWidth',2)
set(pr(2),'Color','cyan','LineWidth',2)
axis([-l 0 -lim lim])
%axis vis3d off
mr(i1)=getframe
vs=vr+vf
is=ifw+ir
ps=plot(z,real(vs),z,real(is))
set(ps(1),'Color','red','LineWidth',2)
set(ps(2),'Color','blue','LineWidth',2)
axis([-l 0 -lim lim])
%axis vis3d off
ms(i1)=getframe
psm=plot(z,real(vf),z,real(vr),z,real(vs))
set(psm(1),'Color',[1 0.5 0])
set(psm(2),'Color','magenta')
set(psm(3),'Color','red')
set(psm,'LineWidth',2)
axis([-l 0 -lim lim])
%axis vis3d off
mpsm(i1)=getframe
psmi=plot(z,real(ifw),z,real(ir),z,real(is))
set(psmi(1),'Color',[0 1 0.5])
set(psmi(2),'Color','cyan')
set(psmi(3),'Color','blue')
set(psmi,'LineWidth',2)
axis([-l 0 -lim/Z0 lim/Z0])
%axis vis3d off
mpsmi(i1)=getframe
i1=i1+1
end
movie(ms,20)
Problem 4. Repeat the previous problem if the sign in front of beta is positive.
Problem 5. Show both signals on the same movie, together with the sum of the two signals.