rf5.asv

来自「电子工业出版社出版的《射频电路设计》」· ASV 代码 · 共 86 行

ASV
86
字号
%
%   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(50))+j*(imag(dga2)+rga2*sin(a(50)))
Gamma_out=s22+(s12*s21*Gamma_s)/(1-s11*Gamma_s);
Gamma_l=conj(Gamma_out)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?