You are on page 1of 1
Draw the Smith Chart Using MATLAB 1, 21=150+360, 20=50 2. ZL=170-310, 20=75 3. 21=180-380, 20=100 t= linspace(0, 2*pi, 100); cos (t); y= sin(t); plot(x, y, ‘Linewidth', 3); axis equal; s Place title and remove ticks from axes title(* Smith Chart ') set (gca, 'xticklabel", {{] set (gea, "yticklabel", ((]}) hold on % Draw circles along horizontal axis k= [.28 5-75); for i= 1: length(k) wG,t) = kG) + (2 = kG) * costth yiiei) = (1 > kG)) * sin(ty: plotix(iyt), yids TED end § Draw partial circles along vertical axis kt = (2.5 pi 3.79 4.2217 ke (.512 47 for i= 1: lengthikt) t= linspace(kt (i), 1-5*pi, 50) alist) = 14 kG) * costt)y (ist) = ki) + RG) * silt): plot (a(istly Biss), "he's alieed, ~bUdes de "KE" ) end 5 Draw appropriate chart 3 draw_smith_chart 4 Normalize given impedance die input ("Enter the value of Load Impedance 2L. Zou input(tEnter the value of Source Impedance 20 wmwmmm--") 21 = 21/20 + calculate reflection coefficient , magnitude and angle in radian g- (2l- W/(zl + m= abs(g) th = angle(g) 5 Plot appropriate point polar(th, m, 'b*") 4 Change radians to degrees thd = th * 160/pi « Calculate VSWR and return loss. » Eaten add epsilon to magnitude, Lo avoid div by 0 or Logi) gan < (1+ m)/Q ~ m+ eps) rloss = 20 * loglO(m 4 eps) Scanned with CamScanner

You might also like