📄 ucsb.m
字号:
% NF.m
% NF and other noise parameters including gate leakage, but not Cgd.
% Chris Sanabria, 12/03/04
clear all;
close all;
% Variables (change)
Igs = 6e-6; % Gate leakage
rge = 3.03; % Gate resistance
rs = 6;
gmi = 0.033;
ri = 8;
cgsi = 0.21e-12;
rds = 1000; % Drain-source resistance. Only used for a gain calculation
% and not for noise prediciton.
G = 2/3; % Gamma, use 2/3
f = [5e9 10e9]; % Operating frequency or frequencies
Zo = 50; % Reference impedance for calculating reflection coefficient
Ta = 290; % Kelvin. This is the input temp., NOT the channel temp.!
% Constants
q = 1.6022e-019;
k = 1.3807e-023;
w = 2*pi*f;
% Intermediates that may change
rin = rge + ri + rs;
gm = gmi./(1+gmi.*rs);
cgs = cgsi./(1+gmi.*rs);
% Intermediate variables (no changing)
wt = gm./cgs; % That’s right, no 2pi.
a = gm.*G.*(w./wt).^2;
b = q.*Igs./(2.*k.*Ta);
xgs = -1./(2.*pi.*f.*cgs);
% Optimum input impedance (reflection coefficient) for noise
Xopt = 1./(w.*cgs).*a./(a+b);
Ropt = sqrt(rin./(a+b) + a./(a+b).*rin.^2 + a.*b./((a+b).^2.*(w.^2.*cgs.^2)));
Zopt = Ropt + j.*Xopt;
Gamopt = (Zopt-Zo)./(Zopt+Zo);
% Minimum Noise Figure
rg = Ropt;
xg = Xopt;
Fmin = 1 + rin./rg + b./rg.*(rg.^2+xg.^2) + a./rg.*(abs(rin+rg+j.*(xg - 1./(w.*cgs)))).^2;
% Noise resistance
% First calculate NF at Zo, then use NFmin and NF @ Zo to get rn
rgzo = real(Zo);
xgzo = imag(Zo);
Fzo = 1 + rin./rgzo + b./rgzo.*(rgzo.^2 + xgzo.^2) + a./rgzo.*(abs(rin+rgzo+j.*(xgzo-1./(w.*cgs)))).^2;
Rn = Zo.*(Fzo - Fmin).*(abs(1 + Gamopt)).^2./(4.*abs(Gamopt));
% noise resistance (not normalized)
% Gain av @ NFmin. Will not be accurate because Cgd is not included
Gav = abs(-(rds./2).*(wt./w).*j./((rg+rin) + j.*(xgs + xg))).^2;
% Display outputs
disp(['Fmin = ' num2str(Fmin)])
disp('')
NFmin = 10*log10(Fmin);
disp(['NFmin (dB) = ' num2str(NFmin)])
% disp([’|Zopt| = ’ num2str(abs(Zopt))])
% disp([’|Zopt| = ’ num2str(abs(Zopt))])
% disp(’ ’)
% disp([’phase Zopt = ’ num2str(angle(Zopt)/pi*180)])
% disp(’ ’)
disp(['rn = ' num2str(Rn./Zo)])
disp(['|Gamma opt| = ' num2str(abs(Gamopt))])
disp(['phase Gamma opt = ' num2str(angle(Gamopt)/pi*180)])
disp(['Gain av [dB] = ' num2str(10.*log10(Gav))])
% Some plotting
figure;
plot(f./1e9,NFmin,'r')
xlabel('Frequency [GHz]')
ylabel('NF {min} [dB]')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -