Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

function standing_wave clc; Vo_plus=1; f = figure(1); set(f,\'Color\',[0.941 0.9

ID: 3785931 • Letter: F

Question

function standing_wave

clc;

Vo_plus=1;

f = figure(1);

set(f,'Color',[0.941 0.941 0.941])

ZL_real=50;

ZL_imag=0;

ZL=ZL_real+ZL_imag*1j;

Zo=50;

gamma=(ZL-Zo)/(ZL+Zo);

mag_gamma=abs(gamma);

phase_gamma=rad2deg(angle(gamma));

d = 0:0.01:1; %in terms of lambda

Vd = @(ZL) sqrt(1+(abs((ZL-Zo)/(ZL+Zo)))^2+2*abs((ZL-Zo)/(ZL+Zo))*cos(2*2*pi*d-angle((ZL-Zo)/(ZL+Zo))));

  

demo = plot(d, Vd(ZL),'LineWidth',2.5);

grid on

axis tight

axis([0 1 0 2])

xlabel('Distance from load in terms of wavelength','FontSize',13)

ylabel('|Vd| in terms of Vo+','FontSize',13)

  

set(gca, 'position', [0.1 0.3 0.85 0.6]);

  

h = uicontrol(...

'parent' , f,...

'units' , 'normalized',...

'style' , 'slider',...

'position', [0.05 0.05 0.44 0.05],...

'min' , 0,... %// Make the ZL between 0...

'max' , 1000,... %// and 10000, with initial value

'SliderStep',[0.01 0.1],...

'value' , ZL,... %// as set above.

'String', 'Load Impedance',...

'FontSize',12.5,...

'callback', @sliderCallback);

  

h2 = uicontrol(...

'parent' , f,...

'units' , 'normalized',...

'style' , 'slider',...

'position', [0.5 0.05 0.45 0.05],...

'min' ,-500,... %// Make the ZL between 0...

'max' , 500,... %// and 10000, with initial value

'SliderStep',[0.01 0.1],...

'value' , ZL,... %// as set above.

'String', 'Load Impedance',...

'FontSize',12.5,...

'callback', @sliderCallback);

  

uicontrol('Style','text','string','0','units','normalized','position',...

[0.05 0.01 0.03 0.04],'FontSize',10,'BackgroundColor',[0.941 0.941 0.941] );

  

uicontrol('Style','text','string','-500','units','normalized',...

'position',[0.5 0.01 0.07 0.04],'FontSize',10,'BackgroundColor',[0.941 0.941 0.941] );

  

uicontrol('Style','text','string','500','units','normalized',...

'position',[0.9 0.01 0.07 0.04],'FontSize',10,'BackgroundColor',[0.941 0.941 0.941]);

  

uicontrol('Style','text','string','1000','units','normalized',...

'position',[0.4 0.01 0.07 0.04],'FontSize',10,'BackgroundColor',[0.941 0.941 0.941]);

  

uicontrol('Style','text','string','Re{ZL} =','units','normalized',...

'position',[0.15 0.12 0.2 0.05],...

'FontSize',12,'FontWeight','Bold','BackgroundColor',[0.941 0.941 0.941]);

uicontrol('Style','text','string','Imag{ZL} =','units',...

'normalized','position',[0.55 0.12 0.2 0.05],'FontSize',12,'FontWeight','Bold','BackgroundColor',[0.941 0.941 0.941]);

  

uicontrol('Style','text','string','Mag(gamma) =','units','normalized',...

'HorizontalAlignment','left','position',[0.15 0.91 0.3 0.05],...

'FontSize',12,'FontWeight','Bold','BackgroundColor',[.7 .9 .7]);

  

uicontrol('Style','text','string','Phase(gamma)[deg] =','units','normalized',...

'HorizontalAlignment','left','position',[0.47 0.91 0.4 0.05],...

'FontSize',12,'FontWeight','Bold','BackgroundColor',[.7 .9 .7]);

  

uicontrol('Style','text','string','USF','units','normalized',...

'HorizontalAlignment','center','position',[0.9 0.95 0.1 0.05],...

'FontName','Mathcad UniMath','FontSize',18,'ForegroundColor',[0.792 0.733 0.384],'FontWeight','Normal',...

'BackgroundColor',[.0 .4 .0]);

% hLstn = handle.listener(h,'ActionEvent',@sliderCallback);

A1=uicontrol('Style','text','units','normalized','position',[0.35 0.12 0.08 0.05],...

'FontSize',12,'FontWeight','Bold' );

S1=sprintf('%g',ZL_real);

set(A1,'string',S1);

  

A2=uicontrol('Style','text','units','normalized','position',[0.75 0.12 0.08 0.05],...

'FontSize',12,'FontWeight','Bold' );

S2=sprintf('%g',ZL_imag);

set(A2,'string',S2);

  

A3=uicontrol('Style','text','units','normalized','position',[0.35 0.91 0.08 0.05],...

'FontSize',12,'FontWeight','Bold','BackgroundColor',[.7 .9 .7]);

S3=sprintf('%1.3g',mag_gamma);

set(A3,'string',S3);

  

A4=uicontrol('Style','text','units','normalized','position',[0.77 0.91 0.08 0.05],...

'FontSize',12,'FontWeight','Bold','BackgroundColor',[.7 .9 .7]);

S4=sprintf('%1.3g',phase_gamma);

set(A4,'string',S4);

  

function sliderCallback(~,~)

delete(demo);

% display(get(h,'value'))

ZL_real=(get(h,'value'));

ZL_imag=(get(h2,'value'));

ZL=ZL_real+1j*ZL_imag;

gamma=(ZL-Zo)/(ZL+Zo);

mag_gamma=abs(gamma);

phase_gamma=rad2deg(angle(gamma));

demo = plot(d, Vd(ZL),'LineWidth',2.5);

grid on

axis tight

axis([0 1 0 2])

xlabel('Distance from load in terms of wavelength','FontSize',13)

ylabel('|Vd| in terms of Vo+','FontSize',13)

S1=sprintf('%g',ZL_real);

set(A1,'string',S1);

S2=sprintf('%g',ZL_imag);

set(A2,'string',S2);

S3=sprintf('%1.3g',mag_gamma);

set(A3,'string',S3);

S4=sprintf('%1.3g',phase_gamma);

set(A4,'string',S4);

end

  

end

Help with Matlab section please.

Problem 2.19 A 50-n lossless transmission line is terminated in a load with imped ZL" (0 j50) 2. The wavelength is 8 cm. Find (a) the reflection coefficient at the load, (b) the standing-wave ratio on the line. (c) the position of the voltage maximum nearest the load. (d) the position of the current maximum nearest the load. rif r solutio sing M Download standing wave.m from canvas and run the file. You will get the following interactive GUI: 15 Distance from loadin terms of wavelength Use the sliders to set the load impedance to the value for ZL in problem 2.19 and verify your answer for the reflection coefficient. Place a marker on the maximum nearest to the load, determine its distance from the load and verify your answer to part (c) (Note: The x-axis in the graph is in terms of wavelength. To obtain the physical length, multiply by the wavelength in the question). To place the marker, click on View Figure Toolbar and then click on .Include a screenshot of your graph in your homework submission 2 Pointsl

Explanation / Answer

a) Given data: Z0 = 50 , where Z0 is lossless transmission line/Characteristics Impedance

ZL = (30-j50) , where ZL is Impedance

=8, where wavelength

the reflection coefficient at the load is denoted by

so by applying the formula

=( ZL Z0)/( ZL +Z0)

Putting the values from the given data we will get

= [(30 j50)50]/ [(30 j50)+50]

    = 0.57e j79.8 (By using scientific calculator we get these value)

Ans: The reflection coefficient at the load is 0.57e j79.8

b)Here S = the standing-wave ratio on the line.

We have to find out the standing-wave ratio on the line, so by applying the formula

S =( 1+|| )/(1||)

=(1+0.57)/( 10.57)

=3.65 (By using scientific calculator we get the value)

ANS: The standing-wave ratio on the line, S is 3.65

c)Here the position of the voltage maximum nearest the load is denoted by Dmax

Dmax = ( r/ 4) +( n/ 2)

Putting the values from the given data we will get

Dmax = (79.8 ×8 cm* rad)/( 4 *180) + (n×8 cm /2)

            = 0.89 cm+4.0 cm

            = 3.11 cm

Ans: The position of the voltage maximum nearest the load is 3.11 cm

d) A current maximum occurs at a voltage minimum so here the position of the current maximum nearest the load is denoted by dmin

So, by applying formula we will get:

dmin = dmax –(/4)

             = 3.11 cm(8 cm/4)  

= 1.11 cm.

Ans :The position of the current maximum nearest the load, dmin= 1.11 cm.