📄 rf5.m
字号:
%
% In this example we plot the constant operating power gain
% circle and choose a load reflection coefficient G_L.
% Based on this G_L the input reflection coefficient is computed
%
% Copyright (c) 1999 by P.Bretchko and R.Ludwig
% "RF Circuit Design: Theory and Practice"
%
close all; % close all opened graphs
clear all; % clear all variables
smith_chart; % create a Smith Chart
% define the S-parameters of the transistor
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];
% check stability
[K,delta] = K_factor(s_param);
% find the maximum gain
Gmax=abs(s21/s12)*(K-sqrt(K^2-1));
% specify the target gain
G1=0.9*Gmax;
G2=0.8*Gmax;
G3=0.5*Gmax;
% find constant operating power gain circles
delta=det(s_param);
ga=G1/abs(s21)^2; % normalized the operating power gain
% find the center of the constant operating power gain circle
dga=ga*conj(s11-delta*conj(s22))/(1+ga*(abs(s11)^2-abs(delta)^2));
% find the radius of the circle
rga1=sqrt(1-2*K*ga*abs(s12*s21)+ga^2*abs(s12*s21)^2);
rga=rga1/abs(1+ga*(abs(s11)^2-abs(delta)^2));
% plot a circle in the Smith Chart
a=(0:360)/180*pi;
hold on;
plot(real(dga)+rga*cos(a),imag(dga)+rga*sin(a),'r','linewidth',2)
text(real(dga)-0.1,imag(dga)+rga+0.05,strcat('\bf',sprintf('G1=0.9Gmax',G1)))
ga1=G2/abs(s21)^2; % normalized the operating power gain
% find the center of the constant operating power gain circle
dga1=ga1*conj(s11-delta*conj(s22))/(1+ga1*(abs(s11)^2-abs(delta)^2));
% find the radius of the circle
rga2=sqrt(1-2*K*ga1*abs(s12*s21)+ga1^2*abs(s12*s21)^2);
rga1=rga2/abs(1+ga1*(abs(s11)^2-abs(delta)^2));
% plot a circle in the Smith Chart
a=(0:360)/180*pi;
hold on;
plot(real(dga1)+rga1*cos(a),imag(dga1)+rga1*sin(a),'r','linewidth',2)
text(real(dga1)-0.1,imag(dga1)+rga1+0.05,strcat('\bf',sprintf('G2=0.8Gmax',G2)))
ga2=G3/abs(s21)^2; % normalized the operating power gain
% find the center of the constant operating power gain circle
dga2=ga2*conj(s11-delta*conj(s22))/(1+ga2*(abs(s11)^2-abs(delta)^2));
% find the radius of the circle
rga3=sqrt(1-2*K*ga2*abs(s12*s21)+ga2^2*abs(s12*s21)^2);
rga2=rga3/abs(1+ga2*(abs(s11)^2-abs(delta)^2));
% plot a circle in the Smith Chart
a=(0:360)/180*pi;
hold on;
plot(real(dga2)+rga2*cos(a),imag(dga2)+rga2*sin(a),'r','linewidth',2)
text(real(dga2)-0.1,imag(dga2)+rga2+0.05,strcat('\bf',sprintf('G3=0.5Gmax',G3)))
Gamma_s=real(dga2)+rga2*cos(a(30))+j*(imag(dga2)+rga2*sin(a(30)))
Gamma_out=s22+(s12*s21*Gamma_s)/(1-s11*Gamma_s);
Gamma_l=conj(Gamma_out)
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(zs)/(500*10^6*2*pi)*10^9
C=50/(imag(-zl)*(500*10^6*2*pi))*10^12
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -