📄 noise_circles.m
字号:
function noise_circles(fmin, refo, rn, values)%NOISE_CIRCLES Draw constant noise figure circles on a Smith Chart.% NOISE_CIRCLES(FMIN, REFO, RN, VALUES) has the following parameters:% - FMIN: the minimum noise figure in decibels (dB),% - GAMMA_0: the optimum input reflection coefficient,% - RN: the normalised noise resistance, and % - VALUES: the noise figures for which circles are to be plotted in% decibels (dB).% If VALUES is not provided, four circles are drawn from FMIN in steps of% 0.5 dB.%% Example:% % The available power gain circles in Figure 4.3.4 in Gonzalez.% fmin = 2.5% gamma_opt = 0.475*exp(j*166/180*pi)% rn = 3.5/50% smith% noise_circles(fmin, gamma_opt, rn, (2.5:0.1:3) + 1e-5)% % The small value is added to make the smallest circle visible.%% See also: SMITH, SMITH_CIRLES %% Reference:% G. Gonzalez, "Microwave Transistor Amplifiers - Analysis and Design,"% 2nd ed., Prentice Hall, 1997.% Copyright 2008 Warren du Plessis%% This file is part of The Smith Chart Circles Toolbox.%% The Smith Chart Circles Toolbox is free software: you can redistribute it% and/or modify it under the terms of the GNU General Public License as% published by the Free Software Foundation, either version 3 of the% License, or (at your option) any later version.%% The Smith Chart Circles Toolbox is distributed in the hope that it will be% useful, but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General% Public License for more details.%% You should have received a copy of the GNU General Public License along% with The Smith Chart Circles Toolbox. If not, see% <http://www.gnu.org/licenses/>.% Check the number of inputs.error(nargchk(3, 4, nargin));% Check for the minimum number of inputs.if nargin < 3 error('There must be at least 3 inputs.');end% The values for the 4 default circles that will be plotted if no noise% figures are specified.if nargin < 4 values = fmin + [1e-4 0.5 1 1.5];end% Add these circles to the current plot.hold on% Determine the centres and radii of the circles.N = (10.^(values/10) - 10^(fmin/10))/(4*rn)*abs(1 + refo)^2;centre = refo./(1 + N);radius = abs(sqrt(N.^2 + N*(1 - abs(refo)^2))./(1 + N));% Plot the circles.smith_circles(centre, radius, 'b')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -