📄 rf4.m
字号:
close all; % close all opened graphs
clear all; % clear all variables
smith_chart; % create a Smith Chart
s11=0.65*exp(j*(-25)/180*pi);
s12=0.11*exp(j*(+9)/180*pi);
s21=5.0*exp(j*(+110)/180*pi);
s22=0.65*exp(j*(-36)/180*pi);
s_param=[s11,s12;s21,s22];
[K,delta] = K_factor(s_param);
delta=det(s_param);
Gmax=abs(s21/s12)*(K-sqrt(K^2-1));
G1=0.9*Gmax;
G2=0.8*Gmax;
G3=0.5*Gmax;
go=G1/abs(s21)^2; % normalized the operating power gain
% find the center of the constant operating power gain circle
dgo=go*conj(s22-delta*conj(s11))/(1+go*(abs(s22)^2-abs(delta)^2));
rgo1=sqrt(1-2*K*go*abs(s12*s21)+go^2*abs(s12*s21)^2);
rgo=rgo1/abs(1+go*(abs(s22)^2-abs(delta)^2));
% plot a circle in the Smith Chart
a=(0:360)/180*pi;
hold on;
plot(real(dgo)+rgo*cos(a),imag(dgo)+rgo*sin(a),'r','linewidth',2)
text(real(dgo)-0.1,imag(dgo)+rgo+0.05,strcat('\bf',sprintf('G1=0.9Gmax',G1)))
go1=G2/abs(s21)^2; % normalized the operating power gain
% find the center of the constant operating power gain circle
dgo1=go1*conj(s22-delta*conj(s11))/(1+go1*(abs(s22)^2-abs(delta)^2));
rgo2=sqrt(1-2*K*go1*abs(s12*s21)+go1^2*abs(s12*s21)^2);
rgo1=rgo2/abs(1+go1*(abs(s22)^2-abs(delta)^2));
% plot a circle in the Smith Chart
a=(0:360)/180*pi;
hold on;
plot(real(dgo1)+rgo1*cos(a),imag(dgo1)+rgo1*sin(a),'r','linewidth',2)
text(real(dgo1)-0.1,imag(dgo1)+rgo1+0.05,strcat('\bf',sprintf('G2=0.8Gmax',G2)))
go2=G3/abs(s21)^2; % normalized the operating power gain
% find the center of the constant operating power gain circle
dgo2=go2*conj(s22-delta*conj(s11))/(1+go2*(abs(s22)^2-abs(delta)^2));
rgo3=sqrt(1-2*K*go2*abs(s12*s21)+go2^2*abs(s12*s21)^2);
rgo2=rgo3/abs(1+go2*(abs(s22)^2-abs(delta)^2));
% plot a circle in the Smith Chart
a=(0:360)/180*pi;
hold on;
plot(real(dgo2)+rgo2*cos(a),imag(dgo2)+rgo2*sin(a),'r','linewidth',2)
text(real(dgo2)-0.1,imag(dgo2)+rgo2+0.05,strcat('\bf',sprintf('G3=0.5Gmax',G3)))
Gamma_l=real(dgo)+rgo*cos(a(10))+j*(imag(dgo)+rgo*sin(a(10)))
Gamma_in=s11+(s12*s21*Gamma_l)/(1-s22*Gamma_l);
Gamma_s=conj(Gamma_in)
zs=(1+Gamma_s)/(1-Gamma_s);
zl=(1+Gamma_l)/(1-Gamma_l);
z1=1/(1/real(zs)-1);
z2=1/(1/real(zl)-1);
Z1=z1*50
Z2=z2*50
L=50*imag(zl)/(500*10^6*2*pi)*10^9
C=50/(imag(-zs)*(500*10^6*2*pi))*10^12
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -