You are on page 1of 4

Si ZL= 100+j150, a=0, Zo=50Ω y l = 0.

6λ, localice a) Γ, b)S, c)YL


%% Práctica 1: "Carta de Smith"

close all; clear all; clc; format long;

Z0 = 50;
sm1 = smithchart;
ZL = 100+1i*150;
Y0=1/Z0;

sm1 = smithchart;
ax = gca;
hold all;
sm1.Values = [.1 .2 .3 .5 1 1.5 2 3.5 5;1 1.5 2 3.5 5 5 5 15 30];
sm1.SubColor = [.2 .2 .2];
gamma_ZL = (ZL-Z0)/(ZL+Z0);
gamma_YL = -gamma_ZL;

YL=Y0*(1-gamma_YL)/(1+gamma_YL);
Y1=1/ZL;
R = abs(gamma_ZL);
theta1 = imag(gamma_ZL);
S = (1+abs(real(R)))/(1-abs(real(R))); % Onda Estacionaria
% theta2 = theta1 + theta;

if imag(ZL)<0
sign1 = '-';
else
sign1='+';
end

gamma = z2gamma(ZL,Z0);
r = abs(gamma);
alpha = 2*pi;
radio = r.*cos(alpha),r.*sin(alpha);

% Llamada a la función que grafica el diagrama de Smith


Smith_plotRefLine2PhaseCircle(ax,ZL,Z0)
%[x_circ1,y_circ1] = Smith_plotGammaCircle(ax,ZL,Z0);

Zin=ZL/Z0;
len=.200;
g=gamma_YL;
tet_len=720*len/(360);
D_step=tet_len/1000;
dD=D_step;
for tet=0 :D_step :tet_len
Zin=Z0*(1/YL+j*Z0*tan(2*pi*dD))/(Z0+j*1/YL*tan(2*pi*dD));
gamma=z2gamma(Zin, Z0);

g=[g gamma];
plot(ax,real(gamma), imag(gamma), 'mo','LineWidth',1.5);
dD=dD+D_step;
%pause(0.001);
end
Zin=ZL/Z0;
len=.100;
g=gamma_YL;
tet_len=720*len/(360);
D_step=tet_len/1000;
dD=D_step;
for tet=0 :D_step :tet_len
Zin=Z0*(1/YL+j*Z0*tan(2*pi*dD))/(Z0+j*1/YL*tan(2*pi*dD));
gamma=z2gamma(Zin, Z0);

g=[g gamma];
plot(ax,real(gamma), imag(gamma), 'ro','LineWidth',1.5);
dD=dD+D_step;
%pause(0.001);
end
Smith_plotOpRefLine2PhaseCircle(ax,1/Zin,1/Z0);
%Smith_plotZ(ax,ZL,Z0);
Z_target1=Zin;
% Gráfica de cada punto en el diagrama de Smith
plot(ax,real(gamma_ZL),imag(gamma_ZL),'redo','LineWidth',1.5);
plot(ax,real(gamma_YL),imag(gamma_YL),'blueo','LineWidth',1.5);
plot(ax,real(radio),0,'blueo','LineWidth',1.5);

impedancia = ['ZL = ' num2str(real(ZL)) sign1 'j' num2str(abs(imag(ZL))) ' \rightarrow'];


admitancia = ['YL = ' num2str(real(Y1)) sign1 '(-j)' num2str(abs(imag(Y1))) ' \rightarrow'];
ondaEstacionaria = ['S = ' num2str(real(S)) ' \rightarrow'];

text(real(gamma_ZL),imag(gamma_ZL)
+.01,impedancia,'Color','blue','FontSize',14,'HorizontalAlignment','right','VerticalAlignment','middle');
hold all
text(real(gamma_YL),imag(gamma_YL)
+.01,admitancia,'Color','blue','FontSize',14,'HorizontalAlignment','right','VerticalAlignment','middle');
hold all
text(real(radio),0+.01,ondaEstacionaria,'Color','blue','FontSize',14,'HorizontalAlignment','right','VerticalAlignment','middle');
hold all

You might also like