RF Too Box User Guide
RF Too Box User Guide
User’s Guide
How to Contact MathWorks
www.mathworks.com Web
comp.soft-sys.matlab Newsgroup
www.mathworks.com/contact_TS.html Technical Support
508-647-7000 (Phone)
508-647-7001 (Fax)
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand
names may be trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see
www.mathworks.com/patents for more information.
Revision History
June 2004 Online only New for Version 1.0 (Release 14)
August 2004 Online only Revised for Version 1.0.1 (Release 14+)
March 2005 Online only Revised for Version 1.1 (Release 14SP2)
September 2005 Online only Revised for Version 1.2 (Release 14SP3)
March 2006 Online only Revised for Version 1.3 (Release 2006a)
September 2006 Online only Revised for Version 2.0 (Release 2006b)
March 2007 Online only Revised for Version 2.1 (Release 2007a)
September 2007 Online only Revised for Version 2.2 (Release 2007b)
March 2008 Online only Revised for Version 2.3 (Release 2008a)
October 2008 Online only Revised for Version 2.4 (Release 2008b)
March 2009 Online only Revised for Version 2.5 (Release 2009a)
September 2009 Online only Revised for Version 2.6 (Release 2009b)
March 2010 Online only Revised for Version 2.7 (Release 2010a)
September 2010 Online only Revised for Version 2.8 (Release 2010b)
Contents
Getting Started
1
Product Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
RF Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
v
Selecting an RF Object
2
RF Data Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Overview of RF Data Objects . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Types of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Available Data Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Data Object Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Modeling an RF Component
3
Creating RF Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Constructing a New Object . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Copying an Existing Object . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
vi Contents
Displaying Available Operating Condition Values . . . . . . . 3-18
vii
RF Tool: An RF Analysis GUI
5
Introduction to RF Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
What Is RF Tool? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Opening RF Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
RF Tool Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
RF Tool Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
viii Contents
Object Reference
6
Circuit Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Method Reference
8
Analysis .......................................... 8-2
ix
Methods — Alphabetical List
9
Function Reference
10
Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
x Contents
Power Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-9
IP3 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-12
Inconsistent Data Sections . . . . . . . . . . . . . . . . . . . . . . . . . . A-14
Examples
B
Modeling a Cascaded RF Network . . . . . . . . . . . . . . . . . . . B-2
Index
xi
xii Contents
1
Getting Started
Product Overview
RF Toolbox™ software extends the MATLAB® technical computing
environment with objects and functions for modeling RF circuits consisting of:
You use objects from the toolbox to represent the components of your RF
network. The toolbox provides several types of component representations
using network parameters (S, Y, Z, ABCD, H, and T format) and physical
properties.
All toolbox features are accessible and executable interactively from the
MATLAB prompt or programmatically using M-code scripts.
1-2
Product Overview
1-3
1 Getting Started
Related Products
Several MathWorks® products are especially relevant to the kinds of tasks
you can perform with RF Toolbox software. The following table summarizes
the related products and describes how they complement the features of the
toolbox.
Product Description
Communications Blockset™ Simulink® blocks for time-domain
simulation of modulation and
demodulation of a wireless
communications signal.
Communications Toolbox™ MATLAB functions for signal
modulation and demodulation.
Filter Design Toolbox™ MATLAB functions for filtering the
modulated communication signal.
SimRF™ Circuit-envelope simulation of RF
components in Simulink.
Signal Processing Toolbox™ MATLAB functions for filtering the
modulated communication signal.
Signal Processing Blockset™ Simulink blocks for time-domain
simulation of for filtering the
modulated communication signal.
1-4
Product Demos
Product Demos
You can find interactive RF Toolbox demos in the MATLAB Help browser.
1-5
1 Getting Started
To run an demo:
2 On the demo page, click Open this model in the upper-right corner of the
demo window to display the Simulink model for this demo.
3 In the model window, select Simulation > Start to run the demo
simulation.
1-6
RF Objects
RF Objects
RF Toolbox software uses objects to represent RF components and networks.
You create an object using the object’s constructor. Every object has
predefined fields called properties. The properties define the characteristics of
the object. Each property associated with an object is assigned a value. Every
object has a set of methods, which are operations that you can perform on the
object. Methods are similar to functions except that they only act on an object.
The following table summarizes the types of objects that are available in
the toolbox and describes the uses of each one. For more information on a
particular type of object, including a list of the available objects and methods,
follow the link in the table to the documentation for that object type.
Each name in the preceding table is the prefix to the names of all object
constructors of that type. The constructors use dot notation that consists
of the object type, followed by a dot and then the component name. The
component name is also called the class. For information on how to construct
an RF object from the command line using dot notation, see “Creating RF
Objects” on page 3-2.
1-7
1 Getting Started
Note The toolbox also provides a graphical interface for creating and
analyzing circuit objects. For more information, see Chapter 5, “RF Tool:
An RF Analysis GUI”.
1-8
S-Parameter Notation
S-Parameter Notation
In this section...
“Defining S-Parameters” on page 1-9
“Referring to S-Parameters Using Strings” on page 1-10
Defining S-Parameters
RF Toolbox software uses matrix notation to specify S-parameters. The
indices of an S-parameter matrix correspond to the port numbers of the
network that the data represent. For example, to define a matrix of 50-ohm,
2-port S-parameters, type:
s11 = 0.61*exp(j*165/180*pi);
s21 = 3.72*exp(j*59/180*pi);
s12 = 0.05*exp(j*42/180*pi);
s22 = 0.45*exp(j*(-48/180)*pi);
s_params = [s11 s12; s21 s22];
1-9
1 Getting Started
• 'Snm' — Use this syntax if n and m are both less than 10.
• 'Sn,m' — Use this syntax if one or both are greater than 10. 'Sn,m' is not
a valid syntax when both n and m are less than 10.
The indices n and m are the port numbers for the S-parameters.
Most toolbox objects only analyze 2-port S-parameters. The following objects
analyze S-parameters with more than two ports:
• rfckt.passive
• rfckt.datafile
• rfdata.data
You can get 2-port parameters from S-parameters with an arbitrary number
of ports using one or more of the following steps:
1-10
S-Parameter Notation
1-11
1 Getting Started
Product Workflow
When you analyze an RF circuit using RF Toolbox software, your workflow
might include the following tasks:
1-12
Product Workflow
• Polar plots
• Smith Charts
• Budget plots (for cascaded S-parameters)
1-13
1 Getting Started
Note To learn how to use RF Tool to perform these tasks, see “Example —
Modeling an RF Network Using RF Tool” on page 5-31.
The network that you use in this example consists of an amplifier and two
transmission lines. The toolbox represents RF components and RF networks
using RF circuit objects. You learn how to create and manipulate these
objects to analyze the cascaded amplifier network.
Creating RF Components
Type the following set of commands at the MATLAB prompt to create three
circuit (rfckt) objects with the default property values. These circuit objects
represent the two transmission lines and the amplifier:
FirstCkt = rfckt.txline;
SecondCkt = rfckt.amplifier;
ThirdCkt = rfckt.txline;
1-14
Example — Modeling a Cascaded RF Network
1 Type the following command at the MATLAB prompt to change the line
length of the first transmission line, FirstCkt, to 0.001:
set(FirstCkt,'LineLength',0.001)
2 Type the following command at the MATLAB prompt to change the line
length of the second transmission line, ThirdCkt, to 0.025 and to change
the phase velocity to 2.0e8:
set(ThirdCkt,'LineLength',0.025,'PV',2.0e8)
Amplifier Properties
read(SecondCkt, 'default.amp');
set(SecondCkt,'IntpType','cubic')
The IntpType property tells the toolbox how to interpolate the network
parameters, noise data, and power data when you analyze the amplifier at
frequencies other than those specified in the file.
Validating RF Components
In this part of the example, you plot the network parameters and power data
(output power versus input power) to validate the behavior of the amplifier.
1-15
1 Getting Started
1 Type the following set of commands at the MATLAB prompt to use the
smith command to plot the original S11 and S22 parameters of the amplifier
(SecondCkt) on a Z Smith Chart:
figure
lineseries1 = smith(SecondCkt,'S11','S22');
set(lineseries1(1), 'LineStyle','-', 'LineWidth', 1);
set(lineseries1(2), 'LineStyle',':', 'LineWidth', 1);
legend show
Note The plot shows the S-parameters over the frequency range for which
network data is specified in the default.amp file — from 1 GHz to 2.9 GHz.
1-16
Example — Modeling a Cascaded RF Network
2 Type the following set of commands at the MATLAB prompt to use the RF
Toolbox plot command to plot the amplifier (SecondCkt) output power
(Pout) as a function of input power (Pin), both in decibels referenced to one
milliwatt (dBm), on an X-Y plane plot:
figure
plot(SecondCkt,'Pout','dBm');
legend show
Note The plot shows the power data at 2.1 GHz because this frequency is
the one for which power data is specified in the default.amp file.
1-17
1 Getting Started
1 Type the following command at the MATLAB prompt to cascade the three
circuit objects to form a new cascaded circuit object, CascadedCkt:
CascadedCkt = rfckt.cascade('Ckts',{FirstCkt,SecondCkt,...
ThirdCkt});
2 Type the following set of commands at the MATLAB prompt to define the
range of frequencies over which to analyze the cascaded circuit, and then
run the analysis:
f = 1.0e9:1e7:2.9e9;
analyze(CascadedCkt,f);
1-18
Example — Modeling a Cascaded RF Network
1 Type the following set of commands at the MATLAB prompt to use the
smith command to plot the S11 and S22 parameters of the cascaded amplifier
network on a Z Smith Chart:
figure
lineseries2 = smith(CascadedCkt,'S11','S22','z');
set(lineseries2(1),'LineStyle','-','LineWidth',1);
set(lineseries2(2),'LineStyle',':','LineWidth',1);
legend show
1-19
1 Getting Started
2 Type the following set of commands at the MATLAB prompt to use the
plot command to plot the S21 parameter of the cascaded network, which
represents the network gain, on an X-Y plane:
figure
plot(CascadedCkt,'S21','dB');
legend show
1-20
Example — Modeling a Cascaded RF Network
3 Type the following set of commands at the MATLAB prompt to use the
plot command to create a budget plot of the S21 parameter and the noise
figure of the amplifier network:
figure
plot(CascadedCkt,'budget', 'S21','NF');
legend show
The curve for each index represents the contributions of the RF components
up to and including the component at that index.
1-21
1 Getting Started
tline = rfckt.parallelplate('LineLength',0.1,'Width',0.05);
2 Type the following set of commands at the MATLAB prompt to define the
range of frequencies over which to analyze the transmission line and then
run the analysis:
f = [1.0e9:1e7:2.9e9];
analyze(tline,f);
1-22
Example — Using a Rational Function Model to Analyze a Transmission Line
TrFunc = s2tf(S_Params);
RationalFunc = rationalfit(Freq,TrFunc)
[fresp,freq]=freqresp(RationalFunc,Freq);
3 Type the following set of commands at the MATLAB prompt to plot the
amplitude of the frequency response of the fitted model data and that of
the computed data:
figure
plot(freq/1e9,db(fresp),freq/1e9,db(TrFunc));
1-23
1 Getting Started
xlabel('Frequency, GHz')
ylabel('Amplitude, dB')
legend('Fitted Model Data','Computed Data')
Note The amplitude of the model data is very close to the amplitude of the
computed data. You can control the tradeoff between model accuracy and
model complexity by specifying the optional tolerance argument, tol, to
the rationalfit function, as described in “Representing a Circuit Object
with a Model Object” on page 4-5.
1-24
Example — Using a Rational Function Model to Analyze a Transmission Line
4 Type the following set of commands at the MATLAB prompt to plot the
phase angle of the frequency response of the fitted model data and that of
the computed data:
figure
plot(freq/1e9,unwrap(angle(fresp)),...
freq/1e9,unwrap(angle(TrFunc)));
xlabel('Frequency, GHz')
ylabel('Phase Angle, radians')
legend('Fitted Data','Computed Data')
Note The phase angle of the model data is very close to the phase angle of
the computed data.
1-25
1 Getting Started
SampleTime=1e-12;
NumberOfSamples=1e4;
OverSamplingFactor = 25;
InputTime = double((1:NumberOfSamples)')*SampleTime;
InputSignal = ...
sign(randn(1, ceil(NumberOfSamples/OverSamplingFactor)));
InputSignal = repmat(InputSignal, [OverSamplingFactor, 1]);
InputSignal = InputSignal(:);
[tresp,t]=timeresp(RationalFunc,InputSignal,SampleTime);
2 Type the following set of commands at the MATLAB prompt to plot the
time response of the fitted model data:
figure
plot(t,tresp);
xlabel('Time (seconds)')
ylabel('Response to Random Input Signal')
1-26
Example — Using a Rational Function Model to Analyze a Transmission Line
The following code illustrates how to use the writeva method to write a
Verilog-A module for RationalFunc to the file tline.va. The module has one
input, tline_in, and one output, tline_out. The method returns a status of
True, if the operation is successful, and False if it is unsuccessful.
status = writeva(RationalFunc,'tline','tline_in','tline_out')
For more information on the writeva method and its arguments, see the
writeva reference page. For more information on Verilog-A models, see
Chapter 4, “Exporting Verilog-A Models”.
1-27
1 Getting Started
1-28
2
Selecting an RF Object
RF Data Objects
In this section...
“Overview of RF Data Objects” on page 2-2
“Types of Data” on page 2-2
“Available Data Objects” on page 2-2
“Data Object Methods” on page 2-3
• Component data created from files or from information that you specify
in the MATLAB workspace.
• Analyzed data from a frequency-domain simulation of a circuit object.
You can perform basic tasks, such as plotting and network parameter
conversion, on the data stored in these objects. However, data objects are
primarily used to store data for use by other RF objects.
Types of Data
The toolbox uses RF data objects to store one or more of the following types
of data:
• Network parameters
• Spot noise
• Noise figure
• Third-order intercept point (IP3)
• Power out versus power in
2-2
RF Data Objects
on a particular object, follow the link in the table to the reference page for
that object.
Constructor Description
rfdata.data Data object containing network parameter data
rfdata.ip3 Data object containing IP3 information
rfdata.mixerspur Data object containing mixer spur information
from an intermodulation table
rfdata.network Data object containing network parameter
information
rfdata.nf Data object containing noise figure information
rfdata.noise Data object containing noise information
rfdata.power Data object containing power and phase
information
2-3
2 Selecting an RF Object
RF Circuit Objects
In this section...
“Overview of RF Circuit Objects” on page 2-4
“Components Versus Networks” on page 2-4
“Available Components and Networks” on page 2-5
“Circuit Object Methods” on page 2-7
The toolbox represents each type of component and network with a different
object. You use these objects to analyze components and networks in the
frequency domain.
You define network behavior by specifying the components that make up the
network. These components can be either individual components (such as
amplifiers and transmission lines) or other networks.
2-4
RF Circuit Objects
To specify an RF network:
3 Specify, as the Ckts property of the object that represents the network, a
list of components that make up the network.
The following table lists the available rfckt object constructors and describes
the components or networks the corresponding objects represent. For more
information on a particular object, follow the link in the table to the reference
page for that object.
Constructor Description
rfckt.amplifier Amplifier, described by an rfdata object
rfckt.cascade Cascaded network, described by the list of
components and networks that comprise it
rfckt.coaxial Coaxial transmission line, described by
dimensions and electrical characteristics
2-5
2 Selecting an RF Object
Constructor Description
rfckt.cpw Coplanar waveguide transmission line,
described by dimensions and electrical
characteristics
rfckt.datafile General circuit, described by a data file
rfckt.delay Delay line, described by loss and delay
rfckt.hybrid Hybrid connected network, described by the list
of components and networks that comprise it
rfckt.hybridg Inverse hybrid connected network, described
by the list of components and networks that
comprise it
rfckt.lcbandpasspi LC bandpass pi network, described by LC
values
rfckt.lcbandpasstee LC bandpass tee network, described by LC
values
rfckt.lcbandstoppi LC bandstop pi network, described by LC values
rfckt.lcbandstoptee LC bandstop tee network, described by LC
values
rfckt.lchighpasspi LC highpass pi network, described by LC values
rfckt.lchighpasstee LC highpass tee network, described by LC
values
rfckt.lclowpasspi LC lowpass pi network, described by LC values
rfckt.lclowpasstee LC lowpass tee network, described by LC values
rfckt.microstrip Microstrip transmission line, described by
dimensions and electrical characteristics
rfckt.mixer Mixer, described by an rfdata object
rfckt.parallel Parallel connected network, described by the
list of components and networks that comprise
it
rfckt.parallelplate Parallel-plate transmission line, described by
dimensions and electrical characteristics
2-6
RF Circuit Objects
Constructor Description
rfckt.passive Passive component, described by network
parameters
rfckt.rlcgline RLCG transmission line, described by RLCG
values
rfckt.series Series connected network, described by the list
of components and networks that comprise it
rfckt.seriesrlc Series RLC network, described by RLC values
rfckt.shuntrlc Shunt RLC network, described by RLC values
rfckt.twowire Two-wire transmission line, described by
dimensions and electrical characteristics
rfckt.txline General transmission line, described by
dimensions and electrical characteristics
2-7
2 Selecting an RF Object
2-8
RF Circuit Objects
2-9
2 Selecting an RF Object
RF Model Objects
In this section...
“Overview of RF Model Objects” on page 2-10
“Available Model Objects” on page 2-10
“Model Object Methods” on page 2-10
Constructor Description
rfmodel.rational Rational function model
2-10
RF Model Objects
2-11
2 Selecting an RF Object
2-12
3
Modeling an RF Component
Creating RF Objects
In this section...
“Constructing a New Object” on page 3-2
“Copying an Existing Object” on page 3-4
h = objecttype.objectname
where:
h = rfckt.rlcgline
because the RLCG transmission line object is a circuit (rfckt) object named
rlcgline.
3-2
Creating RF Objects
For a list of the available object constructors for each type of object, see
Chapter 2, “Selecting an RF Object”.
The following code illustrates how to call the object constructor to create a
microstrip transmission line object with default property values. The output
t1 is the handle of the newly created transmission line object.
t1 = rfckt.microstrip
RF Toolbox software lists the properties of the transmission line you created
along with the associated default property values.
t1 =
Name: 'Microstrip Transmission Line'
nPort: 2
AnalyzedResult: []
LineLength: 0.0100
StubMode: 'NotAStub'
Termination: 'NotApplicable'
Width: 6.0000e-004
Height: 6.3500e-004
Thickness: 5.0000e-006
EpsilonR: 9.8000
SigmaCond: Inf
LossTangent: 0
For more information, see “Fitting a Model Object to Circuit Object Data”
on page 3-37.
3-3
3 Modeling an RF Component
For example,
t2 = copy(t1);
creates a new object, t2, which has the same property values as the microstrip
transmission line object, t1.
You can later change specific property values for this copy. For information
on modifying object properties, see “Specifying or Importing Component Data”
on page 3-5.
Note The syntax t2 = t1 copies only the object handle and does not create a
new object.
3-4
Specifying or Importing Component Data
RF Object Properties
Object properties specify the behavior of an object. You can specify object
properties, or you can import them from a data file. To learn about properties
that are specific to a particular type of circuit, data, or model object, see the
reference page for that type of object.
Note The “RF Circuit Objects” on page 2-4, “RF Data Objects” on page
2-2,“RF Model Objects” on page 2-10 sections list the available types of objects
and provide links to their reference pages.
3-5
3 Modeling an RF Component
Note You must use single quotation marks around the property name.
Include as many property names in the argument list as there are properties
you want to set. Any property values that you do not set retain their default
values. The circuit and data object reference pages list the valid values as
well as the default value for each property.
t1 = rfckt.coaxial('LineLength',0.05)
t1 =
3-6
Specifying or Importing Component Data
InnerRadius: 7.2500e-004
MuR: 1
EpsilonR: 2.3000
LossTangent: 0
SigmaCond: Inf
t1 = rfckt.coaxial('LineLength',0.05);
a1 = rfckt.amplifier;
t2 = rfckt.coaxial('LineLength',0.1);
casc_network = rfckt.cascade('Ckts',{t1,a1,t2});
This section discusses the first option. For details on the second option, see
“Direct Property Referencing Using Dot Notation” on page 3-16.
To modify the properties of an existing object, use the set command with one
or more property/value pairs in the argument list. The general syntax of
the command is
set(h,Property1',value1,'Property2',value2,...)
where
3-7
3 Modeling an RF Component
For example, the following code creates a default coaxial transmission line
object and changes it to a series stub with open termination.
t1 = rfckt.coaxial;
set(t1,'StubMode','series','Termination','open')
Note You can use the set command without specifying any property/value
pairs to display a list of all properties you can set for a specific object. This
example lists the properties you can set for the coaxial transmission line t1:
set(t1)
ans =
LineLength: {}
StubMode: {}
Termination: {}
OuterRadius: {}
InnerRadius: {}
MuR: {}
EpsilonR: {}
LossTangent: {}
SigmaCond: {}
3-8
Specifying or Importing Component Data
3-9
3 Modeling an RF Component
obj = read(obj_type,'filename');
where
For example,
ckt_obj=read(rfckt.amplifier, 'default.amp');
You can also import file data into an existing circuit object. The following
commands are equivalent to the previous command:
ckt_obj=rfckt.amplifier;
read(ckt_obj, 'default.amp');
Note When you import component data from a .p2d or .s2d file, properties
are defined for several operating conditions. You must select an operating
condition to specify the object behavior, as described in “Specifying Operating
Conditions” on page 3-17.
3-10
Specifying or Importing Component Data
amp = rfckt.amplifier
f = 2.0e9;
nf = 13.3244;
nfdata = rfdata.nf('Freq',f,'Data',nf)
The following command uses the rfdata.nf data object to specify the
rfckt.amplifier NoiseData property:
set(amp,'NoiseData',nfdata)
amp = rfckt.amplifier
3-11
3 Modeling an RF Component
amp =
Name: 'Amplifier'
nPort: 2
AnalyzedResult: [1x1 rfdata.data]
IntpType: 'Linear'
NetworkData: [1x1 rfdata.network]
NoiseData: [1x1 rfdata.noise]
NonlinearData: [1x1 rfdata.power]
2 Create a data object that stores network data. Type the following set
of commands at the MATLAB prompt to create an rfdata.network object
that stores the 2-port Y-parameters at 2.08 GHz, 2.10 GHz, and 2.15 GHz.
Later in this example, you use this data object to update the NetworkData
property of the rfckt.amplifier object.
netdata = rfdata.network('Type','Y_PARAMETERS',...
'Freq',f,'Data',y)
netdata =
3-12
Specifying or Importing Component Data
3 Create a data object that stores noise figure values. Type the
following set of commands at the MATLAB prompt to create a rfdata.nf
object that contains noise figure values, in dB, at seven different
frequencies. Later in this example, you use this data object to update the
NoiseData property of the rfckt.amplifier object.
nfdata = rfdata.nf('Freq',f,'Data',nf)
nfdata =
ip3data = rfdata.ip3('Type','OIP3','Freq',2.1e9,'Data',8.45)
ip3data =
3-13
3 Modeling an RF Component
amp.NetworkData = netdata;
amp.NoiseData = nfdata;
amp.NonlinearData = ip3data;
PropertyValue = get(h,PropertyName)
where
For example, suppose you have the following coaxial transmission line:
h2 = rfckt.coaxial;
3-14
Specifying or Importing Component Data
The following code retrieves the value of the inner radius and outer radius for
the coaxial transmission line:
ir = get(h2,'InnerRadius')
or = get(h2,'OuterRadius')
ir =
7.2500e-004
or =
0.0026
For example:
get(h2)
Name: 'Coaxial Transmission Line'
nPort: 2
AnalyzedResult: []
LineLength: 0.0100
StubMode: 'NotAStub'
Termination: 'NotApplicable'
OuterRadius: 0.0026
InnerRadius: 7.2500e-004
MuR: 1
EpsilonR: 2.3000
LossTangent: 0
SigmaCond: Inf
Note This list includes read-only properties that do not appear when you
type set(h2). For a coaxial transmission line object, the read-only properties
are Name, nPort, and AnalyzedResult. The Name and nPort properties are
fixed by the toolbox. The AnalyzedResult property value is calculated and
set by the toolbox when you analyze the component at specified frequencies.
3-15
3 Modeling an RF Component
ckt = rfckt.amplifier('IntpType','cubic');
ckt.IntpType
gives the value of the property IntpType for the circuit object ckt.
ans =
Cubic
Similarly,
ckt.IntpType = 'linear';
You do not need to type the entire field name or use uppercase characters.
You only need to type the minimum number of characters sufficient to identify
the property name uniquely. Thus entering the commands
ckt = rfckt.amplifier('IntpType','cubic');
ckt.in
also produces
ans =
Cubic
3-16
Specifying Operating Conditions
When you import component data from a .p2d or .s2d file, the object contains
property values for several operating conditions. The available conditions
depend on the data in the file. By default, RF Toolbox software defines the
object behavior using the property values that correspond to the operating
conditions that appear first in the file. To use other property values, you must
select a different operating condition.
setop(,’Condition1’,value1,...,’ConditionN’,valueN,...)
where
For example,
3-17
3 Modeling an RF Component
setop(obj)
displays the available values for all operating conditions of the object obj.
setop(obj,'Condition1')
3-18
Processing File Data for Analysis
3-19
3 Modeling an RF Component
To perform the above conversions all at once, or to convert larger data sets,
use one of these functions:
SingleEnded4Port = read(rfdata.data,'default.s4p');
DifferentialSParams = s2sdd(SingleEnded4Port.S_Parameters);
Note The S-parameters that you specify as input to the s2sdd function
are the ones the toolbox stores in the S_Parameters property of the
rfdata.data object.
3-20
Processing File Data for Analysis
where
The following figure illustrates how to specify the ports for the output data
and the termination of the remaining ports.
3-21
3 Modeling an RF Component
M-Port
ZT{1} 1 N ZT{N}
N-Port M
ZT{2} 2 N-1 n2m_index(M)=N-1
. .
. .
. .
k ZT{k}
1 2
n2m_index(1)=i i j n2m_index(2)=j
For more details about the arguments to this function, see the snp2smp
reference page.
1 Type this command to import data from the file default.s16p into an
rfdata.data object, SingleEnded16PortData:
SingleEnded16PortData = read(rfdata.data,'default.s16p');
N2M_index = [1 16 2 15];
FourPortSParams = snp2smp(SingleEnded16PortData.S_Parameters, ...
3-22
Processing File Data for Analysis
Note The S-parameters that you specify as input to the snp2smp function
are the ones the toolbox stores in the S_Parameters property of the
rfdata.data object.
s_params = cascadesparams(s1_params,s2_params,...,sn_params,nconn)
where
3-23
3 Modeling an RF Component
cascadesparams connects the last port(s) of one network to the first port(s)
of the next network.
For more details about the arguments to this function, see the
cascadesparams reference page.
1 Type these commands to import data from the files default.s16p and
default.s4p, and create the 16- and 4-port networks of S-parameters:
S_16Port = read(rfdata.data,'default.s16p');
S_4Port = read(rfdata.data,'default.s4p');freq = [2e9 2.1e9];
freq = [2e9 2.1e9];
analyze(S_16Port, freq);
analyze(S_4Port, freq);
sparams_16p = S_16Port.AnalyzedResult.S_Parameters;
sparams_4p = S_4Port.AnalyzedResult.S_Parameters;
cascadesparams creates a 14-port network. Ports 1–13 are the first 13 ports
of the 16-port network. Port 14 is the fourth port of the 4-port network.
3-24
Processing File Data for Analysis
For more examples of how to use this function, see the cascadesparams
reference page.
3-25
3 Modeling an RF Component
For example, to analyze a coaxial transmission line from 1 GHz to 2.9 GHz in
increments of 10 MHz:
ckt = rfckt.coaxial;
f = [1.0e9:1e7:2.9e9];
analyze(ckt,f);
Note For all circuits objects except those that contain data from a file, you
must perform a frequency-domain analysis with the analyze method before
visualizing component and network data. For circuits that contain data from
a file, the toolbox performs a frequency-domain analysis when you use the
read method to import the data.
When you analyze a circuit object, the toolbox computes the circuit network
parameters, noise figure values, and output third-order intercept point (OIP3)
values at the specified frequencies and stores the result of the analysis in the
object’s AnalyzedResult property.
For more information, see the analyze reference page or the circuit object
reference page.
3-26
Analyzing and Plotting RF Components
The following table summarizes the available plots and charts, along with the
methods you can use to create each one and a description of its contents.
3-27
3 Modeling an RF Component
For each plot you create, you choose a parameter to plot and, optionally, a
format in which to plot that parameter. The plot format defines how the
toolbox displays the data on the plot. The available formats vary with the data
you select to plot. The data you can plot depends on the type of plot you create.
Note You can use the listparam method to list the parameters of a specified
circuit object that are available for plotting. You can use the listformat
method to list the available formats for a specified circuit object parameter.
3-28
Analyzing and Plotting RF Components
Rectangular
You can plot any parameters that are relevant to your object on a rectangular
plot. You can plot parameters as a function of frequency for any object. When
you import object data from a .p2d or .s2d file, you can also plot parameters
as a function of any operating condition from the file that has numeric values,
such as bias. In addition, when you import object data from a .p2d file, you can
plot large-signal S-parameters as a function of input power or as a function of
frequency. These parameters are denoted LS11, LS12, LS21, and LS22.
The following table summarizes the methods that are available in the toolbox
for creating rectangular plots and describes the uses of each one. For more
information on a particular type of plot, follow the link in the table to the
documentation for that method.
Method Description
plot Plot of one or more object parameters
plotyy Plot of one or more object parameters with
y-axes on both the left and right sides
semilogx Plot of one or more object parameters using a
log scale for the X-axis
semilogy Plot of one or more object parameters using a
log scale for the Y-axis
loglog Plot of one or more object parameters using a
log-log scale
Budget
You use the link budget plot to understand the individual contribution of
each component to a plotted parameter value in a cascaded network with
multiple components.
3-29
3 Modeling an RF Component
The budget plot is a three-dimensional plot that shows one or more curves of
parameter values as a function of frequency, ordered by the circuit index of
the cascaded network.
casc = rfckt.cascade('Ckts',...
{rfckt.amplifier,rfckt.lcbandpasspi,rfckt.txline})
The following figure shows how the circuit index is assigned to each
component in the cascade, based on its sequential position in the network.
You create a budget plot for this cascade using the plot method with the
second argument set to 'budget', as shown in the following command:
plot(casc,'budget','s21')
A curve on the link budget plot for each circuit index represents the
contributions to the parameter value of the RF components up to that index.
The following figure shows the budget plot.
3-30
Analyzing and Plotting RF Components
If you specify two or more parameters, the toolbox puts the parameters in a
single plot. You can only specify a single format for all the parameters.
3-31
3 Modeling an RF Component
Mixer Spur
You use the mixer spur plot to understand how mixer nonlinearities
affect output power at the desired mixer output frequency and at the
intermodulation products that occur at the following frequencies:
fout = N ∗ fin + M ∗ f LO
where
The toolbox calculates the output power from the mixer intermodulation
table (IMT). These tables are described in detail in the Visualizing Mixer
Spurs demo.
The following figure shows how the circuit index is assigned to the components
in the cascade, based on its sequential position in the network.
3-32
Analyzing and Plotting RF Components
You create a spur plot for this cascade using the plot method with the second
argument set to 'mixerspur', as shown in the following command:
plot(CascadedCkt,'mixerspur')
Within the three dimensional plot, the stem plot for each circuit index
represents the power at that circuit index. The following figure shows the
mixer spur plot.
3-33
3 Modeling an RF Component
For more information on mixer spur plots, see the plot reference page.
3-34
Analyzing and Plotting RF Components
The following table describes the Polar plot and Smith Chartt options, as well
as the available parameters.
Note LS11, LS12, LS21, and LS22 are large-signal S-parameters. You can plot
these parameters as a function of input power or as a function of frequency.
3-35
3 Modeling an RF Component
Note The circle method lets you place circles on a Smith Chart to depict
stability regions and display constant gain, noise figure, reflection and
immittance circles. For more information about this method, see the circle
reference page or the two-part RF Toolbox demo about designing matching
networks.
For more information on a particular type of plot, follow the link in the table
to the documentation for that method.
The following code illustrates how to read file data into a passive circuit object,
extract the 2-port S-parameters from the object and compute the transfer
function of the data at the frequencies for which the data is specified. z0 is
the reference impedance of the S-parameters, zs is the source impedance, and
zl is the load impedance. See the s2tf reference page for more information
on how these impedances are used to define the gain.
PassiveCkt = rfckt.passive('File','passive.s2p')
z0=50; zs=50; zl=50;
[SParams, Freq] = extract(PassiveCkt, 'S Parameters', z0);
TransFunc = s2tf(SParams, z0, zs, zl);
3-36
Analyzing and Plotting RF Components
The following code illustrates how to use the rationalfit function to create
an rfmodel.rational object that contains a rational function model of the
transfer function that you created in the previous example.
To find out how many poles the toolbox used to represent the data, look at the
length of the A vector of the RationalFunc model object.
nPoles = length(RationalFunc.A)
Note The number of poles is important if you plan to use the RF model object
to create a model for use in another simulator, because a large number of
poles can increase simulation time. For information on how to represent a
component accurately using a minimum number of poles, see “Representing a
Circuit Object with a Model Object” on page 4-5.
Use the freqresp method to compute the frequency response of the fitted
data. To validate the model fit, plot the transfer function of the original data
and the frequency response of the fitted data.
3-37
3 Modeling an RF Component
The following code illustrates how to create a random input signal, compute
the time-domain response of RationalFunc to the input signal, and plot the
results.
SampleTime=1e-11;
NumberOfSamples=4750;
OverSamplingFactor = 25;
InputTime = double((1:NumberOfSamples)')*SampleTime;
InputSignal = ...
sign(randn(1, ceil(NumberOfSamples/OverSamplingFactor)));
InputSignal = repmat(InputSignal, [OverSamplingFactor, 1]);
InputSignal = InputSignal(:);
[tresp,t]=timeresp(RationalFunc,InputSignal,SampleTime);
plot(t*1e9,tresp);
title('Fitting Time-Domain Response', 'fonts', 12);
ylabel('Response to Random Input Signal');
xlabel('Time (ns)');
For more information about computing the time response of a model object,
see the timeresp reference page.
3-38
Exporting Component Data to a File
Note The toolbox also lets you export data from an rfmodel object to a
Verilog-A file. For information on how to do this, see Chapter 4, “Exporting
Verilog-A Models”.
status = write(obj,'filename');
3-39
3 Modeling an RF Component
where
• status is a return value that indicates whether the write operation was
successful.
• obj is the handle of the circuit or rfdata.data object.
• filename is the name of the file that contains the data.
For example,
s_vec(:,:,1) = ...
[-0.724725-0.481324i, -0.685727+1.782660i; ...
0.000000+0.000000i, -0.074122-0.321568i];
s_vec(:,:,2) = ...
[-0.731774-0.471453i, -0.655990+1.798041i; ...
0.001399+0.000463i, -0.076091-0.319025i];
s_vec(:,:,3) = ...
[-0.738760-0.461585i, -0.626185+1.813092i; ...
0.002733+0.000887i, -0.077999-0.316488i];
txdata = rfdata.data;
3 Type the following to set the S-parameter values of txdata to the values
you specified in s_vec:
3-40
Exporting Component Data to a File
txdata.S_Parameters = s_vec;
4 Type the following to set the frequency values of txdata to [1e9 2e9 3e9]:
txdata.Freq=1e9*[1 2 3];
5 Type the following to export the data in txdata to a Touchstone file called
test.s2p:
write(txdata,'test')
3-41
3 Modeling an RF Component
1 Read S-parameter data from a data file. Use the RF Toolbox read
command to read the Touchstone data file, passive.s2p. This file contains
50-ohm S-parameters at frequencies ranging from 315 kHz to 6 GHz. The
read command creates an rfdata.data object, data, and stores data from
the file in the object’s properties.
data = read(rfdata.data,'passive.s2p');
2 Extract the network parameters from the data object. Use the
extract command to convert the 50-ohm S-parameters in the rfdata.data
object, data, to 75-ohm S-parameters and save them in the variable
s_params. You also use the command to extract the Y-parameters from the
rfdata.data object and save them in the variable y_params.
freq = data.Freq;
s_params = extract(data,'S_PARAMETERS',75);
y_params = extract(data,'Y_PARAMETERS');
3-42
Examples of Basic Operations with RF Objects
3 Plot the S11 parameters. Use the smithchart command to plot the
75-ohm S11 parameters on a Smith Chart:
s11 = s_params(1,1,:);
smithchart(s11(:));
f = freq(end)
s = s_params(:,:,end)
y = y_params(:,:,end)
3-43
3 Modeling an RF Component
f =
6.0000e+009
s =
-0.0764 - 0.5401i 0.6087 - 0.3018i
0.6094 - 0.3020i -0.1211 - 0.5223i
y =
0.0210 + 0.0252i -0.0215 - 0.0184i
-0.0215 - 0.0185i 0.0224 + 0.0266i
For more information, see the rfdata.data, read, and extract reference
pages.
De-Embedding S-Parameters
The Touchstone data file samplebjt2.s2p contains S-parameter data
collected from a bipolar transistor in a test fixture. The input of the fixture
has a bond wire connected to a bond pad. The output of the fixture has a
bond pad connected to a bond wire.
The configuration of the bipolar transistor, which is the device under test
(DUT), and the fixture is shown in the following figure.
1nH 1 nH
In this example, you remove the effects of the fixture and extract the
S-parameters of the DUT.
3-44
Examples of Basic Operations with RF Objects
measured_data = read(rfdata.data,'samplebjt2.s2p');
input_pad = rfckt.cascade('Ckts',...
{rfckt.seriesrlc('L',1e-9), ...
rfckt.shuntrlc('C',100e-15)}); % L=1 nH, C=100 fF
output_pad = rfckt.cascade('Ckts',...
{rfckt.shuntrlc('C',100e-15),...
rfckt.seriesrlc('L',1e-9)}); % L=1 nH, C=100 fF
2 Analyze the input pad and output pad circuit objects. Analyze the
circuit objects at the frequencies at which the S-parameters are measured.
freq = measured_data.Freq;
analyze(input_pad,freq);
analyze(output_pad,freq);
z0 = measured_data.Z0;
input_pad_sparams = extract(input_pad.AnalyzedResult,...
'S_Parameters',z0);
output_pad_sparams = extract(output_pad.AnalyzedResult,...
'S_Parameters',z0);
de_embedded_sparams = ...
deembedsparams(measured_data.S_Parameters,...
input_pad_sparams, output_pad_sparams);
de_embedded_data = rfdata.data('Z0',z0,...
'S_Parameters',de_embedded_sparams,...
'Freq',freq);
3-45
3 Modeling an RF Component
hold off;
h = smith(measured_data,'S11');
set(h, 'Color', [1 0 0]);
hold on
i = smith(de_embedded_data,'S11');
set(i,'Color', [0 0 1],'LineStyle',':');
l = legend;
legend(l, {'Measured S_{11}', 'De-embedded S_{11}'});
legend show;
3-46
Examples of Basic Operations with RF Objects
figure;
hold off;
h = smith(measured_data,'S22');
set(h, 'Color', [1 0 0]);
hold on
i = smith(de_embedded_data,'S22');
set(i,'Color', [0 0 1],'LineStyle',':');
l = legend;
legend(l, {'Measured S_{22}', 'De-embedded S_{22}'});
legend show;
3-47
3 Modeling an RF Component
figure
hold off;
h = plot(measured_data,'S21', 'db');
set(h, 'Color', [1 0 0]);
hold on
i = plot(de_embedded_data,'S21','db');
set(i,'Color', [0 0 1],'LineStyle',':');
l = legend;
legend(l, {'Measured S_{21}', 'De-embedded S_{21}'});
legend show;
hold off;
3-48
4
4-2
Modeling RF Objects Using Verilog-A
When you create a Verilog-A model of your circuit, the toolbox writes a
Verilog-A module that specifies circuit’s input and output nets and the
mathematical equations that describe how the circuit operates on the input
to produce the output.
For more information on the Verilog-A language, see the Verilog-A Reference
Manual.
M
∑ nk sk
k =0
H (s) = N
∑ dk sk
k =0
where
4-3
4 Exporting Verilog-A Models
4-4
How to Export a Verilog-A Model
• You can fit a rational function model to the component data using the
rationalfit function.
• You can use the rfmodel.rational constructor to specify the pole-residue
representation of the component directly.
This section discusses using a rational function model. For more information
on using the constructor, see the rfmodel.rational reference page.
You can use the rationalfit function with only the two required arguments.
The syntax is:
model_obj = rationalfit(freq,data)
where
4-5
4 Exporting Verilog-A Models
For faster simulation, create a model object with the smallest number of poles
required to accurately represent the component. To control the number of
poles, use the syntax:
model_obj = rationalfit(freq,data,tol,weight,delayfactor)
where
Note You can also specify the number of poles directly using the npoles
argument. The model accuracy is not guaranteed with approach, so you
should not specify npoles when accuracy is critical. For more information on
the npoles argument, see the rationalfit reference page.
If you plan to integrate the Verilog-A module into a large design for simulation
using detailed models, such as transistor-level circuit models, the simulation
time consumed by a Verilog-A module may have a trivial impact on the overall
simulation time. In this case, there is no reason to take the time to optimize
the rational function model of the component.
4-6
How to Export a Verilog-A Model
status = writeva(model_obj,'obj1',{'inp','inn'},{'outp','outn'})
to write a Verilog-A module for the model object model_obj to the file obj1.va.
The module has differential input nets, inp and inn, and differential output
nets, outp and outn. The method returns status, a logical value of true if
the operation is successful and false otherwise.
4-7
4 Exporting Verilog-A Models
4-8
5
RF Tool: An RF Analysis
GUI
Introduction to RF Tool
In this section...
“What Is RF Tool?” on page 5-2
“Opening RF Tool” on page 5-2
“RF Tool Window” on page 5-3
“RF Tool Workflow” on page 5-5
What Is RF Tool?
RF Tool is a GUI that provides a visual interface for creating and analyzing
RF components and networks. You can use RF Tool as a convenient
alternative to the command-line RF circuit design and analysis objects and
methods that come with RF Toolbox software.
Opening RF Tool
To open RF Tool, type the following at the MATLAB prompt:
rftool
For a description of the RF Tool GUI, see “RF Tool Window” on page 5-3. To
learn how to create and import circuits, see “Creating and Importing Circuits”
on page 5-6.
5-2
Introduction to RF Tool
Note The work you do with this tool is organized into sessions. Each session
is a collection of independent RF circuits, which can be RF components or RF
networks. You can save sessions and then load them for later use. For more
information, see “Working with Sessions” on page 5-28.
RF Tool Window
The RF Tool window consists of the following three panes:
• RF Component List
Shows the components and networks in the session. The top-level node is
the session.
• Component Parameters
Displays options and settings pertaining to the node you selected in the
RF Component List pane.
• Analysis
Displays options and settings pertaining to the circuit analysis and results
display. After you analyze the circuit, this pane displays the analysis
results and provides an interface for you to view the S-parameter data and
modify the displayed plots.
5-3
5 RF Tool: An RF Analysis GUI
5-4
Introduction to RF Tool
RF Tool Workflow
When you analyze a circuit using the RF Tool GUI, your workflow might
include the following tasks:
5-5
5 RF Tool: An RF Analysis GUI
Circuits in RF Tool
In RF Tool, you can create circuits that include RF components and RF
networks. Networks can contain both components and other networks.
Note In the circuit object command line interface, you create networks by
building components and then connecting them together to form a network.
In contrast, you build networks in RF Tool by creating a network and then
populating it with components.
Creating RF Components
This section contains the following topics:
5-6
Creating and Importing Circuits
Available RF Components
The following table lists the RF components you can create using RF Tool and
the corresponding RF Toolbox object.
5-7
5 RF Tool: An RF Analysis GUI
1 In the RF Component List pane, click Add to open the Create Network
or Component dialog box.
3 In the Component Name field, enter a name for the component. This
name is used to identify the component in the RF Component List pane.
For example, Microstrip Component.
5-8
Creating and Importing Circuits
4 From the Component Type menu, select the type of RF component you
want to create. For example, Microstrip Transmission Line.
Note You can accept the default values for some or all of the parameters
and then change them later. For information on modifying the parameter
values of an existing component, see “Modifying Component Data” on page
5-19.
5-9
5 RF Tool: An RF Analysis GUI
6 Click OK.
Creating RF Networks
You create an RF network in RF Tool by adding a network to the session and
then adding components to the network.
5-10
Creating and Importing Circuits
Available RF Networks
The following table lists the RF networks you can create using RF Tool.
Corresponding RF Toolbox
RF Network Object
Cascaded Network rfckt.cascade
Series Connected Network rfckt.series
Parallel Connected Network rfckt.parallel
Hybrid Connected Network rfckt.hybrid
Inverse Hybrid Connected Network rfckt.hybridg
1 In the RF Component List pane, click Add to open the Create Network
or Component dialog box.
5-11
5 RF Tool: An RF Analysis GUI
3 In the Network Name field, enter a name for the component. This name
is used to identify the network in the RF Component List pane. For
example, Series1.
4 From the Network Type menu, select the type of RF network you want to
create. For example, Series Connected Network.
5 Click OK.
5-12
Creating and Importing Circuits
Populating an RF Network
After you create a network using RF Tool, you must populate it with RF
components and networks. You insert a component or network into a network
in much the same way you add one to a session.
To populate an RF network:
1 In the RF Component List pane, select the network component you want
to modify. Then, in the Component Parameters pane, click Insert.
5-13
5 RF Tool: An RF Analysis GUI
Enter the component or network name, and select the appropriate type. If
you are inserting a component, modify the parameter values as necessary.
See “How to Add an RF Component to a Session” on page 5-8 or “Adding an
RF Network to a Session” on page 5-11 for details.
As you insert components and networks into a network, they are reflected in
the RF Component List and Component Parameters panes. The figure
below shows an example of a cascaded network that contains two components
and a network. The subnetwork, in turn, contains two components.
1 In the RF Component List pane, select the network whose circuits you
want to reorder.
5-14
Creating and Importing Circuits
Importing RF Objects
RF Tool lets you import RF objects from your workspace and from files to the
top level of your session. You can import the following types of objects:
After you have imported an object, you can change its name and work with
it as you would any other component or network.
5-15
5 RF Tool: An RF Analysis GUI
1 Select Import From Workspace from the File menu. The Import from
Workspace dialog box appears. This dialog box lists the handles of all RF
circuit (rfckt) objects in the workspace.
2 From the list of RF circuit objects, select the object you want to import,
and click OK.
The object is added to your session with the same name as the object
handle. If there is already a circuit by that name, RF Tool appends a
numeral, starting with 1, to the new circuit name.
• S2P
• Y2P
• Z2P
• H2P
5-16
Creating and Importing Circuits
1 Select Import From File from the File menu. A file browser appears.
3 Select the name of the file to import from the list of files in the browser.
The name of the component is the file name without the extension. If there
is already a component by that name, RF Tool appends a numeral, starting
with 1, to the new component name. The file name, including the extension,
appears as the value of the component’s File Name parameter. If the file
is not on the MATLAB path, the value of the File Name parameter also
contains the file path.
5-17
5 RF Tool: An RF Analysis GUI
• S2P
• Y2P
• Z2P
• H2P
2 Specify the name of the file from which to import the component in one
of two ways:
• Select the file name in the file name and type in the Import from File
dialog box, and click Open.
• Click Cancel to get out of the Import from File dialog box, and enter the
file name in the Value field across from the File Name parameter in
the Insert Component or Network dialog box.
5-18
Modifying Component Data
3 Click Apply.
5-19
5 RF Tool: An RF Analysis GUI
Analyzing Circuits
After you add your circuits, you can analyze them with RF Tool:
5-20
Analyzing Circuits
3 Click Analyze.
The Analysis pane displays a Smith Chart, an XY plot, and a polar plot of
the analyzed circuit.
4 Select or deselect the S-parameter check boxes at the bottom of each plot
to customize the parameters that the plot displays. Use the pull-downs at
the top of each plot to customize the plot options.
The plots automatically update as you change the check box and pull-down
options on the GUI.
5-21
5 RF Tool: An RF Analysis GUI
5 Click Data in the upper-right corner of the Analysis pane to view the
data in tabular form. The following figure shows the analysis data for the
LC Bandpass Pi component at the frequencies and reference impedance
shown in step 2.
5-22
Exporting RF Objects
Exporting RF Objects
In this section...
“Exporting Components and Networks” on page 5-23
“Exporting to the Workspace” on page 5-23
“Exporting to a File” on page 5-25
5-23
5 RF Tool: An RF Analysis GUI
3 Enter a name for the exported object’s handle in the Variable name field
and click OK. The default name is the name of the component or network
prefaced with the string 'rft_'.
5-24
Exporting RF Objects
Exporting to a File
RF Tool lets you export components and networks to files in S2P format.
Note You must analyze a component or network in RF Tool before you can
export it to a file. See “Analyzing Circuits” on page 5-20 for more information.
5-25
5 RF Tool: An RF Analysis GUI
2 Select Export To File from the File menu to open the file browser.
3 Browse to the appropriate directory. Enter the name you want to give the
file and click Save.
The default file name is the current name of the component or network
prefaced with the string 'rft_'. RF Tool also converts any characters that
are not alphanumeric to underscores (_).
5-26
Managing Circuits and Sessions
Deleting Circuits
To delete a circuit from your session:
2 Click Delete.
Note If the circuit you delete is a network, RF Tool deletes the network
everything in the network.
5-27
5 RF Tool: An RF Analysis GUI
Renaming Circuits
To rename a component or a network:
2 Type the new name in the Name field of the Component Parameters
pane.
3 Click Apply.
5-28
Managing Circuits and Sessions
2 Type the desired name in the Name field of the Component Parameters
pane.
3 Click Apply.
Saving a Session
To save your session, select Save Session or Save Session As from the File
menu. The first time you save a session a browser opens, prompting you
for a file name.
Note The default file name is the session name with any characters that
are not alphanumeric converted to underscores (_). The name of the session
itself is unchanged.
If the name of your session is gk's session, the default file name is
gk_s_session.rf.
5-29
5 RF Tool: An RF Analysis GUI
Before opening the requested session, RF Tool prompts you to save your
current session.
Before starting a new session, RF Tool prompts you to save your current
session.
5-30
Example — Modeling an RF Network Using RF Tool
Starting RF Tool
Type the following command at the MATLAB prompt to open the RF Tool
window:
rftool
For more information about this GUI, see “RF Tool Window” on page 5-3.
5-31
5 RF Tool: An RF Analysis GUI
5-32
Example — Modeling an RF Network Using RF Tool
5-33
5 RF Tool: An RF Analysis GUI
Transmission Line 1
5-34
Example — Modeling an RF Network Using RF Tool
Amplifier
5-35
5 RF Tool: An RF Analysis GUI
5-36
Example — Modeling an RF Network Using RF Tool
Transmission Line 2
5-37
5 RF Tool: An RF Analysis GUI
In the Analysis pane, click Analyze to simulate the network at the specified
frequencies.
RF Tool displays a Smith Chart, an XY plot, and a polar plot of the analyzed
circuit.
5-38
Example — Modeling an RF Network Using RF Tool
3 Click OK.
5-39
5 RF Tool: An RF Analysis GUI
5-40
6
Object Reference
Circuit Objects
Components (p. 6-2) Represent individual RF components
Networks (p. 6-3) Represent networks of RF
components
Components
Active Components
Ladder Filters
RLC Components
6-2
Circuit Objects
Transmission Lines
Networks
rfckt.cascade Model cascaded network
rfckt.hybrid Model hybrid connected network
rfckt.hybridg Model inverse hybrid connected
network
rfckt.parallel Model parallel connected network
rfckt.series Model series connected network
6-3
6 Object Reference
Data Objects
rfdata.data Store result of circuit object analysis
rfdata.ip3 Store frequency-dependent,
third-order intercept points
rfdata.mixerspur Store data from intermodulation
table
rfdata.network Store frequency-dependent network
parameters
rfdata.nf Store frequency-dependent noise
figure data for amplifiers or mixers
rfdata.noise Store frequency-dependent spot
noise data for amplifiers or mixers
rfdata.power Store output power and phase
information for amplifiers or mixers
6-4
Model Objects
Model Objects
rfmodel.rational Rational function model
6-5
6 Object Reference
6-6
7
Syntax h = rfckt.amplifier
h = rfckt.amplifier('Property1',value1,'Property2',value2,
...)
• Touchstone
• Agilent P2D
• Agilent S2D
• AMP
See Appendix A, “AMP File Format” for information about the .amp
format.
7-2
rfckt.amplifier class
7-3
rfckt.amplifier class
amp =
Name: 'Amplifier'
nPort: 2
7-4
rfckt.amplifier class
7-5
rfckt.cascade
Syntax h = rfckt.cascade
h = rfckt.cascade('Property1',value1,'Property2',value2,...)
7-6
rfckt.cascade class
7-7
rfckt.cascade class
casc =
7-8
rfckt.coaxial
Syntax h = rfckt.coaxial
h = rfckt.coaxial('Property1',value1,'Property2',value2,...)
7-9
rfckt.coaxial class
Description Use the coaxial class to represent coaxial transmission lines that are
characterized by line dimensions, stub type, and termination.
A coaxial transmission line is shown in cross-section in the following
figure. Its physical characteristics include the radius of the inner
conductor of the coaxial transmission line a, and the radius of the outer
conductor b.
7-10
rfckt.coaxial class
7-11
rfckt.coaxial class
Examples tx1=rfckt.coaxial('OuterRadius',0.0045)
tx1 =
7-12
rfckt.coaxial class
rfckt.twowire
rfckt.txline
Pozar, David M. Microwave Engineering, John Wiley & Sons, Inc.,
2005.
7-13
rfckt.cpw
Syntax h = rfckt.cpw
h = rfckt.cpw('Property1',value1,'Property2',value2,...)
7-14
rfckt.cpw class
Description Use the cpw class to represent coplanar waveguide transmission lines
that are characterized by line dimensions, stub type, and termination.
A coplanar waveguide transmission line is shown in cross-section in
the following figure. Its physical characteristics include the conductor
width (w), the conductor thickness (t), the slot width (s), the substrate
height (d), and the permittivity constant (ε).
7-15
rfckt.cpw class
7-16
rfckt.cpw class
Examples tx1=rfckt.cpw('Thickness',0.0075e-6)
tx1 =
7-17
rfckt.datafile
Syntax h = rfckt.datafile
h = rfckt.datafile('Property1',value1,'Property2',value2,...)
• Touchstone
• Agilent P2D
• Agilent S2D
• AMP
See Appendix A, “AMP File Format” for information about the .amp
format.
7-18
rfckt.datafile class
Description Use the datafile class to represent RF components and networks that
are characterized by measured or simulated data in a file.
7-19
rfckt.datafile class
Examples data=rfckt.datafile('File','default.s2p')
data =
7-20
rfckt.datafile class
File: 'default.s2p'
7-21
rfckt.delay
Syntax h = rfckt.delay
h = rfckt.delay('Property1',value1,'Property2',value2,...)
Description h = rfckt.delay returns a delay line object whose properties are set to
their default values.
h = rfckt.delay('Property1',value1,'Property2',value2,...)
returns a delay line object, h, with the specified properties. Properties
that you do not specify retain their default values.
7-22
rfckt.delay class
Description Use the delay class to represent delay lines that are characterized by
line loss and time delay.
7-23
rfckt.delay class
Examples del=rfckt.delay('TimeDelay',1e-11)
del =
7-24
rfckt.delay class
7-25
rfckt.hybrid
Syntax h = rfckt.hybrid
h = rfckt.hybrid('Property1',value1,'Property2',value2,...)
7-26
rfckt.hybrid class
Description Use the hybrid class to represent hybrid connected networks of linear
RF objects that are characterized by the components that make up the
network.
7-27
rfckt.hybrid class
hyb =
7-28
rfckt.hybrid class
7-29
rfckt.hybridg
Syntax h = rfckt.hybridg
h = rfckt.hybridg('Property1',value1,'Property2',value2,...)
7-30
rfckt.hybridg class
Description Use the hybridg class to represent inverse hybrid connected networks
of linear RF objects that are characterized by the components that
make up the network.
7-31
rfckt.hybridg class
invhyb =
7-32
rfckt.hybridg class
7-33
rfckt.lcbandpasspi
Syntax h = rfckt.lcbandpasspi
h = rfckt.lcbandpasspi('Property1',value1,'Property2',value2,
...)
7-34
rfckt.lcbandpasspi class
L2 C2 L4 C4
L1 C1 L3 C3
In the diagram, [L1, L2, L3, L4, ...] is the value of the 'L' object property,
and [C1, C2, C3, C4, ...] is the value of the 'C' object property.
7-35
rfckt.lcbandpasspi class
7-36
rfckt.lcbandpasspi class
filter =
7-37
rfckt.lcbandpasstee
Syntax h = rfckt.lcbandpasstee
h = rfckt.lcbandpasstee('Property1',value1,'Property2',value2,
...)
7-38
rfckt.lcbandpasstee class
L1 C1 L3 C3
L2 C2 L4 C4
In the diagram, [L1, L2, L3, L4, ...] is the value of the 'L' object property,
and [C1, C2, C3, C4, ...] is the value of the 'C' object property.
7-39
rfckt.lcbandpasstee class
7-40
rfckt.lcbandpasstee class
filter =
7-41
rfckt.lcbandstoppi
Syntax h = rfckt.lcbandstoppi
h = rfckt.lcbandstoppi('Property1',value1,'Property2',value2,
...)
7-42
rfckt.lcbandstoppi class
L2 L4
C2 C4
L1 L3
C1 C3
In the diagram, [L1, L2, L3, L4, ...] is the value of the 'L' object property,
and [C1, C2, C3, C4, ...] is the value of the 'C' object property.
7-43
rfckt.lcbandstoppi class
7-44
rfckt.lcbandstoppi class
filter =
7-45
rfckt.lcbandstoptee
Syntax h = rfckt.lcbandstoptee
h = rfckt.lcbandstoptee('Property1',value1,'Property2',value2,
...)
7-46
rfckt.lcbandstoptee class
L1 L3
C1 C3
L2 L4
C2 C4
In the diagram, [L1, L2, L3, L4, ...] is the value of the 'L' object property,
and [C1, C2, C3, C4, ...] is the value of the 'C' object property.
7-47
rfckt.lcbandstoptee class
7-48
rfckt.lcbandstoptee class
filter =
7-49
rfckt.lchighpasspi
Syntax h = rfckt.lchighpasspi
h = rfckt.lchighpasspi('Property1',value1,'Property2',value2,
...)
7-50
rfckt.lchighpasspi class
C1 C2
L1 L2 L3
In the diagram, [L1, L2, L3, ...] is the value of the 'L' object property,
and [C1, C2, C3, ...] is the value of the 'C' object property.
7-51
rfckt.lchighpasspi class
7-52
rfckt.lchighpasspi class
filter =
7-53
rfckt.lchighpasstee
Syntax h = rfckt.lchighpasstee
h = rfckt.lchighpasstee('Property1',value1,'Property2',value2,
...)
7-54
rfckt.lchighpasstee class
C1 C2 C3
L1 L2 L3
In the diagram, [L1, L2, L3, ...] is the value of the 'L' object property,
and [C1, C2, C3, ...] is the value of the 'C' object property.
7-55
rfckt.lchighpasstee class
7-56
rfckt.lchighpasstee class
filter =
7-57
rfckt.lclowpasspi
Syntax h = rfckt.lclowpasspi
h = rfckt.lclowpasspi('Property1',value1,'Property2',value2,
...)
7-58
rfckt.lclowpasspi class
L1 L2
C1 C2 C3
In the diagram, [L1, L2, L3, ...] is the value of the 'L' object property,
and [C1, C2, C3, ...] is the value of the 'C' object property.
7-59
rfckt.lclowpasspi class
7-60
rfckt.lclowpasspi class
filter =
7-61
rfckt.lclowpasstee
Syntax h = rfckt.lclowpasstee
h = rfckt.lclowpasstee('Property1',value1,'Property2',value2,
...)
7-62
rfckt.lclowpasstee class
L1 L2 L3
C1 C2 C3
In the diagram, [L1, L2, L3, ...] is the value of the 'L' object property,
and [C1, C2, C3, ...] is the value of the 'C' object property.
7-63
rfckt.lclowpasstee class
7-64
rfckt.lclowpasstee class
filter =
7-65
rfckt.microstrip
Syntax h = rfckt.microstrip
h = rfckt.microstrip('Property1',value1,'Property2',value2,
...)
7-66
rfckt.microstrip class
7-67
rfckt.microstrip class
7-68
rfckt.microstrip class
Examples tx1=rfckt.microstrip('Thickness',0.0075e-6)
tx1 =
7-69
rfckt.mixer
Purpose Construct 2-port object representing RF mixer and its local oscillator
Syntax h = rfckt.mixer
h = rfckt.mixer('Property1',value1,'Property2',value2,...)
• Touchstone
• Agilent P2D
• Agilent S2D
• AMP
See Appendix A, “AMP File Format” for information about the .amp
format.
7-70
rfckt.mixer class
Purpose Model 2-port object representing RF mixer and its local oscillator
Description Use the mixer class to represent RF mixers and their local oscillators
that are characterized by network parameters, noise data, nonlinearity
data, and local oscillator frequency.
7-71
rfckt.mixer class
7-72
rfckt.mixer class
mix1 =
Name: 'Mixer'
nPort: 2
AnalyzedResult: [1x1 rfdata.data]
IntpType: 'Cubic'
NetworkData: [1x1 rfdata.network]
NoiseData: [1x1 rfdata.noise]
NonlinearData: Inf
MixerSpurData: []
MixerType: 'Downconverter'
FLO: 1.0000e+009
FreqOffset: []
PhaseNoiseLevel: []
7-73
rfckt.mixer class
rfdata.power
EIA/IBIS Open Forum, Touchstone File
Format Specification, Rev. 1.1, 2002
(http://www.vhdl.org/pub/ibis/connector/touchstone_spec11.pdf).
7-74
rfckt.parallel
Syntax h = rfckt.parallel
h = rfckt.parallel('Property1',value1,'Property2',value2,...)
7-75
rfckt.parallel class
7-76
rfckt.parallel class
plel =
7-77
rfckt.parallel class
7-78
rfckt.parallelplate
Syntax h = rfckt.parallelplate
h = rfckt.parallelplate('Property1',value1,'Property2',value2,
...)
7-79
rfckt.parallelplate class
7-80
rfckt.parallelplate class
7-81
rfckt.parallelplate class
Examples tx1=rfckt.parallelplate('LineLength',0.045)
tx1 =
7-82
rfckt.passive
Syntax h = rfckt.passive
h = rfckt.passive('Property1',value1,'Property2',value2,...)
7-83
rfckt.passive class
7-84
rfckt.passive class
pas =
Name: 'Passive'
nPort: 2
AnalyzedResult: [1x1 rfdata.data]
IntpType: 'Cubic'
7-85
rfckt.passive class
7-86
rfckt.rlcgline
Syntax h = rfckt.rlcgline
h = rfckt.rlcgline('Property1',value1,'Property2',value2,...)
7-87
rfckt.rlcgline class
Description Use the rlcgline class to represent RLCG transmission lines that are
characterized by line loss, line length, stub type, and termination.
7-88
rfckt.rlcgline class
7-89
rfckt.rlcgline class
Examples tx1=rfckt.rlcgline('R',0.002,'C',8.8542e-12,...
'L',1.2566e-6,'G',0.002')
tx1 =
7-90
rfckt.series
Syntax h = rfckt.series
h = rfckt.series('Property1',value1,'Property2',value2,...)
7-91
rfckt.series class
7-92
rfckt.series class
ser =
7-93
rfckt.series class
7-94
rfckt.seriesrlc
Syntax h = rfckt.seriesrlc
h = rfckt.seriesrlc('R',Rvalue,'L',Lvalue,'C',Cvalue)
7-95
rfckt.seriesrlc class
R L C
7-96
rfckt.seriesrlc class
Examples This example creates a series LC resonator and examines its frequency
response. It first creates the circuit object and then uses the analyze
method to calculate its frequency response. Finally, it plots the results
— first, the magnitude in decibels (dB):
h = rfckt.seriesrlc('L',4.7e-5,'C',2.2e-10);
7-97
rfckt.seriesrlc class
analyze(h,logspace(4,8,1000));
plot(h,'s21','dB')
set(gca,'Xscale','log')
figure
plot(h,'s21','angle')
set(gca,'Xscale','log')
7-98
rfckt.seriesrlc class
7-99
rfckt.shuntrlc
Syntax h = rfckt.shuntrlc
h = rfckt.shuntrlc('R',Rvalue,'L',Lvalue,'C',Cvalue)
7-100
rfckt.shuntrlc class
R L C
7-101
rfckt.shuntrlc class
Examples This example creates a shunt LC resonator and examines its frequency
response. It first creates the circuit object and then uses the analyze
method to calculate its frequency response. Finally, it plots the results
— first, the magnitude in decibels (dB):
7-102
rfckt.shuntrlc class
h = rfckt.shuntrlc('L',4.7e-5,'C',2.2e-10);
analyze(h,logspace(4,8,1000));
plot(h,'s21','dB')
set(gca,'Xscale','log')
figure
plot(h,'s21','angle')
set(gca,'Xscale','log')
7-103
rfckt.shuntrlc class
7-104
rfckt.twowire
Syntax h = rfckt.twowire
h = rfckt.twowire('Property1',value1,'Property2',value2,...)
7-105
rfckt.twowire class
Description Use the twowire class to represent two-wire transmission lines that are
characterized by line dimensions, stub type, and termination.
A two-wire transmission line is shown in cross-section in the following
figure. Its physical characteristics include the radius of the wires a, the
separation or physical distance between the wire centers S, and the
relative permittivity and permeability of the wires. RF Toolbox software
assumes the relative permittivity and permeability are uniform.
Wires
a
Dielectric
7-106
rfckt.twowire class
7-107
rfckt.twowire class
Examples tx1=rfckt.twowire('Radius',7.5e-4)
tx1 =
7-108
rfckt.twowire class
7-109
rfckt.txline
Syntax h = rfckt.txline
h = rfckt.txline('Property1',value1,'Property2',value2,...)
7-110
rfckt.txline class
Description Use the txline class to represent transmission lines that are
characterized by line loss, line length, stub type, and termination.
7-111
rfckt.txline class
7-112
rfckt.txline class
trl = rfckt.txline('Z0',75)
trl =
7-113
rfckt.txline class
7-114
rfdata.data
Syntax h = rfdata.data
h = rfdata.data('Property1',value1,'Property2',value2,...)
Description h = rfdata.data returns a data object whose properties all have their
default values.
h = rfdata.data('Property1',value1,'Property2',value2,...)
returns a data object, h, based on the specified properties. Properties
that you do not specify retain their default values.
Use the read method to read data from a file.
7-115
rfdata.data class
Description Use the data class to store S-parameters, noise figure in decibels, and
frequency-dependent, third-order output (OIP3) intercept points.
There are three ways to create an rfdata.data object:
7-116
rfdata.data class
7-117
rfdata.data class
file = 'default.s2p';
h = read(rfdata.data,file); % Read file into data object.
figure
plot(h,'s21','db'); % Plot dB(S21) in XY plane.
7-118
rfdata.data class
7-119
rfdata.ip3
Syntax h = rfdata.ip3
h = rfdata.ip3('Type',value1,'Freq',value2,'Data',value3)
7-120
rfdata.ip3 class
Description Use the ip3 class to store third-order intercept point specifications for
a circuit object.
ip3data =
7-121
rfdata.mixerspur
Syntax h = rfdata.mixerspur
h = rfdata.mixerspur('Data',value1,'PLORef',value2,'PinRef',
'value3)
Description Use the mixerspur class to store mixer spur power specifications for
a circuit object.
h = rfdata.mixerspur returns a data object that defines an
intermodulation table, h, whose properties all have their default values.
h =
rfdata.mixerspur('Data',value1,'PLORef',value2,'PinRef','value3)
returns a data object that defines an intermodulation table,
h, based on the specified properties.
7-122
rfdata.mixerspur class
Description Use the mixerspur class to store mixer spur power specifications for
a circuit object.
spurs =
7-123
rfdata.network
Syntax h = rfdata.network
h = rfdata.network('Type',value1,'Freq',value2, Data',value3,
'Z0',value4)
7-124
rfdata.network class
Description Use the network class to store frequency-dependent S-, Y-, Z-, ABCD-,
H-, G-, or T-parameters for a circuit object.
net = rfdata.network...
('Type','Y_PARAMETERS','Freq',f,'Data',y)
7-125
rfdata.network class
rfdata.power
7-126
rfdata.nf
Syntax h = rfdata.nf
h = rfdata.nf('Freq',value1,'Data',value2)
7-127
rfdata.nf class
Description Use the nf class to store noise figure specifications for a circuit object.
Examples f = 2.0e9;
nf = 13.3244;
nfdata = rfdata.nf('Freq',f,'Data',nf);
7-128
rfdata.noise
Syntax h = rfdata.noise
h = rfdata.noise('Freq',value1,'FMIN',value2,'GAMMAOPT',
value3,'RN',value4)
7-129
rfdata.noise class
Description Use the noise class to store spot noise specifications for a circuit object.
noisedata = rfdata.noise('Freq',f,'FMIN',fmin,...
'GAMMAOPT',gopt,'RN',rn);
7-130
rfdata.power
Purpose Construct container for amplifier or mixer output power and phase
information
Syntax h = rfdata.power
h = rfdata.power(`property1',value1,'property2',value2,...)
Description h = rfdata.power returns a data object for the Pin/Pout power data, h,
whose properties all have their default values.
h = rfdata.power(`property1',value1,'property2',value2,...)
returns a data object for the Pin/Pout power data, h, based on the
specified properties.
7-131
rfdata.power class
Purpose Store output power and phase information for amplifiers or mixers
Description Use the power class to store output power and phase specifications
for a circuit object.
7-132
rfmodel.rational
Syntax h = rfmodel.rational
h = rfmodel.rational('Property1',value1,'Property2',value2,
...)
rat=rfmodel.rational...
('A',[-5e9,-3e9,-4e6],...
'C',[6e8,2e9,4e9]); % Create model
f = [1e6:1.0e7:3e9]; % Simulation frequencies
[resp,freq]=freqresp(rat,f); % Compute frequency response
figure
plot(freq/1e9,db(resp)); % Plot frequency response
xlabel('Frequency (GHz)')
ylabel('Magnitude (dB)')
7-133
rfmodel.rational
7-134
rfmodel.rational class
⎛ n Ck ⎞
F (s) = ⎜ ∑ + D ⎟ e− sτ , s = j 2πf
⎜ ⎟
⎝ k=1 s − Ak ⎠ (7-1)
• You can fit a rational function model to the component data using
the rationalfit function.
• You can use the rfmodel.rational constructor to specify the
pole-residue representation of the component directly.
7-135
rfmodel.rational class
Examples orig_data=read(rfdata.data,'default.s2p');
freq=orig_data.Freq;
data=orig_data.S_Parameters(2,1,:);
fit_data=rationalfit(freq,data)
fit_data =
7-136
rfckt.amplifier.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
u3
FAM / AM (u) = u −
3
7-137
rfckt.amplifier.AnalyzedResult property
u3
FAM / AM (u) = u −
3
where u is the magnitude of the scaled input signal, which is a
unitless normalized input voltage.
• The analyze method uses the data stored in the 'NetworkData'
property of the rfckt.amplifier object to calculate the group delay
values of the amplifier at the frequencies specified in freq, as
described in the analyze reference page.
• The analyze method uses the data stored in the 'NetworkData'
property of the rfckt.amplifier object to calculate the S-parameter
values of the amplifier at the frequencies specified in freq. If the
'NetworkData' property contains network Y- or Z-parameters, the
analyze method first converts the parameters to S-parameters.
Using the interpolation method you specify with the 'IntpType'
property, the analyze method interpolates the S-parameter values to
determine their values at the specified frequencies.
Specifically, the analyze method orders the S-parameters according
to the ascending order of their frequencies, fn. It then interpolates
the S-parameters, using the MATLAB interp1 function. For
example, the curve in the following diagram illustrates the result of
interpolating the S11 parameters at five different frequencies.
f1 f2 f4 f5 f3 Frequencies in ascending
order of magnitude
(fmin) (fmax)
7-138
rfckt.amplifier.AnalyzedResult property
ans =
7-139
rfckt.amplifier.IntpType property
Description The analyze method is flexible in that it does not require the
frequencies of the specified S-parameters to match the requested
analysis frequencies. If needed, analyze applies the interpolation and
extrapolation method specified in the IntpType property to the specified
data to create a new set of data at the requested analysis frequencies.
The following table lists the available interpolation methods and
describes each one.
Method Description
Linear (default) Linear interpolation
Spline Cubic spline interpolation
Cubic Piecewise cubic Hermite
interpolation
amp =
Name: 'Amplifier'
nPort: 2
AnalyzedResult: [1x1 rfdata.data]
IntpType: 'Cubic'
NetworkData: [1x1 rfdata.network]
NoiseData: [1x1 rfdata.noise]
NonlinearData: [1x1 rfdata.power]
7-140
rfckt.amplifier.Name property
Values 'Amplifier'
ans =
Amplifier
7-141
rfckt.amplifier.NetworkData property
ans =
7-142
rfckt.amplifier.NoiseData property
Description A scalar value or object that stores noise data. The default is an
rfdata.noise object whose values are taken from the 'default.amp'
data file.
ans =
7-143
rfckt.amplifier.NonlinearData property
Description A scalar value or object that stores nonlinearity data. The default is an
rfdata.power object whose values are taken from the 'default.amp'
data file.
ans =
7-144
rfckt.amplifier.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-145
rfckt.cascade.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
⎡A B ⎤ ⎡ A′ B′ ⎤ ⎡ A′′ B′′ ⎤
⎢C =
⎣ D ⎥⎦ ⎢⎣ C′ D′⎥⎦ ⎢⎣ C′′ D′′⎥⎦
7-146
rfckt.cascade.AnalyzedResult property
⎡ NFmin − 1 ⎤
⎢ Rn − Rn Yopt∗ ⎥
CA = 2kT ⎢ 2 ⎥
⎢ NFmin − 1 − R Y Rn Yopt
2 ⎥
⎢⎣ 2
n opt ⎥⎦
where k is Boltzmann’s constant, and T is the noise temperature in
Kelvin.
The method combines CA’ and CA” into a single correlation matrix CA
using the equation
⎡ A ’ B ’ ⎤ ’’ ⎡ A ’ B ’ ⎤
C A = C’A + ⎢ ⎥ CA ⎢ C ’ D ’⎥
⎣ C ’ D ’⎦ ⎣ ⎦
z+ C A z
F =1+
2kT Re {ZS }
⎡ 1 ⎤
z = ⎢ *⎥
⎢⎣ ZS ⎥⎦
7-147
rfckt.cascade.AnalyzedResult property
1
OIP3 =
1 1 1
+ +…+
OIP3, N GN ⋅ OIP3, N −1 GN ⋅ GN −1 ⋅ …⋅ G2 ⋅ OIP3,1
where Gn is the gain of the nth element of the cascade and OIP3,N is
the OIP3 of the nth element.
• The analyze method uses the cascaded S-parameters to calculate the
group delay values at the frequencies specified in the analyze input
argument freq, as described in the analyze reference page.
amp = rfckt.amplifier('IntpType','cubic');
tx1 = rfckt.txline;
tx2 = rfckt.txline;
casc = rfckt.cascade('Ckts',{tx1,amp,tx2});
analyze(casc,[1e9:1e7:2e9]);
casc.AnalyzedResult
References Hillbrand, H. and P.H. Russer, “An Efficient Method for Computer
Aided Noise Analysis of Linear Amplifier Networks,” IEEE Transactions
on Circuits and Systems, Vol. CAS-23, Number 4, pp. 235–238, 1976.
7-148
rfckt.cascade.Ckts property
Values Cell
Description Cell array containing handles to all circuit objects in the network, in
order from source to load. All circuits must be 2-port. This property
is empty by default.
ans =
7-149
rfckt.cascade.Name property
ans =
Cascaded Network
7-150
rfckt.cascade.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-151
rfckt.coaxial.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ekd + e− kd
A=
2
B=
(
Z0 * ekd − e− kd )
2
kd − kd
e −e
C=
2 * Z0
ekd + e− kd
D=
2
7-152
rfckt.coaxial.AnalyzedResult property
(L), conductance (G), and capacitance (C) per unit length (meters)
as follows:
R + j 2πfL
Z0 =
G + j 2πfC
k = kr + jki = ( R + j 2πfL)(G + j 2πFC)
where
1 ⎛1 1⎞
R= +
2 cond cond ⎜⎝ a b ⎟⎠
⎛b⎞
L= ln ⎜ ⎟
2 ⎝ a ⎠
2 ′′
G=
⎛b⎞
ln ⎜ ⎟
⎝a⎠
2
C=
⎛b⎞
ln ⎜ ⎟
⎝a⎠
In these equations:
- a is the radius of the inner conductor.
- b is the radius of the outer conductor.
- σcond is the conductivity in the conductor.
- μ is the permeability of the dielectric.
- ε is the permittivity of the dielectric.
- ε″ is the imaginary part of ε, ε″ = ε0εrtan δ, where:
• ε0 is the permittivity of free space.
• εr is the EpsilonR property value.
• tan δ is the LossTangent property value.
7-153
rfckt.coaxial.AnalyzedResult property
calculates as 1 / f cond .
- f is a vector of modeling frequencies determined by the Output
Port block.
• If you model the transmission line as a shunt or series stub, the
analyze method first calculates the ABCD-parameters at the
specified frequencies. It then uses the abcd2s function to convert the
ABCD-parameters to S-parameters.
When you set the StubMode property to 'Shunt', the 2-port network
consists of a stub transmission line that you can terminate with either
a short circuit or an open circuit as shown in the following figure.
A =1
B=0
C = 1 / Zin
D =1
When you set the StubMode property to 'Series', the 2-port network
consists of a series transmission line that you can terminate with
either a short circuit or an open circuit as shown in the following
figure.
7-154
rfckt.coaxial.AnalyzedResult property
A =1
B = Zin
C=0
D =1
The analyze method uses the S-parameters to calculate the group delay
values at the frequencies specified in the analyze input argument freq,
as described in the analyze reference page.
ans =
7-155
rfckt.coaxial.EpsilonR property
Values Scalar
tx1=rfckt.coaxial;
tx1.EpsilonR=2.7;
7-156
rfckt.coaxial.InnerRadius property
Values Scalar
Description The radius of the inner conductor, in meters. The default is 7.25e-4.
Examples tx1=rfckt.coaxial;
tx1.InnerRadius=2.5e-4;
7-157
rfckt.coaxial.LineLength property
Values Scalar
Description The physical length of the transmission line in meters. The default
is 0.01.
7-158
rfckt.coaxial.LossTangent property
Values Scalar
Examples tx1=rfckt.coaxial;
tx1.LossTangent=0.002;
7-159
rfckt.coaxial.MuR property
Values Scalar
tx1=rfckt.coaxial;
tx1.MuR=0.8;
7-160
rfckt.coaxial.Name property
ans =
7-161
rfckt.coaxial.OuterRadius property
Values Scalar
Description The radius of the outer conductor, in meters. The default is 0.0026.
Examples tx1=rfckt.coaxial;
tx1.OuterRadius=0.0031;
7-162
rfckt.coaxial.SigmaCond property
Values Scalar
Description Conductivity, in Siemens per meter (S/m), of the conductor. The default
is Inf.
Examples tx1=rfckt.coaxial;
tx1.SigmaCond=5.81e7;
7-163
rfckt.coaxial.StubMode property
Description String that specifies what type of stub, if any, to include in the
transmission line model.
7-164
rfckt.coaxial.Termination property
Description String that specifies what type of termination to use for 'Shunt' and
'Series' stub modes. Termination is ignored if the line has no stub.
Use 'NotApplicable' when StubMode is 'NotAStub'.
7-165
rfckt.coaxial.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-166
rfckt.cpw.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ekd + e− kd
A=
2
B=
(
Z0 * ekd − e− kd )
2
kd − kd
e −e
C=
2 * Z0
ekd + e− kd
D=
2
7-167
rfckt.cpw.AnalyzedResult property
A =1
B=0
C = 1 / Zin
D =1
When you set the StubMode property to 'Series', the 2-port network
consists of a series transmission line that you can terminate with
either a short circuit or an open circuit as shown in the following
figure.
7-168
rfckt.cpw.AnalyzedResult property
A =1
B = Zin
C=0
D =1
The analyze method uses the S-parameters to calculate the group delay
values at the frequencies specified in the analyze input argument freq,
as described in the analyze reference page.
ans =
7-169
rfckt.cpw.ConductorWidth property
Values Scalar
Examples tx1=rfckt.cpw;
tx1.ConductorWidth=0.001;
7-170
rfckt.cpw.EpsilonR property
Values Scalar
tx1=rfckt.cpw;
tx1.EpsilonR=2.7;
7-171
rfckt.cpw.Height property
Values Scalar
Examples tx1=rfckt.cpw;
tx1.Height=0.001;
7-172
rfckt.cpw.LineLength property
Values Scalar
Description The physical length of the transmission line in meters. The default
is 0.01.
7-173
rfckt.cpw.LossTangent property
Values Scalar
ans =
7-174
rfckt.cpw.Name property
ans =
7-175
rfckt.cpw.SigmaCond property
Values Scalar
Description Conductivity, in Siemens per meter (S/m), of the conductor. The default
is Inf.
Examples tx1=rfckt.cpw;
tx1.SigmaCond=5.81e7;
7-176
rfckt.cpw.SlotWidth property
Values Scalar
Examples tx1=rfckt.cpw;
tx1.SlotWidth=0.002;
7-177
rfckt.cpw.StubMode property
Description String that specifies what type of stub, if any, to include in the
transmission line model.
7-178
rfckt.cpw.Termination property
Description String that specifies what type of termination to use for 'Shunt'and
'Series' stub modes. Termination is ignored if the line has no stub.
Use 'NotApplicable' when StubMode is 'NotAStub'.
7-179
rfckt.cpw.Thickness property
Values Scalar
Examples tx1=rfckt.cpw;
tx1.Thickness=2e-5;
7-180
rfckt.cpw.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-181
rfckt.datafile.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
f1 f2 f4 f5 f3 Frequencies in ascending
order of magnitude
(fmin) (fmax)
7-182
rfckt.datafile.AnalyzedResult property
ans =
7-183
rfckt.datafile.File property
Values String
Description The name of the .snp, .ynp, .znp, or .hnp file describing the circuit,
where n is the number of ports. The default file name is 'passive.s2p'.
Examples data=rfckt.datafile;
data.File='default.s2p'
data =
7-184
rfckt.datafile.IntpType property
Description The analyze method is flexible in that it does not require the
frequencies of the specified S-parameters to match the requested
analysis frequencies. If needed, analyze applies the interpolation and
extrapolation method specified in the IntpType property to the specified
data to create a new set of data at the requested analysis frequencies.
The following table lists the available interpolation methods and
describes each one.
Method Description
Linear (default) Linear interpolation
Spline Cubic spline interpolation
Cubic Piecewise cubic Hermite
interpolation
7-185
rfckt.datafile.Name property
ans =
Data object
7-186
rfckt.datafile.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-187
rfckt.delay.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
⎧ S11 =0
⎪
⎪ S12 = e− p
⎨
⎪ S21 = e− p
⎪
⎩ S22 =0
Above, p = αa + iβ, where αa is the attenuation coefficient and β is the
wave number. The attenuation coefficient αa is related to the loss, α, by
a = − ln (10 / 20 )
and the wave number β is related to the time delay, D, by
= 2 fD
where f is the frequency range specified in the analyze input argument
freq.
The analyze method uses the S-parameters to calculate the group delay
values at the frequencies specified in the analyze input argument freq,
as described in the analyze reference page.
7-188
rfckt.delay.AnalyzedResult property
Examples Compute S-parameters, noise figure, OIP3, and group delay values:
del = rfckt.delay;
analyze(del,[1e9,2e9,3e9]);
del.AnalyzedResult
7-189
rfckt.delay.Loss property
Values Scalar
Description Line loss value, in decibels. Line loss is the reduction in strength of the
signal as it travels over the delay line and must be nonnegative. The
default is 0.
7-190
rfckt.delay.Name property
ans =
Delay Line
7-191
rfckt.delay.TimeDelay property
Values Scalar
7-192
rfckt.delay.Z0 property
Values Scalar
Description The characteristic impedance, in ohms, of the delay line. The default
is 50 ohms.
7-193
rfckt.delay.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-194
rfckt.hybrid.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
where
⎡h ′ h12′ ⎤
[ h′ ] = ⎢11 ⎥
⎢⎣ h21′ h22′ ⎥⎦
⎡ h ′′ h ′′ ⎤
[ h′′] = ⎢ 11 12 ⎥
⎣⎢ h21′′ h22′′ ⎥⎦
7-195
rfckt.hybrid.AnalyzedResult property
• The analyze method then calculates the h matrix for the hybrid
network by calculating the sum of the h matrices of the individual
networks. The following equation illustrates the calculations for two
2-port networks.
⎡ h ′ + h ′′ h12′ + h12′′ ⎤
[ h] = ⎢ 11 11
⎥
⎢ h ′ + h ′′ h22′ + h22′′ ⎥⎦
⎣ 21 21
ans =
7-196
rfckt.hybrid.Ckts property
Values Cell
Description Cell array containing handles to all circuit objects in the network. All
circuits must be 2-port and linear. This property is empty by default.
ans =
7-197
rfckt.hybrid.Name property
ans =
7-198
rfckt.hybrid.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-199
rfckt.hybridg.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
where
⎡g ′ g12′ ⎤
[ g ′] = ⎢11 ⎥
⎢⎣ g21′ g22′ ⎥⎦
⎡ g ′′ g ′′ ⎤
[ g′′] = ⎢ 11 12 ⎥
⎢⎣ g21′′ g22′′ ⎥⎦
7-200
rfckt.hybridg.AnalyzedResult property
2 The analyze method then calculates the g matrix for the inverse
hybrid network by calculating the sum of the g matrices of the
individual networks. The following equation illustrates the
calculations for two 2-port networks.
⎡ g ′ + g ′′ g12′ + g12′′ ⎤
[ g] = ⎢ 11 11
⎥
⎢ g ′ + g ′′ g22′ + g22′′ ⎥⎦
⎣ 21 21
ans =
7-201
rfckt.hybridg.Ckts property
Values Cell
Description Cell array containing handles to all circuit objects in the network. All
circuits must be 2-port and linear. This property is empty by default.
ans =
7-202
rfckt.hybridg.Name property
ans =
7-203
rfckt.hybridg.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-204
rfckt.lcbandpasspi.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ans =
7-205
rfckt.lcbandpasspi.C property
Values Vector
Examples filter=rfckt.lcbandpasspi;
filter.C = [10.1 4.5 14.2]*1e-12;
7-206
rfckt.lcbandpasspi.L property
Values Vector
7-207
rfckt.lcbandpasspi.Name property
ans =
LC Bandpass Pi
7-208
rfckt.lcbandpasspi.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-209
rfckt.lcbandpasstee.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ans =
7-210
rfckt.lcbandpasstee.C property
Values Vector
Examples filter=rfckt.lcbandpasstee;
filter.C = [10.1 4.5 14.2]*1e-12;
7-211
rfckt.lcbandpasstee.L property
Values Vector
7-212
rfckt.lcbandpasstee.Name property
ans =
LC Bandpass Tee
7-213
rfckt.lcbandpasstee.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-214
rfckt.lcbandstoppi.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ans =
7-215
rfckt.lcbandstoppi.C property
Values Vector
Examples filter=rfckt.lcbandstoppi;
filter.C = [10.1 4.5 14.2]*1e-12;
7-216
rfckt.lcbandstoppi.L property
Values Vector
7-217
rfckt.lcbandstoppi.Name property
ans =
LC Bandstop Pi
7-218
rfckt.lcbandstoppi.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-219
rfckt.lcbandstoptee.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ans =
7-220
rfckt.lcbandstoptee.C property
Values Vector
Examples filter=rfckt.lcbandstoptee;
filter.C = [10.1 4.5 14.2]*1e-12;
7-221
rfckt.lcbandstoptee.L property
Values Vector
7-222
rfckt.lcbandstoptee.Name property
ans =
LC Bandstop Tee
7-223
rfckt.lcbandstoptee.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-224
rfckt.lchighpasspi.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ans =
7-225
rfckt.lchighpasspi.C property
Values Vector
Examples filter=rfckt.lchighpasspi;
filter.C = [10.1 4.5 14.2]*1e-12;
7-226
rfckt.lchighpasspi.L property
Values Vector
7-227
rfckt.lchighpasspi.Name property
ans =
LC Highpass Pi
7-228
rfckt.lchighpasspi.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-229
rfckt.lchighpasstee.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ans =
7-230
rfckt.lchighpasstee.C property
Values Vector
Examples filter=rfckt.lchighpasstee;
filter.C = [10.1 4.5 14.2]*1e-12;
7-231
rfckt.lchighpasstee.L property
Values Vector
7-232
rfckt.lchighpasstee.Name property
ans =
LC Highpass Tee
7-233
rfckt.lchighpasstee.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-234
rfckt.lclowpasspi.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ans =
7-235
rfckt.lclowpasspi.C property
Values Vector
Examples filter=rfckt.lclowpasspi;
filter.C = [10.1 4.5 14.2]*1e-12;
7-236
rfckt.lclowpasspi.L property
Values Vector
7-237
rfckt.lclowpasspi.Name property
ans =
LC Lowpass Pi
7-238
rfckt.lclowpasspi.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-239
rfckt.lclowpasstee.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ans =
7-240
rfckt.lclowpasstee.C property
Values Vector
Examples filter=rfckt.lclowpasstee;
filter.C = [10.1 4.5 14.2]*1e-12;
7-241
rfckt.lclowpasstee.L property
Values Vector
7-242
rfckt.lclowpasstee.Name property
ans =
LC Lowpass Tee
7-243
rfckt.lclowpasstee.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-244
rfckt.microstrip.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
•
If you model the transmission line as a stubless line, the analyze
method first calculates the ABCD-parameters at each frequency
contained in the modeling frequencies vector. It then uses the abcd2s
function to convert the ABCD-parameters to S-parameters.
The analyze method calculates the ABCD-parameters using
the physical length of the transmission line, d, and the complex
propagation constant, k, using the following equations:
ekd + e− kd
A=
2
B=
(
Z0 * ekd − e− kd )
2
kd − kd
e −e
C=
2 * Z0
ekd + e− kd
D=
2
7-245
rfckt.microstrip.AnalyzedResult property
A =1
B=0
C = 1 / Zin
D =1
When you set the StubMode property to 'Series', the 2-port network
consists of a series transmission line that you can terminate with
either a short circuit or an open circuit as shown in the following
figure.
7-246
rfckt.microstrip.AnalyzedResult property
A =1
B = Zin
C=0
D =1
The analyze method uses the S-parameters to calculate the group delay
values at the frequencies specified in the analyze input argument freq,
as described in the analyze reference page.
ans =
7-247
rfckt.microstrip.EpsilonR property
Values Scalar
tx1=rfckt.microstrip;
tx1.EpsilonR=2.7;
7-248
rfckt.microstrip.Height property
Values Scalar
Examples tx1=rfckt.microstrip;
tx1.Height=0.001;
7-249
rfckt.microstrip.LineLength property
Values Scalar
Description The physical length of the transmission line in meters. The default
is 0.01.
7-250
rfckt.microstrip.LossTangent property
Values Scalar
ans =
7-251
rfckt.microstrip.Name property
ans =
7-252
rfckt.microstrip.SigmaCond property
Values Scalar
Description Conductivity, in Siemens per meter (S/m), of the conductor. The default
is Inf.
Examples tx1=rfckt.microstrip;
tx1.SigmaCond=5.81e7;
7-253
rfckt.microstrip.StubMode property
Description String that specifies what type of stub, if any, to include in the
transmission line model.
7-254
rfckt.microstrip.Termination property
Description String that specifies what type of termination to use for 'Shunt'and
'Series' stub modes. Termination is ignored if the line has no stub.
Use 'NotApplicable when StubMode is 'NotAStub'.
7-255
rfckt.microstrip.Thickness property
Values Scalar
Examples tx1=rfckt.microstrip;
tx1.Thickness=2e-6;
7-256
rfckt.microstrip.Width property
Values Scalar
Examples tx1=rfckt.microstrip;
tx1.Thickness=2e-4;
7-257
rfckt.microstrip.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-258
rfckt.mixer.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
7-259
rfckt.mixer.AnalyzedResult property
u3
FAM / AM (u) = u −
3
u3
FAM / AM (u) = u −
3
where u is the magnitude of the scaled input signal, which is a
unitless normalized input voltage.
• The analyze method uses the data stored in the 'NetworkData'
property of the rfckt.mixer object to calculate the group delay
values of the mixer at the frequencies specified in freq, as described
in the analyze reference page.
• The analyze method uses the data stored in the 'NetworkData'
property of the rfckt.mixer object to calculate the S-parameter
values of the mixer at the frequencies specified in freq. If the
'NetworkData' property contains network Y- or Z-parameters, the
analyze method first converts the parameters to S-parameters.
Using the interpolation method you specify with the 'IntpType'
property, the analyze method interpolates the S-parameter values to
determine their values at the specified frequencies.
Specifically, the analyze method orders the S-parameters according
to the ascending order of their frequencies, fn. It then interpolates
the S-parameters, using the MATLAB interp1 function. For
example, the curve in the following diagram illustrates the result of
interpolating the S11 parameters at five different frequencies.
7-260
rfckt.mixer.AnalyzedResult property
f1 f2 f4 f5 f3 Frequencies in ascending
order of magnitude
(fmin) (fmax)
For more information, see “One-Dimensional Interpolation” and the
interp1 reference page in the MATLAB documentation.
As shown in the preceding diagram, the analyze method uses the
parameter values at fmin, the minimum input frequency, for all
frequencies smaller than fmin. It uses the parameters values at fmax,
the maximum input frequency, for all frequencies greater than fmax.
In both cases, the results may not be accurate, so you need to specify
network parameter values over a range of frequencies that is wide
enough to account for the mixer behavior.
RF Toolbox software computes the reflected wave at the mixer input
(b1) and at the mixer output (b2) from the interpolated S-parameters
as
where
- fin and fout are the mixer input and output frequencies, respectively.
- a1 and a2 are the incident waves at the mixer input and output,
respectively.
The interpolated S21 parameter values describe the conversion gain
as a function of frequency, referred to the mixer input frequency.
7-261
rfckt.mixer.AnalyzedResult property
ans =
7-262
rfckt.mixer.FLO property
Values Scalar
7-263
rfckt.mixer.FreqOffset property
Values Vector
Description Vector specifying the frequency offset values, in hertz, that correspond
to the phase noise level values specified by the PhaseNoiseLevel
property. This property is empty by default.
7-264
rfckt.mixer.IntpType property
Description The analyze method is flexible in that it does not require the
frequencies of the specified S-parameters to match the requested
analysis frequencies. If needed, analyze applies the interpolation and
extrapolation method specified in the IntpType property to the specified
data to create a new set of data at the requested analysis frequencies.
The following table lists the available interpolation methods and
describes each one.
Method Description
Linear (default) Linear interpolation
Spline Cubic spline interpolation
Cubic Piecewise cubic Hermite
interpolation
mix1 =
Name: 'Mixer'
nPort: 2
AnalyzedResult: [1x1 rfdata.data]
IntpType: 'Cubic'
NetworkData: [1x1 rfdata.network]
NoiseData: [1x1 rfdata.noise]
NonlinearData: Inf
MixerType: 'downconverter'
FLO: 1.0000e+009
FreqOffset: []
PhaseNoiseLevel: []
7-265
rfckt.mixer.MixerSpurData property
Name: 'Mixer'
nPort: 2
AnalyzedResult: [1x1 rfdata.data]
IntpType: 'Linear'
NetworkData: [1x1 rfdata.network]
NoiseData: [1x1 rfdata.noise]
NonlinearData: Inf
MixerSpurData: [1x1 rfdata.mixerspur]
MixerType: 'Downconverter'
FLO: 1.0000e+009
FreqOffset: []
PhaseNoiseLevel: []
7-266
rfckt.mixer.MixerType property
7-267
rfckt.mixer.Name property
Values 'Mixer'
ans =
Mixer
7-268
rfckt.mixer.NetworkData property
ans =
7-269
rfckt.mixer.NoiseData property
Description A scalar value or object that stores noise data. The default is an
rfdata.noise object whose values are taken from the 'default.s2p'
data file.
ans =
7-270
rfckt.mixer.NonlinearData property
Description A scalar value or object that stores nonlinearity data. The default is
an Inf.
ans =
Inf
7-271
rfckt.mixer.PhaseNoiseLevel property
Values Vector
Description Vector specifying the phase noise levels, in dBc/Hz, that correspond to
the frequency offset values specified by the FreqOffset property. This
property is empty by default.
7-272
rfckt.mixer.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-273
rfckt.parallel.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
where
⎡Y ′ Y12′ ⎤
[ Y ′] = ⎢11 ⎥
⎢⎣Y21′ Y22′ ⎥⎦
⎡ Y ′′ Y ′′ ⎤
[Y ′′] = ⎢ 11 12 ⎥
⎢⎣Y21′′ Y22′′ ⎥⎦
7-274
rfckt.parallel.AnalyzedResult property
⎡ Y ′ + Y ′′ Y12′ + Y12′′ ⎤
[Y ] = [Y ′] + [Y ′′] = ⎢ 11 11
⎥
⎢Y ′ + Y ′′ Y22′ + Y22′′ ⎥⎦
⎣ 21 21
ans =
7-275
rfckt.parallel.Ckts property
Values Cell
Description Cell array containing handles to all circuit objects in the network. All
circuits must be 2-port and linear. This property is empty by default.
ans =
7-276
rfckt.parallel.Name property
ans =
7-277
rfckt.parallel.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-278
rfckt.parallelplate.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ekd + e− kd
A=
2
B=
(
Z0 * ekd − e− kd )
2
kd − kd
e −e
C=
2 * Z0
ekd + e− kd
D=
2
7-279
rfckt.parallelplate.AnalyzedResult property
R + j 2πfL
Z0 =
G + j 2πfC
k = kr + jki = ( R + j 2πfL)(G + j 2πFC)
where
2
R=
w cond cond
d
L=
w
w
G = ′′
d
w
C=
d
In these equations:
- w is the plate width.
- d is the plate separation.
- σcond is the conductivity in the conductor.
- μ is the permeability of the dielectric.
- ε is the permittivity of the dielectric.
- ε″ is the imaginary part of ε, ε″ = ε0εrtan δ, where:
• ε0 is the permittivity of free space.
• εr is the EpsilonR property value.
• tan δ is the LossTangent property value.
7-280
rfckt.parallelplate.AnalyzedResult property
- δcond is the skin depth of the conductor, which the block calculates
as 1 / f cond .
- f is a vector of modeling frequencies determined by the Output
Port block.
• If you model the transmission line as a shunt or series stub, the
analyze method first calculates the ABCD-parameters at the
specified frequencies. It then uses the abcd2s function to convert the
ABCD-parameters to S-parameters.
When you set the StubMode property to 'Shunt', the 2-port network
consists of a stub transmission line that you can terminate with either
a short circuit or an open circuit as shown in the following figure.
A =1
B=0
C = 1 / Zin
D =1
When you set the StubMode property to 'Series', the 2-port network
consists of a series transmission line that you can terminate with
either a short circuit or an open circuit as shown in the following
figure.
7-281
rfckt.parallelplate.AnalyzedResult property
A =1
B = Zin
C=0
D =1
The analyze method uses the S-parameters to calculate the group delay
values at the frequencies specified in the analyze input argument freq,
as described in the analyze reference page.
ans =
7-282
rfckt.parallelplate.EpsilonR property
Values Scalar
Examples tx1=rfckt.parallelplate;
tx1.EpsilonR=2.7;
7-283
rfckt.parallelplate.LineLength property
Values Scalar
7-284
rfckt.parallelplate.LossTangent property
Values Scalar
Examples tx1=rfckt.parallelplate;
tx1.LossTangent=0.002;
7-285
rfckt.parallelplate.MuR property
Values Scalar
tx1=rfckt.parallelplate;
tx1.MuR=0.8;
7-286
rfckt.parallelplate.Name property
ans =
7-287
rfckt.parallelplate.Separation property
Values Scalar
Description Thickness, in meters, of the dielectric separating the plates. The default
is 1.0e-3..
Examples tx1=rfckt.parallelplate;
tx1.Separation=0.8e-3;
7-288
rfckt.parallelplate.SigmaCond property
Values Scalar
Description Conductivity, in Siemens per meter (S/m), of the conductor. The default
is Inf.
Examples tx1=rfckt.parallelplate;
tx1.SigmaCond=5.81e7;
7-289
rfckt.parallelplate.StubMode property
Description String that specifies what type of stub, if any, to include in the
transmission line model.
7-290
rfckt.parallelplate.Termination property
Description String that specifies what type of termination to use for 'Shunt'and
'Series' stub modes. Termination is ignored if the line has no stub.
Use 'NotApplicable' when StubMode is 'NotAStub'.
7-291
rfckt.parallelplate.Width property
Values Scalar
Examples tx1=rfckt.parallelplate;
tx1.Width=0.001;
7-292
rfckt.parallelplate.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-293
rfckt.passive.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
7-294
rfckt.passive.AnalyzedResult property
f1 f2 f4 f5 f3 Frequencies in ascending
order of magnitude
(fmin) (fmax)
For more information, see “One-Dimensional Interpolation” and the
interp1 reference page in the MATLAB documentation.
As shown in the preceding diagram, the analyze method uses the
parameter values at fmin, the minimum input frequency, for all
frequencies smaller than fmin. It uses the parameters values at fmax, the
maximum input frequency, for all frequencies greater than fmax. In both
cases, the results may not be accurate, so you need to specify network
parameter values over a range of frequencies that is wide enough to
account for the component behavior.
The analyze method uses the S-parameters to calculate the group delay
values at the frequencies specified in the analyze input argument freq,
as described in the analyze reference page.
ans =
7-295
rfckt.passive.AnalyzedResult property
Z0: 50
ZS: 50
ZL: 50
IntpType: 'Linear'
7-296
rfckt.passive.IntpType property
Description The analyze method is flexible in that it does not require the
frequencies of the specified S-parameters to match the requested
analysis frequencies. If needed, analyze applies the interpolation and
extrapolation method specified in the IntpType property to the specified
data to create a new set of data at the requested analysis frequencies.
The following table lists the available interpolation methods and
describes each one.
Method Description
Linear (default) Linear interpolation
Spline Cubic spline interpolation
Cubic Piecewise cubic Hermite
interpolation
pas =
Name: 'Passive'
nPort: 2
AnalyzedResult: [1x1 rfdata.data]
IntpType: 'Cubic'
NetworkData: [1x1 rfdata.network]
7-297
rfckt.passive.Name property
Values 'Passive'
ans =
Passive
7-298
rfckt.passive.NetworkData property
ans =
7-299
rfckt.passive.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-300
rfckt.rlcgline.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ekd + e− kd
A=
2
B=
(
Z0 * ekd − e− kd )
2
kd − kd
e −e
C=
2 * Z0
ekd + e− kd
D=
2
7-301
rfckt.rlcgline.AnalyzedResult property
R + j 2πfL
Z0 =
G + j 2πfC
k = kr + jki = ( R + j 2πfL)(G + j 2πFC)
A =1
B=0
C = 1 / Zin
D =1
When you set the StubMode property to 'Series', the 2-port network
consists of a series transmission line that you can terminate with
7-302
rfckt.rlcgline.AnalyzedResult property
A =1
B = Zin
C=0
D =1
The analyze method uses the S-parameters to calculate the group delay
values at the frequencies specified in the analyze input argument freq,
as described in the analyze reference page.
ans =
7-303
rfckt.rlcgline.AnalyzedResult property
ZS: 50
ZL: 50
IntpType: 'Linear'
7-304
rfckt.rlcgline.C property
Values Vector
Description Capacitance values per length, in farads per meter, that correspond
to the frequencies stored in the Freq property. All values must be
nonnegative. The default is 0.
Examples tx1=rfckt.rlcgline;
tx1.C = [10.1 4.5 14.2]*1e-12;
7-305
rfckt.rlcgline.Freq property
Values Vector
Description M-element vector of frequency values in hertz for the RLCG values.
The values must be positive, and the order of the frequencies must
correspond to the order of the RLCG values. The default is 1e9.
7-306
rfckt.rlcgline.G property
Values Vector
Examples tx1=rfckt.rlcgline;
tx1.G = [10.1 4.5 14.2]*1e-3;
7-307
rfckt.rlcgline.IntpType property
Description The analyze method is flexible in that it does not require the
frequencies of the specified S-parameters to match the requested
analysis frequencies. If needed, analyze applies the interpolation and
extrapolation method specified in the IntpType property to the specified
data to create a new set of data at the requested analysis frequencies.
The following table lists the available interpolation methods and
describes each one.
Method Description
Linear (default) Linear interpolation
Spline Cubic spline interpolation
Cubic Piecewise cubic Hermite
interpolation
7-308
rfckt.rlcgline.L property
Values Vector
Description Inductance values per length, in henries per meter, that correspond
to the frequencies stored in the Freq property. All values must be
nonnegative. The default is 0.
7-309
rfckt.rlcgline.LineLength property
Values Scalar
Description The physical length of the transmission line in meters. The default
is 0.01.
7-310
rfckt.rlcgline.Name property
ans =
7-311
rfckt.rlcgline.R property
Values Vector
Description Resistance per length, in ohms per meter, that correspond to the
frequencies stored in the Freq property. All values must be nonnegative.
The default is 0.
7-312
rfckt.rlcgline.StubMode property
Description String that specifies what type of stub, if any, to include in the
transmission line model.
7-313
rfckt.rlcgline.Termination property
Description String that specifies what type of termination to use for 'Shunt'and
'Series' stub modes. Termination is ignored if the line has no stub.
Use 'NotApplicable' when StubMode is 'NotAStub'.
7-314
rfckt.rlcgline.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-315
rfckt.series.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
where
⎡Z ′ Z12′ ⎤
[ Z ′] = ⎢ 11 ⎥
⎢⎣ Z21′ Z22′ ⎥⎦
⎡ Z ′′ Z ′′ ⎤
[ Z ′′] = ⎢ 11 12 ⎥
⎣⎢ Z21′′ Z22′′ ⎥⎦
7-316
rfckt.series.AnalyzedResult property
2 The analyze method then calculates the impedance matrix for the
series network by calculating the sum of the individual impedances.
The following equation illustrates the calculations for two 2-port
circuits.
⎡ Z ′ + Z ′′ Z12′ + Z12′′ ⎤
[ Z ] = [ Z ′] + [ Z ′′] = ⎢ 11 11
⎥
⎢ Z21′ + Z21′′ Z22′ + Z22′′ ⎥⎦
⎣
ans =
7-317
rfckt.series.Ckts property
Values Cell
Description Cell array containing handles to all circuit objects in the network. All
circuits must be 2-port and linear. This property is empty by default.
ans =
7-318
rfckt.series.Name property
ans =
7-319
rfckt.series.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-320
rfckt.seriesrlc.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
− LC 2 + jRC + 1
Z=
jC
and ω = 2πf.
The analyze method uses the S-parameters to calculate the group delay
values at the frequencies specified in the analyze input argument freq,
as described in the analyze reference page.
ans =
7-321
rfckt.seriesrlc.AnalyzedResult property
ZL: 50
IntpType: 'Linear'
7-322
rfckt.seriesrlc.C property
Values Scalar
Examples rlc1=rfckt.seriesrlc;
rlc1.C = 1e-12;
7-323
rfckt.seriesrlc.L property
Values Scalar
7-324
rfckt.seriesrlc.Name property
ans =
Series RLC
7-325
rfckt.seriesrlc.R property
Values Scalar
7-326
rfckt.seriesrlc.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-327
rfckt.shuntrlc.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
− LC 2 + j( L / R) + 1
Y =
jL
and ω = 2πf.
The analyze method uses the S-parameters to calculate the group delay
values at the frequencies specified in the analyze input argument freq,
as described in the analyze reference page.
ans =
7-328
rfckt.shuntrlc.AnalyzedResult property
ZS: 50
ZL: 50
IntpType: 'Linear'
7-329
rfckt.shuntrlc.C property
Values Scalar
Examples rlc1=rfckt.shuntrlc;
rlc1.C = 1e-12;
7-330
rfckt.shuntrlc.L property
Values Scalar
7-331
rfckt.shuntrlc.Name property
ans =
Shunt RLC
7-332
rfckt.shuntrlc.R property
Values Scalar
7-333
rfckt.shuntrlc.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-334
rfckt.twowire.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ekd + e− kd
A=
2
B=
(
Z0 * ekd − e− kd )
2
kd − kd
e −e
C=
2 * Z0
ekd + e− kd
D=
2
7-335
rfckt.twowire.AnalyzedResult property
(L), conductance (G), and capacitance (C) per unit length (meters)
as follows:
R + j 2πfL
Z0 =
G + j 2πfC
k = kr + jki = ( R + j 2πfL)(G + j 2πFC)
where
1
R=
a cond cond
⎛ D⎞
L= a cosh ⎜ ⎟
⎝ 2a ⎠
′′
G=
⎛ D⎞
a cosh ⎜ ⎟
⎝ 2a ⎠
C=
⎛ D⎞
a cosh ⎜ ⎟
⎝ 2a ⎠
In these equations:
- w is the plate width.
- d is the plate separation.
- σcond is the conductivity in the conductor.
- μ is the permeability of the dielectric.
- ε is the permittivity of the dielectric.
- ε″ is the imaginary part of ε, ε″ = ε0εrtan δ, where:
• ε0 is the permittivity of free space.
• εr is the EpsilonR property value.
• tan δ is the LossTangent property value.
7-336
rfckt.twowire.AnalyzedResult property
- δcond is the skin depth of the conductor, which the block calculates
as 1 / f cond .
- f is a vector of modeling frequencies determined by the Output
Port block.
• If you model the transmission line as a shunt or series stub, the
analyze method first calculates the ABCD-parameters at the
specified frequencies. It then uses the abcd2s function to convert the
ABCD-parameters to S-parameters.
When you set the StubMode property to 'Shunt', the 2-port network
consists of a stub transmission line that you can terminate with either
a short circuit or an open circuit as shown in the following figure.
A =1
B=0
C = 1 / Zin
D =1
When you set the StubMode property to 'Series', the 2-port network
consists of a series transmission line that you can terminate with
either a short circuit or an open circuit as shown in the following
figure.
7-337
rfckt.twowire.AnalyzedResult property
A =1
B = Zin
C=0
D =1
The analyze method uses the S-parameters to calculate the group delay
values at the frequencies specified in the analyze input argument freq,
as described in the analyze reference page.
ans =
7-338
rfckt.twowire.EpsilonR property
Values Scalar
Examples tx1=rfckt.twowire;
tx1.EpsilonR=2.7;
7-339
rfckt.twowire.LineLength property
Values Scalar
Description The physical length of the transmission line in meters. The default
is 0.01.
7-340
rfckt.twowire.LossTangent property
Values Scalar
Examples tx1=rfckt.twowire;
tx1.LossTangent=0.002;
7-341
rfckt.twowire.MuR property
Values Scalar
tx1=rfckt.twowire;
tx1.MuR=0.8;
7-342
rfckt.twowire.Name property
ans =
7-343
rfckt.twowire.Radius property
Values Scalar
Description The radius of the conducting wires, in meters. The default is 6.7e-4.
Examples tx1=rfckt.twowire;
tx1.Radius=0.0031;
7-344
rfckt.twowire.Separation property
Values Scalar
Description Distance, in meters, separating the wire centers. The default is 0.0016.
Examples tx1=rfckt.twowire;
tx1.Separation=0.8e-3;
7-345
rfckt.twowire.SigmaCond property
Values Scalar
Description Conductivity, in Siemens per meter (S/m), of the conductor. The default
is Inf.
Examples tx1=rfckt.twowire;
tx1.SigmaCond=5.81e7;
7-346
rfckt.twowire.StubMode property
Description String that specifies what type of stub, if any, to include in the
transmission line model.
7-347
rfckt.twowire.Termination property
Description String that specifies what type of termination to use for 'Shunt'and
'Series' stub modes. Termination is ignored if the line has no stub.
Use 'NotApplicable' when StubMode is 'NotAStub'.
7-348
rfckt.twowire.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-349
rfckt.txline.AnalyzedResult property
Purpose Computed S-parameters, noise figure, OIP3, and group delay values
ekd + e− kd
A=
2
B=
(
Z0 * ekd − e− kd )
2
kd − kd
e −e
C=
2 * Z0
ekd + e− kd
D=
2
7-350
rfckt.txline.AnalyzedResult property
a = − ln (10 / 20 )
The wave number β is related to the specified phase velocity, Vp, by
2 f
= ,
Vp
where f is the frequency range specified in the analyze input
argument freq. The phase velocity Vp is derived from the
rfckt.txline object properties. It is also known as the wave
propagation velocity.
• If you model the transmission line as a shunt or series stub, the
analyze method first calculates the ABCD-parameters at the
specified frequencies. It then uses the abcd2s function to convert the
ABCD-parameters to S-parameters.
When you set the StubMode property to 'Shunt', the 2-port network
consists of a stub transmission line that you can terminate with either
a short circuit or an open circuit as shown in the following figure.
7-351
rfckt.txline.AnalyzedResult property
A =1
B=0
C = 1 / Zin
D =1
When you set the StubMode property to 'Series', the 2-port network
consists of a series transmission line that you can terminate with
either a short circuit or an open circuit as shown in the following
figure.
A =1
B = Zin
C=0
D =1
The analyze method uses the S-parameters to calculate the group delay
values at the frequencies specified in the analyze input argument freq,
as described in the analyze reference page.
ans =
7-352
rfckt.txline.AnalyzedResult property
7-353
rfckt.txline.Freq property
Values Vector
Description M-element vector of frequency values in hertz for the loss and phase
velocity values in the Loss and PV properties. The values must be
positive, and the order of the frequencies must correspond to the order
of the loss and phase velocity values. This property is empty by default.
7-354
rfckt.txline.IntpType property
Description The analyze method is flexible in that it does not require the
frequencies of the specified S-parameters to match the requested
analysis frequencies. If needed, analyze applies the interpolation and
extrapolation method specified in the IntpType property to the specified
data to create a new set of data at the requested analysis frequencies.
The following table lists the available interpolation methods and
describes each one.
Method Description
Linear (default) Linear interpolation
Spline Cubic spline interpolation
Cubic Piecewise cubic Hermite
interpolation
7-355
rfckt.txline.LineLength property
Values Scalar
Description The physical length of the transmission line in meters. The default
is 0.01.
7-356
rfckt.txline.Loss property
Values Vector
Description M-element vector of line loss values, in decibels per meter, that
correspond to the frequencies stored in the Freq property. Line loss is
the reduction in strength of the signal as it travels over the transmission
line, and must be nonnegative. The default is 0.
7-357
rfckt.txline.Name property
ans =
Transmission Line
7-358
rfckt.txline.PV property
Values Vector
Description M-element vector of phase velocity values, in meters per second, that
correspond to the frequencies stored in the Freq property. Propagation
velocity of a uniform plane wave on the transmission line. The default
is 299792458.
7-359
rfckt.txline.StubMode property
Description String that specifies what type of stub, if any, to include in the
transmission line model.
7-360
rfckt.txline.Termination property
Description String that specifies what type of termination to use for 'Shunt'and
'Series' stub modes. Termination is ignored if the line has no stub.
Use 'NotApplicable' when StubMode is 'NotAStub'.
7-361
rfckt.txline.Z0 property
Values Vector
7-362
rfckt.txline.nPort property
Values 2
Description A read-only integer that indicates the object has two ports.
ans =
7-363
rfdata.data.Freq property
Values Vector
7-364
rfdata.data.GroupDelay property
Values Vector
Description M-element vector of group delay values in seconds that the toolbox
calculates at each frequency in the Freq property when you call the
analyze method. This property is empty by default.
7-365
rfdata.data.IntpType property
Description The analyze method is flexible in that it does not require the
frequencies of the specified S-parameters to match the requested
analysis frequencies. If needed, analyze applies the interpolation and
extrapolation method specified in the IntpType property to the specified
data to create a new set of data at the requested analysis frequencies.
The following table lists the available interpolation methods and
describes each one.
Method Description
Linear (default) Linear interpolation
Spline Cubic spline interpolation
Cubic Piecewise cubic Hermite
interpolation
txdata =
7-366
rfdata.data.NF property
Values Scalar
txdata =
7-367
rfdata.data.Name property
ans =
Data object
7-368
rfdata.data.OIP3 property
Values Scalar
7-369
rfdata.data.S_Parameters property
Values
7-370
rfdata.data.Z0 property
Values Scalar
7-371
rfdata.data.ZL property
Values Scalar
7-372
rfdata.data.ZS property
Values Scalar
7-373
rfdata.ip3.Data property
Values Vector
7-374
rfdata.ip3.Freq property
Values Vector
Description M-element vector of frequency values in hertz for the IP3 data in
the Data property. The values must be positive, and the order of the
frequencies must correspond to the order of the IP3 values. This
property is empty by default.
7-375
rfdata.ip3.Name property
ans =
7-376
rfdata.ip3.Type property
Description String that indicates whether the specified IP3 data is output or input
IP3.
ans =
OIP3
7-377
rfdata.mixerspur.Data property
Values Matrix
Description Matrix of values, in decibels, by which the mixer spur power is less
than the power at the fundamental output frequency. Values must be
between 0 and 99. This property is empty by default.
ans =
2 5 3
1 0 99
10 99 99
7-378
rfdata.mixerspur.Name property
ans =
Intermodulation table
7-379
rfdata.mixerspur.PLORef property
Values Scalar
ans =
7-380
rfdata.mixerspur.PinRef property
Values Scalar
Description Scalar input power reference, in decibels relative to one milliwatt. The
default is 0.
ans =
7-381
rfdata.network.Data property
Values Array
netdata = rfdata.network;
netdata.Data=y;
7-382
rfdata.network.Freq property
Values Vector
7-383
rfdata.network.Name property
Examples netdata=rfdata.network;
netdata.Name
ans =
Network parameters
7-384
rfdata.network.Type property
Examples netdata=rfdata.network;
netdata.Type='Y';
7-385
rfdata.network.Z0 property
Values Scalar
Examples netdata=rfdata.network;
netdata.z0=75;
7-386
rfdata.nf.Data property
Values Vector
Description M-element vector of noise figure data, in dB, that corresponds to the
frequencies stored in the Freq property. The default is 0.
7-387
rfdata.nf.Freq property
Values Vector
Description M-element vector of frequency values in hertz for the noise figure data
in the Data property. The values must be positive, and the order of the
frequencies must correspond to the order of the noise figure values.
This property is empty by default.
7-388
rfdata.nf.Name property
ans =
Noise figure
7-389
rfdata.noise.FMIN property
Values Vector
7-390
rfdata.noise.Freq property
Values Vector
Description M-element vector of frequency values in hertz for the spot noise data
in the FMIN, GAMMAOPT, and RN properties. The values must be positive,
and the order of the frequencies must correspond to the order of the spot
noise values. This property is empty by default.
7-391
rfdata.noise.GAMMAOPT property
Values Vector
7-392
rfdata.noise.Name property
ans =
7-393
rfdata.noise.RN property
Values Vector
7-394
rfdata.power.Freq property
Values Vector
Description M-element vector of frequency values in hertz for the power data in the
Phase, Pin, and Pout properties. The values must be positive, and the
order of the frequencies must correspond to the order of the phase and
power values. This property is empty by default.
7-395
rfdata.power.Name property
ans =
Power data
7-396
rfdata.power.Phase property
Values Cell
Description M-element cell of phase shift values, in degrees, where each element
corresponds to a frequency stored in the Freq property. The values
within each element correspond to the input power values stored in
the Pin property. The default is 1.
7-397
rfdata.power.Pin property
Values Cell
Description M-element cell of input power values, in watts, where each element
corresponds to a frequency stored in the Freq property. For example,
where A, B, and C are column vectors that contain the Pin values at the
first three frequencies stored in the Freq property. The default is 1.
7-398
rfdata.power.Pout property
Values Cell
Description M-element cell of output power values, in watts, where each element
corresponds to a frequency stored in the Freq property. The values
within each element correspond to the input power values stored in
the Pin property. The default is 1.
7-399
rfmodel.rational.A property
Values Vector
Description Complex vector containing poles of the rational function in radians per
second. Its length, shown in Equation 7-1 as n, must be equal to the
length of the vector you provide for 'C'. n is the number of poles in the
rational function model. This property is empty by default.
7-400
rfmodel.rational.C property
Values Vector
7-401
rfmodel.rational.D property
Values Scalar
Description Scalar value specifying the constant offset in the frequency response of
the rational function. The default is 0.
7-402
rfmodel.rational.Delay property
Values Scalar
Description Scalar value specifying the time delay, in seconds, in the frequency
response of the rational function. The default is 0.
7-403
rfmodel.rational.Name property
ans =
Rational Function
7-404
8
Method Reference
Analysis
analyze Analyze circuit object in frequency
domain
freqresp Calculate frequency response of
model object
ispassive Check passivity of model object
stepresp Calculate response of model object
to step signal
timeresp Calculate time response for model
object
8-2
Parameters and Formats
Operating Conditions
getop Display operating conditions
setop Set operating conditions
Data I/O
read Read RF data from file to new or
existing circuit or data object
write Write RF data from circuit or data
object to file
writeva Write Verilog-A description of RF
model object
8-3
8 Method Reference
8-4
9
Methods — Alphabetical
List
analyze
Syntax analyze(h,freq)
analyze(h,freq,zl,zs,zo,aperture)
analyze(h,freq,'condition1',value1,...,'conditionm',valuem)
9-2
analyze
The aperture argument determines the two frequency points that the
analyze method uses to compute the group delay for each frequency in
freq. aperture can be a positive scalar or a vector of the same length
of as freq.
• f+ is:
- f(1 + aperture/2) for aperture < 1.
- f + aperture/2 for aperture ≥ 1.
If f is the maximum value of freq, then f+ = f.
• f– is:
- f (1 – aperture/2) for aperture < 1.
- f – aperture/2 for aperture ≥ 1.
If f is the minimum value of freq, then f– = f.
9-3
analyze
9-4
analyze
• rfckt.datafile
• rfckt.passive
• rfckt.amplifier
• rfckt.mixer
9-5
analyze
References http://www.microwaves101.com/encyclopedia/groupdelaymeasurements.cfm
9-6
calculate
Use the listformat method to get a list of the valid formats for a
particular parameter.
The output params is an n-element cell array containing the names, as
strings, of the parameters in data. freq is a vector of frequencies at
which the parameters are known.
Note Before calling calculate, you must use the analyze method to
perform a frequency domain analysis for the circuit object.
9-7
calculate
[ydata,params,xdata] = calculate(h,'parameter1',...,'parametern',
'format',xparameter,xformat,
'condition1',value1,...,'conditionm',valuem,
'freq',freq,'pin',pin) calculates the specified parameters at the
specified operating conditions for the object h.
xparameter is the independent parameter for which to calculate
the specified parameters. Several xparameter values are available
for all objects. When you import rfckt.amplifier, rfckt.mixer, or
rfdata.data object specifications from a .p2d or .s2d file, you can
also specify any operating conditions from the file that have numeric
values, such as bias.
The following table shows the most commonly available parameters and
the corresponding xparameter values. The default settings listed in the
table are used if xparameter is not specified.
9-8
calculate
9-9
calculate
Examples Analyze a general transmission line, trl, with the default characteristic
impedance of 50 ohms, phase velocity of 299792458 meters per second,
and line length of 0.01 meters for frequencies of 1.0 GHz to 3.0 GHz.
Then, calculate the S11 and S22 parameters in decibels.
trl = rfckt.txline;
f = [1e9:1.0e7:3e9];
analyze(trl,f);
9-10
calculate
[data,params,freq] = calculate(trl,'S11','S22','dB')
data =
[201x1 double] [201x1 double]
params =
'S_{11}' 'S_{22}'
freq = 1.0e+009 *
1.0000
1.0100
1.0200
...
The params output is formatted so you can use it as a plot legend. The
first few elements of data{1} look like
ans =
1.0e+003 *
-6.4661
-0.3372
-0.3432
-0.3432
-0.3432
...
9-11
calculate
plot
plotyy
polar
semilogx
semilogy
smith
read
restore
write
9-12
circle
The following table lists the supported circle type options and the
definition of each option.
type Definition
'Ga' Constant available power gain circle
'Gp' Constant operating power gain circle
'Gt' Constant transducer power gain circle
'Stab' Stability circle
'NF' Constant noise figure circle
'R' Constant resistance circle
'X' Constant reactance circle
9-13
circle
type Definition
'G' Constant conductance circle
'B' Constant susceptance circle
'Gamma' Constant reflection magnitude circle
The following table lists the available value options for the above types
of circles and the definition of each value.
value Definition
'Ga' Scalar or vector of gains in dB
'Gp' Scalar or vector of gains in dB
'Gt' Scalar or vector of gains in dB
'Stab' String 'in' or 'source' for input/source
stability circle; string 'out' or 'load' for
output/load stability circle
'NF' Scalar or vector of noise figures in dB
'R' Scalar or vector of normalized resistance
'X' Scalar or vector of normalized reactance
'G' Scalar or vector of normalized conductance
'B' Scalar or vector of normalized susceptance
'Gamma' Scalar or vector of non-negative reflection
magnitude
hsm is an optional input argument that you can use to place circles on
an existing Smith chart.
Examples For an example of how to use the circle method, see the RF Toolbox
demo Designing Matching Networks (Part 1: Networks with an LNA
and Lumped Elements).
9-14
circle
9-15
extract
semilogy
smith
read
9-16
extract
restore
write
9-17
freqresp
⎛ n Ck ⎞
resp = ⎜ ∑ + D ⎟ e− s* Delay , s = j 2π * freq
⎜ ⎟
⎝ k=1 s − Ak ⎠
Examples The following example shows you how to compute the frequency
response of the data stored in the file default.s2p by reading it into an
rfdata object, fitting a rational function model to the data, and using
the freqresp method to compute the frequency response of the model.
orig_data=read(rfdata.data,'default.s2p')
freq=orig_data.Freq;
data=orig_data.S_Parameters(2,1,:);
fit_data=rationalfit(freq,data)
[resp,freq]=freqresp(fit_data,freq);
plot(freq/1e9,db(resp));
figure
9-18
freqresp
plot(freq/1e9,unwrap(angle(resp)));
9-19
getop
Syntax getop(h)
Description getop(h) displays the selected operating conditions for the circuit or
data object, h.
Information about operating conditions is available only when you
import the object specifications from a .p2d or .s2d file.
9-20
getz0
Syntax z0 = getz0(h)
semilogy
smith
read
restore
write
9-21
impulse
Note While you can compute the output response for a rational
function model object by computing the impulse response of the object
and then convolving that response with the input signal, this approach
is not recommended. Instead, you should use the timeresp method to
perform this computation because it generally gives a more accurate
output signal for a given input signal.
M
resp = ∑ Ck e A (t− Delay)u(t − Delay) + Dδ(t − Delay)
k
k=1
where
9-22
impulse
Examples The following example shows you how to compute the impulse response
of the data stored in the file default.s2p by fitting a rational function
model to the data and using the impulse method to compute the
impulse response of the model.
orig_data=read(rfdata.data,'default.s2p')
freq=orig_data.Freq;
data=orig_data.S_Parameters(2,1,:);
fit_data=rationalfit(freq,data)
[resp,t]=impulse(fit_data,1e-12,1e4);
plot(t,resp);
9-23
ispassive
Examples Create a rational function object and check the passivity of the object:
9-24
listformat
Note Before calling listformat, you must use the analyze method to
perform a frequency domain analysis for the circuit object.
list =
'dB'
'Magnitude (decibels)'
'Abs'
'Mag'
'Magnitude (linear)'
'Angle'
9-25
listformat
'Angle (degrees)'
'Angle (radians)'
'Real'
'Imag'
'Imaginary'
semilogy
smith
read
restore
write
9-26
listparam
Description list = listparam(h) lists the valid parameters for the specified
circuit object h.
Note Before calling listparam, you must use the analyze method to
perform a frequency domain analysis for the circuit object.
Several parameters are available for all objects. When you import
rfckt.amplifier, rfckt.mixer, or rfdata.data object specifications
from a .p2d or .s2d file, the list of valid parameters also includes any
operating conditions from the file that have numeric values, such as
bias.
The following table describes the most commonly available parameters.
Parameter Description
S11, S12, S21, S22 S-parameters
LS11, LS12, LS21, LS22 (Amplifier
and mixer objects with multiple
operating conditions only)
GroupDelay Group delay
GammaIn, GammaOut Input and output reflection
coefficients
VSWRIn, VSWROut Input and output voltage
standing-wave ratio
IIP3, OIP3 (Amplifier and mixer Third-order intercept point
objects only)
NF Noise figure
9-27
listparam
Parameter Description
TF1 Ratio of the load voltage to the
output voltage of the source
when the input port is conjugate
matched
TF2 Ratio of load voltage to the source
voltage
• Gt • Transducer power gain
• Ga • Available power gain
• Gp • Operating power gain
• Gmag • Maximum available power
gain
• Gmsg
• Maximum stable gain
GammaMS, GammaML Source and load reflection
coefficients for simultaneous
conjugate match
K, Mu, MuPrime Stability factor
Delta Stability condition
Examples The following examples show you how to list the parameters for a
transmission line object.
trl = rfckt.txline;
f = [1e9:1.0e7:3e9];
analyze(trl,f);
list = listparam(trl)
9-28
listparam
extract
getz0
listformat
loglog
plot
plotyy
polar
semilogx
semilogy
smith
read
restore
write
9-29
loglog
Note For all circuit objects except those that contain data from a data
file, you must perform a frequency domain analysis with the analyze
method before calling loglog.
9-30
loglog
MATLAB functions such as figure, axes, and text also list available
properties and provide links to more complete property descriptions.
Note Use the MATLAB loglog function to create a log-log scale plot of
parameters that are specified as vector data and are not part of a circuit
(rfckt) object or data (rfdata) object.
lineseries = loglog(h,'parameter1',...,'parametern',
format,xparameter,xformat,'condition1',value1,...,
'conditionm',valuem,'freq',freq,'pin',pin) plots the specified
parameters at the specified operating conditions for the object h.
xparameter is the independent variable to use in plotting the specified
parameters. Several xparameter values are available for all objects.
When you import rfckt.amplifier, rfckt.mixer, or rfdata.data
object specifications from a .p2d or .s2d file, you can also specify any
operating conditions from the file that have numeric values, such as
bias.
The following table shows the most commonly available parameters and
the corresponding xparameter values. The default settings listed in the
table are used if xparameter is not specified.
9-31
loglog
9-32
loglog
9-33
loglog
smith
write
9-34
plot
• Specify format as Real to plot the real part of the selected parameter.
• Specify format as 'none' to plot the parameter values unchanged.
Use the listformat method to get a list of the valid formats for a
particular parameter.
9-35
plot
lineseries = plot(h,'parameter1',...,'parametern',
format,xparameter,xformat, 'condition1',value1,...,
'conditionm',valuem,'freq',freq,'pin',pin) plots the specified
parameters at the specified operating conditions for the object h.
xparameter is the independent variable to use in plotting the specified
parameters. Several xparameter values are available for all objects.
When you import rfckt.amplifier, rfckt.mixer, or rfdata.data
object specifications from a .p2d or .s2d file, you can also specify any
operating conditions from the file that have numeric values, such as
bias.
The following table shows the most commonly available parameters and
the corresponding xparameter values. The default settings listed in the
table are used if xparameter is not specified.
9-36
plot
9-37
plot
Parameter Format
S11, S12, S21, S22 Magnitude (decibels)
Magnitude (linear)
Angle (degrees)
Real
Imaginary
OIP3 dBm
dBW
W
mW
NF Magnitude (decibels)
Magnitude (linear)
9-38
plot
creates a budget plot of the spur power for h. Use 0 to plot the power at
the input of h.
pin is the optional scalar input power value, in dBm, at which to plot
the spur power. The default is 0 dBm. When you create a spur plot for
an object, the previous input power value is used for subsequent plots
until you specify a different value.
fin is the optional scalar input frequency value, in hertz, at which to
plot the spur power. If h is an rfckt.mixer object, the default value of
fin is the input frequency at which the magnitude of the S21 parameter
of the mixer, in decibels, is highest. If h is an rfckt.cascde object, the
default value of fin is the input frequency at which the magnitude of
the S21 parameter of the first mixer in the cascade is highest. When you
create a spur plot for an object, the previous input frequency value is
used for subsequent plots until you specify a different value.
For more information on plotting mixer spur power, see the Visualizing
Mixer Spurs demo.
Note For all circuit objects except those that contain data from a data
file, you must perform a frequency domain analysis with the analyze
method before calling plot.
9-39
plot
9-40
plotyy
Purpose Plot specified object parameters with y-axes on both left and right sides
• See “Determining Formats” on page 9-45 for a table that shows the
predefined primary and secondary formats for the parameters for all
circuit and data objects.
• Type listparam(h) to get a list of valid parameters for a circuit
object, h. Type listformat(h,parameter) to see the legitimate
formats for a specified parameter. The first listed format is the
default for the specified parameter.
The plotyy method returns the handles to the two axes created in ax
and the handles to two lineseries objects in hlines1 and hlines2.
9-41
plotyy
Note For all circuit objects except those that contain data from a data
file, you must perform a frequency domain analysis with the analyze
method before calling plotyy.
[ax,hlines1,hlines2] = plotyy(h,parameter1,...,parametern)
plots the parameters parameter1,..., parametern. plotyy determines
the formats for the left and right y-axes based on the predefined primary
and secondary formats for the specified parameters, as described in
“Determining Formats” on page 9-45.
[ax,hlines1,hlines2] = plotyy(h,parameter,format1,format2)
plots the specified parameter using format1 for the left y-axis and
format2 for the right y-axis.
[ax,hlines1,hlines2] = plotyy(h, parameter1,
..., parametern, format1, format2) plots the
parametersparameter1,..., parametern on an X-Y plane
using format1 for the left y-axis and format2 for the right y-axis.
[ax,hlines1,hlines2] =
plotyy(h,parameter1_1,...,parameter1_n1,
9-42
plotyy
[ax,hlines1,hlines2] = plotyy(h,parameter1_1,...,parameter1_n1,
format1,parameter2_1,...,parameter2_n2,format2,xparameter,
xformat,'condition1',value1,...,'conditionm',valuem,
'freq',freq,'pin',pin) plots the specified parameters at the
specified operating conditions for the object h.
xparameter is the independent variable to use in plotting the specified
parameters. Several xparameter values are available for all objects.
When you import rfckt.amplifier, rfckt.mixer, or rfdata.data
object specifications from a .p2d or .s2d file, you can also specify any
operating conditions from the file that have numeric values, such as
bias.
The following table shows the most commonly available parameters and
the corresponding xparameter values. The default settings listed in the
table are used if xparameter is not specified.
9-43
plotyy
9-44
plotyy
Determining When you call plotyy without specifying the plot formats for the left
Formats and right y-axes, plotyy determines the formats from the predefined
primary and secondary formats for the one or more specified parameters.
This section contains the following topics:
9-45
plotyy
9-46
plotyy
• The predefined primary format is the format for the left y-axis.
• The predefined secondary format is the format for the right y-axis.
9-47
plotyy
4 If the preceding steps fail to produce a plot, try to find one format
from the predefined primary formats. If a primary format is valid for
all parameters, use this format to create the plot with the MATLAB
plot function.
The following example shows how plotyy applies this criteria to create
plots.
Example — Determining Formats for Multiple Parameters
At the MATLAB prompt:
amp = rfckt.amplifier;
2 Type this command to plot the S11 and S21 parameters of amp on
two y-axes:
9-48
plotyy
The primary and secondary formats for both S11 and S21 are
Magnitude (decibels) and Angle (Degrees), respectively, so
plotyy uses this primary-secondary format pair to create the plot.
3 Type this command to plot the S11 and NF parameters of amp on two
y-axes:
9-49
plotyy
4 Type this command to plot the NF, S21 and GroupDelay parameters
of amp on two y-axes:
9-50
plotyy
9-51
plotyy
6 Type this command to plot the NTemp, S21 and NFactor parameters
of amp on two y-axes:
9-52
plotyy
9-53
polar
Note For all circuit objects except those that contain data from a data
file, you must use the analyze method to perform a frequency domain
analysis before calling polar.
Note Use the MATLAB polar function to plot parameters that are not
part of a circuit (rfckt) object, but are specified as vector data.
lineseries = polar(h,'parameter1',...,'parametern',
xparameter,xformat,'condition1',value1,...,
'conditionm',valuem, 'freq',freq,'pin',pin) plots the
specified parameters at the specified operating conditions for the object
h.
9-54
polar
9-55
polar
9-56
polar
9-57
read
Purpose Read RF data from file to new or existing circuit or data object
Syntax h = read(h)
h = read(h,filename)
h = read(rfckt.datafile,filename)
h = read(rfckt.passive,filename)
h = read(rfckt.amplifier,filename)
h = read(rfckt.mixer,filename)
h = read(rfdata.data,filename)
Description h = read(h) prompts you to select a file and then reads the data from
that file into the circuit or data object, h. You can read data from an
.snp, .ynp, .znp, .hnp, .gnp, or .amp file, where n is the number of
ports. If h is an rfckt.amplifier, rfckt.mixer, or rfdata.data object,
you can also read data from .p2d and .s2d files.
For more information on reading data from a file, see “Importing
Property Values from Data Files” on page 3-8. For a demonstration
of how to use RF Toolbox software to read data from a .s2d file, see
Visualizing Mixer Spurs. For information about the .amp format, see
Appendix A, “AMP File Format”.
h = read(h,filename) updates h with data from the specified file.
In this syntax, h can be a circuit or data object. filename is a string,
representing the filename of a .snp, .ynp, .znp, .hnp, .gnp, or .amp
file. If h is an rfckt.amplifier, rfckt.mixer, or rfdata.data object,
filename can also represent a .p2d or .s2d file. For all files, the
filename must include the file extension.
h = read(rfckt.datafile,filename) creates an rfckt.datafile
object h, reads the RF data from the specified file, and stores it in h.
h = read(rfckt.passive,filename) creates an rfckt.passive object
h, reads the RF data from the specified file, and stores it in h.
h = read(rfckt.amplifier,filename) creates an rfckt.amplifier
object h, reads the RF data from the specified file, and stores it in h.
h = read(rfckt.mixer,filename) creates an rfckt.mixer object h,
reads the RF data from the specified file, and stores it in h.
9-58
read
Examples The following example shows you how to import data from the file
default.amp into an rfckt.amplifier object.
ckt_obj=read(rfckt.amplifier, 'default.amp');
9-59
restore
Syntax h = restore(h)
9-60
semilogx
Purpose Plot specified circuit object parameters using log scale for x-axis
Note For all circuit objects except those that contain data from a data
file, you must perform a frequency domain analysis with the analyze
method before calling semilogx.
9-61
semilogx
MATLAB functions such as figure, axes, and text also list available
properties and provide links to more complete property descriptions.
lineseries = semilogx(h,'parameter1',...,'parametern',
format,xparameter,xformat,'condition1',value1,...,
'conditionm',valuem, 'freq',freq,'pin',pin) plots the specified
parameters at the specified operating conditions for the object h.
xparameter is the independent variable to use in plotting the specified
parameters. Several xparameter values are available for all objects.
When you import rfckt.amplifier, rfckt.mixer, or rfdata.data
object specifications from a .p2d or .s2d file, you can also specify any
operating conditions from the file that have numeric values, such as
bias.
The following table shows the most commonly available parameters and
the corresponding xparameter values. The default settings listed in the
table are used if xparameter is not specified.
9-62
semilogx
9-63
semilogx
9-64
semilogx
smith
write
9-65
semilogy
Purpose Plot specified circuit object parameters using log scale for x-axis
Note For all circuit objects except those that contain data from a data
file, you must perform a frequency domain analysis with the analyze
method before calling semilogy.
9-66
semilogy
MATLAB functions such as figure, axes, and text also list available
properties and provide links to more complete property descriptions.
lineseries = semilogy(h,'parameter1',...,'parametern',
format,xparameter,xformat,'condition1',value1,...,
'conditionm',valuem, 'freq',freq,'pin',pin) plots the specified
parameters at the specified operating conditions for the object h.
xparameter is the independent variable to use in plotting the specified
parameters. Several xparameter values are available for all objects.
When you import rfckt.amplifier, rfckt.mixer, or rfdata.data
object specifications from a .p2d or .s2d file, you can also specify any
operating conditions from the file that have numeric values, such as
bias.
The following table shows the most commonly available parameters and
the corresponding xparameter values. The default settings listed in the
table are used if xparameter is not specified.
9-67
semilogy
9-68
semilogy
9-69
semilogy
smith
write
9-70
setop
Syntax setop(h)
setop(h,'Condition1')
setop(h,'Condition1',value1,'Condition2',value2,...)
Description setop(h) lists the available values for all operating conditions of the
object h. Operating conditions only apply to objects you import from a
.p2d or .s2d file. To import these types of data into an object, use the
read method. Operating conditions are not listed with other properties
of an object.
setop(h,'Condition1') lists the available values for the specified
operating condition 'Condition1'.
setop(h,'Condition1',value1,'Condition2',value2,...) changes
the operating conditions of the circuit or data object, h, to those specified
by the condition/value pairs. Conditions you do not specify retain
their original values. The method ignores any conditions that are not
applicable to the specified object. Ignoring these conditions lets you
apply the same set of operating conditions to an entire network where
different conditions exist for different components.
When you set the operating conditions for a network that contains
several objects, the software does not issue an error or warning if
the specified conditions cannot be applied to all objects. For some
networks, this lack of error or warning lets you call the setop method
once to apply the same set of operating conditions to any objects where
operating conditions are applicable. However, you may want to specify
a network that contains one or more of the following:
9-71
setop
9-72
smith
• 'z' (default)
• 'y'
• 'zy'
Note For all circuit objects except those that contain data from a data
file, you must use the analyze method to perform a frequency domain
analysis before calling smith.
[lineseries,hsm] = smith(h,'parameter1',...,'parametern',
type,xparameter,xformat,'condition1',value1,...,
'conditionm',valuem, 'freq',freq,'pin',pin) plots the specified
parameters at the specified operating conditions for the object h.
xparameter is the independent variable to use in plotting the
specified parameters. Several xparameter values are available for all
objects. When you import 2-port rfckt.amplifier, rfckt.mixer, or
rfdata.data object specifications from a .p2d or .s2d file, you can
also specify any operating conditions from the file that have numeric
values, such as bias.
9-73
smith
The following table shows the most commonly available parameters and
the corresponding xparameter values. The default settings listed in the
table are used if xparameter is not specified.
9-74
smith
9-75
smith
Properties smith creates the plot using the default property values of a Smith
chart. Use set(hsm,'PropertyName1',PropertyValue1,...) to
change the property values of the chart. Use get(hsm) to get the
property values.
This table lists all properties you can specify for a Smith chart object
along with units, valid values, and a descriptions of their use.
9-76
smith
9-77
smith
specified in Row 1
ends.
9-78
stepresp
The output yout is the response of the step signal at time tout.
9-79
stepresp
9-80
table
9-81
table
9-82
timeresp
where
X (n + 1) = F * X (n) + G * U (n)
X (1) = 0
F = exp( A * ts)
G = ( F − 1). / A
and A, C, D, and Delay are properties of the rfmodel.rational object, h.
Examples The following example shows you how to compute the time response of
the data stored in the file default.s2p by fitting a rational function
model to the data and using the timeresp method to compute the time
response of the model.
9-83
timeresp
InputSignal = InputSignal(:);
9-84
write
Description status =
write(data,filename,dataformat,funit,printformat,freqformat)
writes information from data to the specified file. data is a circuit
object or rfdata.data object that contains sufficient information to
write the specified file. filename is a string representing the filename
of a .snp, .ynp, .znp, .hnp, or .amp file, where n is the number of ports.
The default filename extension is .snp. See Appendix A, “AMP File
Format” for information about the .amp format. write returns True if
the operation is successful and returns False otherwise.
dataformat specifies the format of the data to be written. It must be
one of the case-insensitive strings in the following table.
Format Description
'DB' Data is given in (dB-magnitude, angle) pairs with
angle in degrees.
'MA' Data is given in (magnitude, angle) pairs with angle
in degrees.
'RI' Data is given in (real, imaginary) pairs (default).
9-85
write
Note The method only writes property values from data that the
specified output file supports. For example, Touchstone files, which
have the .snp, .ynp, .znp, or .hnp extension, do not support noise
figure or output third-order intercept point. Consequently, the write
method does not write these property values to these such files.
Examples The following example shows you how to analyze the data stored in the
file default.s2p for a different set of frequency values, and use the
write method to store the results in a file called test.s2p.
orig_data=read(rfdata.data,'default.s2p')
freq=[1:.1:2]*1e9;
analyze(orig_data,freq);
write(orig_data,'test.s2p');
9-86
write
plot
plotyy
polar
semilogx
semilogy
smith
read
restore
9-87
writeva
9-88
writeva
9-89
writeva
9-90
10
Function Reference
Calculations
cascadesparams Cascade S-parameters to form
cascaded network
deembedsparams De-embed 2-port S-parameters
gamma2z Convert reflection coefficient to
impedance
gammain Calculate input reflection coefficient
of 2-port network
gammaml Calculate load reflection coefficient
of 2-port network for simultaneous
conjugate match
gammams Calculate source reflection coefficient
of 2-port network required for
simultaneous conjugate match
ispassive Check passivity of N-port
S-parameters
makepassive Enforce passivity of S-parameters
powergain Calculate power gain of 2-port
network
rationalfit Fit rational function to broadband
data
s2tf Convert S-parameters of 2-port
network to voltage or power-wave
transfer function
stabilityk Calculate stability factor K of 2-port
network
stabilitymu Calculate stability factor μ of 2-port
network
vswr Calculate VSWR at given reflection
coefficient Γ
z2gamma Convert impedance to reflection
coefficient
10-2
Data Visualization
Data Visualization
smithchart Plot complex vector on Smith chart
Utilities
copy Copy circuit or data object
getdata Data object containing analyzed
result of specified circuit object
10-3
10 Function Reference
10-4
GUI
GUI
rftool Open RF Analysis Tool (RF Tool)
10-5
10 Function Reference
10-6
11
Functions — Alphabetical
List
abcd2h
11-2
abcd2s
11-3
abcd2y
11-4
abcd2z
11-5
cascadesparams
Description s_params =
cascadesparams(s1_params,s2_params,...,sn_params) cascades the
scattering parameters of the N input networks described by the
S-parameters s1_params through sn_params. The function stores the
S-parameters of the cascade in s_params. Each of the input networks
must be a 2N-port network described by a 2N-by-2N-by-M array of
S-parameters. All networks must have the same reference impedance.
cascadesparams assumes that you are using the port ordering given in
the following illustration.
1 N+1
N 2N
11-6
cascadesparams
11-7
cascadesparams
2
1 1 1 2 3
sparams_3p 3 sparams_2p
sparams_cascaded_3p
11-8
cascadesparams
sparams_2p = ckt2.AnalyzedResult.S_Parameters;
%Reorder the second and third ports of the 3-port network
sparams_3p_2 = snp2smp(sparams_3p, 50, [1 3 2])
%Cascade the two sets by connecting one port between them
Nconn = 1
sparams_cascaded_3p_2 = cascadesparams(sparams_3p_2,...
sparams_2p, Nconn)
11-9
cascadesparams
2
1 1 1 2 1 sparams_2p_2 2 3
sparams_3p 3 sparams_2p_1
sparams_cascaded_3p
11-10
cascadesparams
[1 3 2])
%Cascade sparams_3p and sparams_2p_2
%by connecting one port between them
sparams_cascaded_3p_4 = cascadesparams(...
sparams_cascaded_3p_3, ...
sparams_2p_2, ...
Nconn)
2 2 2
2
1 1 1 1 3 3 1 sparams_2p_2 2 3
sparams_3p 3 1 sparams_2p_1 2
sparams_cascaded_3p
sparams_cascaded_3p_3
sparams_cascaded_3p_4
11-11
copy
Syntax h2 = copy(h)
11-12
deembedsparams
11-13
g2h
11-14
gamma2z
Syntax z = gamma2z(gamma)
z = gamma2z(gamma,z0)
⎛1+ Γ ⎞
Z = Z0 * ⎜ ⎟
⎝1− Γ ⎠
z0 = 50;
gamma = 1/3;
z = gamma2z(gamma,z0)
11-15
gammain
( S12 S21 )Γ L
Γin = S11 +
1 − S22 Γ L
where
Zl − Z0
ΓL =
Zl + Z0
11-16
gammaml
B2 ± B22 − 4 C22
Γ ML =
2C2
where
B2 = 1 − S112 + S222 − Δ 2
*
C2 = S22 − Δ ⋅ S11
Δ = S11 S22 − S12 S21
Examples Calculate the load reflection coefficient using network data from a file:
11-17
gammams
B1 ± B12 − 4 C12
Γ MS =
2C1
where
B1 = 1 + S112 − S222 − Δ 2
*
C1 = S11 − Δ ⋅ S22
Δ = S11 S22 − S12 S21
Examples Calculate the source reflection coefficient using network data from a file:
11-18
gammaout
S12 S21Γ S
Γ out = S22 +
1 − S11Γ S
where
Zs − Z0
ΓS =
Zs + Z0
Examples Calculate the output reflection coefficient using network data from a
file:
11-19
getdata
Syntax hd = getdata(h)
11-20
h2abcd
11-21
h2g
11-22
h2s
11-23
h2y
See Also abcd2z | h2abcd | h2s | h2y | h2y | s2z | y2z | z2h
11-24
h2z
11-25
ispassive
11-26
makepassive
S(− j ) = S* ( j )
S( j ) 2
≤1
Input sparams
Arguments sparams can represent either an active network or a passive
network. To check if sparams is passive, use the ispassive
function.
Output sparams_passive
Arguments The makepassive function uses a purely mathematical
method to calculate sparams_passive. As a result, the array
sparams_passive does not represent the same network as
sparams. sparams and sparams_passive do not represent the
same network unless sparams and sparams_passive are equal.
The more closely sparams represents a passive network, the
better the approximation sparams_passive is to that network.
Therefore, makepassive generates the most realistic results when
sparams is active only due to small numerical errors.
11-27
makepassive
sparams = ckt.NetworkData.Data;
Is_Passive = ispassive(sparams)
sparams_new = makepassive(sparams);
Is_Passive = ispassive(sparams_new)
ckt.NetworkData.Data = sparams_new;
11-28
powergain
11-29
powergain
s11 = 0.61*exp(j*165/180*pi);
s21 = 3.72*exp(j*59/180*pi);
s12 = 0.05*exp(j*42/180*pi);
s22 = 0.45*exp(j*(-48/180)*pi);
sparam = [s11 s12; s21 s22];
z0 = 50;
zs = 10 + j*20;
zl = 30 - j*40;
%Calculate the transducer power gain of the network
Gt = powergain(sparam, z0, zs, zl, 'Gt')
%Calculate the available power gain of the network
Ga = powergain(sparam, z0, zs, 'Ga')
%Calculate the operating power gain of the network
Gp = powergain(sparam, z0, zl, 'Gp')
%Calculate the maximum available power gain of the network
Gmag = powergain(sparam, 'Gmag')
%Calculate the maximum stable power gain of the network
Gmsg = powergain(sparam, 'Gmsg')
11-30
rationalfit
Syntax h = rationalfit(freq,data)
h = rationalfit(freq,data,arguments)
n
C
F (s) = ∑ s − kA , s = j 2 f
k=1 k
⎛ n Ck ⎞
F (s) = ⎜ ∑ + D ⎟ e− sτ , s = j 2πf
⎜ ⎟
⎝ k=1 s − Ak ⎠
to the data using optional arguments tol, weight, delayfactor,
tendstozero, npoles, iterationlimit, and showbar, which control
the data fitting.
To see how well the model fits the original data, use the freqresp
function to compute the frequency response of the model. Then, plot
the original data and the frequency response of the rational function
model. For more information, see the freqresp reference page or the
examples in the next section.
Input freq
Arguments freq is a vector of frequencies over which the function fits a
rational model.
data
data is a vector of passive S-parameter data values.
tol
11-31
rationalfit
n
∑ F0 { fk } − F (s)
2
k=1
ε≥
n
∑ F0 { fk }
2
k=1
where
Default: -10
weight
weight is a vector that specifies the weighting of the fit at each
frequency. You can increase the weight at a particular frequency
to improve the model fitting at that frequency. The length of
weight must be equal to the length of freq. The weight vector is
empty, by default.
Default: []
delayfactor
delayfactor is a scaling factor between 0 and 1 that controls the
amount of delay to fit the data. The Delay parameter, τ, of the
11-32
rationalfit
Default: 0
tendstozero
tendstozero is a logical value that determines the behavior of the
rational function as the frequency approaches infinity. When this
argument is true, the resulting rational function variable D is
zero. A value of 0 indicates that D is nonzero. A rational function
that tends to zero is appropriate for almost every set of data.
However, if rationalfit has trouble fitting the data to a rational
function, try changing the value of tendstozero.
Default: true
npoles
npoles is an even integer or a two-element vector [M,N] of even
integers.
11-33
rationalfit
Default: [0,min(256,length(freq)/4)]
iterationlimit
Control the number of iterations that rationalfit performs
for each value of npoles by specifying an integer value for
iterationlimit.
Default: 12
showbar
Set this parameter to true to show the graphical wait bar while
rationalfit computes a rational function fit. Set this parameter
to false to hide the wait bar.
Default: false
Examples Fit a rational function model to passive data, plot, and compare results:
orig_data = read(rfdata.data,'passive.s2p')
freq = orig_data.Freq;
data = orig_data.S_Parameters(1,1,:);
fit_data = rationalfit(freq,data)
[resp,freq] = freqresp(fit_data,freq);
plot(orig_data,'S11','dB');
hold on
plot(freq/1e9,db(resp));
figure
plot(orig_data,'S11','Angle (radians)');
hold on
11-34
rationalfit
plot(freq/1e9,unwrap(angle(resp)));
11-35
rftool
Syntax rftool
11-36
rftool
11-37
s2abcd
11-38
s2h
11-39
s2s
See Also abcd2s | h2s | s2abcd | s2h | s2y | s2z | y2s | z2s
11-40
s2scc
Input s_params
Arguments s_params is a complex 4-by-4-by-M array that represents M 4-port
S-parameters.
option
option is an integer equal to 1, 2, or 3. The value of option
determines how the function orders the ports:
11-41
s2scc
Default: 1
11-42
s2scd
Input s_params
Arguments s_params is a complex 4-by-4-by-M array that represents M 4-port
S-parameters.
option
option is an integer equal to 1, 2, or 3. The value of option
determines how the function orders the ports:
11-43
s2scd
Default: 1
11-44
s2sdc
Input s_params
Arguments s_params is a complex 4-by-4-by-M array that represents M 4-port
S-parameters.
option
option is an integer equal to 1, 2, or 3. The value of option
determines how the function orders the ports:
11-45
s2sdc
Default: 1
11-46
s2sdd
Input s_params
Arguments s_params is a complex 4-by-4-by-M array that represents M 4-port
S-parameters.
option
option is an integer equal to 1, 2, or 3. The value of option
determines how the function orders the ports:
11-47
s2sdd
Default: 1
11-48
s2smm
Input s_params
Arguments s_params is a complex 4N-by-4N-by-K array representing K
single-ended, 4N-port S-parameters.
option
option is an integer equal to 1, 2, or 3. The value of option
determines how the function orders the ports:
11-49
s2smm
11-50
s2smm
Default: 1
Output s_cc
Arguments s_cc is a complex 2N-by-2N-by-K array containing K matrices of
common-mode, 2N-port S-parameters (Scc).
s_cd
s_cd is a complex 2N-by-2N-by-K array containing K matrices of
cross-mode, 2N-port S-parameters (Scd).
s_dc
s_dc is a complex 2N-by-2N-by-K array containing K matrices of
cross-mode, 2N-port S-parameters (Sdc).
s_dd
s_dd is a complex 2N-by-2N-by-K array containing K matrices of
differential-mode, 2N-port S-parameters (Sdd).
11-51
s2smm
11-52
s2t
⎡ a1 ⎤ ⎡ T11 T12 ⎤ ⎡ b2 ⎤
⎢ b ⎥ = ⎢T T22 ⎥⎦ ⎢⎣ a2 ⎥⎦
,
⎣ 1 ⎦ ⎣ 21
where:
11-53
s2t
11-54
s2tf
Syntax tf = s2tf(s_params)
tf = s2tf(s_params, z0, zs, zl)
tf = s2tf(s_params, z0, zs, zl, option)
Algorithm The following figure shows the setup for computing the transfer
function, along with the impedences, voltages, and the power waves
used to determine the gain.
The function uses the following voltages and power waves for
calculations:
11-55
s2tf
Vs
• a p1 is the incident power wave, equal to .
2 Re( Zs )
Re( Zl )
• bp2 is the transmitted power wave, equal to Vl .
Zl
Input s_params
Arguments s_params is a complex 2-by-2-by-M array that represents M 2-port
S-parameters.
z0
z0 is the reference impedance, in ohms, of the S-parameters.
Default: 50
zs
zs is the source impedance, in ohms, of the S-parameters.
Default: 50
zl
zl is the load impedance, in ohms, of the S-parameters.
Default: 50
option
The optional option argument is an integer equal to 1, 2, or 3.
The value of option specifies the transfer function type:
11-56
s2tf
Vl
tf =
Va
The following figure shows how to compute Va from the source
voltage Vs:
( Zs + Zs* ) S21 (1 + Γ l ) (1 − Γ s )
tf =
Zs* 2 (1 − S22 Γ l ) (1 − Γin Γ s )
where:
Zl − Zo
Γl =
Zl + Zo
Zs − Zo
Γs =
Zs + Zo
⎛ Γl ⎞
Γin = S11 + ⎜ S12 S21 ⎟
⎜ (1 − S22Γ l ) ⎠⎟
⎝
2
2 Re( Zl ) Zs
GT = tf 2
Zl Re( Zs )
11-57
s2tf
Zs 2
Notice that if Zl and ZS are real, GT = tf .
Zl
• 2 — The transfer function is the gain from the source voltage to
the output voltage for arbitrary source and load impedances:
Vl S21 (1 + Γ l ) (1 − Γ s )
tf = =
Vs 2 (1 − S22 Γ l ) (1 − Γin Γ s )
VL
You can use this option to compute the transfer function V
by setting zs to 0. This setting means that Γs = –1 and Vin =inVs.
• 3 — The transfer function is the power-wave gain from the
incident power wave at the first port to the transmitted power
wave at the second port:
Default: 1
11-58
s2y
11-59
s2z
11-60
smithchart
Output lineseries
Arguments You change the properties of the plotted lines by changing the
lineseries properties.
hsm
hsm = smithchart creates the plot using
default property values of a Smith chart. Use
set(h,'PropertyName1',PropertyValue1,...) to change the
property values. Use get(h) to get the property values.
This table lists all properties you can specify for smithchart
objects along with units, valid values, and descriptions of their
use.
11-61
smithchart
Property
Name Description Units and Values
Color Line color for a Z or Y ColorSpec. Default
Smith chart. For a ZY is [0.4 0.4 0.4]
Smith chart, the Z line (dark gray).
color.
LabelColor Color of the line labels. ColorSpec. Default
is [0 0 0] (black).
LabelSize Size of the line labels. FontSize. Default
is 10. See the
Annotation
Textbox
Properties
reference page for
more information
on specifying font
size.
LabelVisible Visibility of the line 'on' (default) or
labels. 'off'
LineType Line spec for a Z or Y LineSpec. Default
Smith chart. For a ZY is '-' (solid line).
Smith chart, the Z line
spec.
LineWidth Line width for a Z or Y Number of points.
Smith chart. For a ZY Default is 0.5.
Smith chart, the Z line
width.
SubColor The Y line color for a ZY ColorSpec. Default
Smith chart. is [0.8 0.8 0.8]
(medium gray).
SubLineType The Y line spec for a ZY LineSpec. Default
Smith chart. is ':' (dotted line).
11-62
smithchart
Property
Name Description Units and Values
SubLineWidth The Y line width for a Number of points.
ZY Smith chart. Default is 0.5.
Type Type of Smith chart. 'z' (default), 'y',
or 'zy'
Value Two-row matrix. Row 1 2-by-n matrix.
specifies the values of Default is [0.2000
the constant resistance 0.5000 1.0000
and reactance lines 2.0000 5.0000;
in the chart. For the 1.0000 2.0000
constant resistance 5.0000 5.0000
and reactance lines, 30.0000]
each element in Row 2
specifies the value at
which the corresponding
line in Row 1 ends.
[lineseries1,hsm] = smithchart(y)
hold on
lineseries2 = smithchart(z)
11-63
smm2s
Input s_cc
Arguments s_cc is a complex 2N-by-2N-by-K array containing K matrices of
common-mode, 2N-port S-parameters (Scc).
s_cd
s_cd is a complex 2N-by-2N-by-K array containing K matrices of
cross-mode, 2N-port S-parameters (Scd).
s_dc
s_dc is a complex 2N-by-2N-by-K array containing K matrices of
cross-mode, 2N-port S-parameters (Sdc).
s_dd
s_dd is a complex 2N-by-2N-by-K array containing K matrices of
differential-mode, 2N-port S-parameters (Sdd).
option
option is an integer equal to 1, 2, or 3. The value of option
determines how the function orders the ports:
11-64
smm2s
11-65
smm2s
Default: 1
Output s_params
Arguments s_params is a complex 4N-by-4N-by-K array representing K
single-ended, 4N-port S-parameters.
11-66
smm2s
11-67
snp2smp
M-Port
ZT{1} 1 N ZT{N}
N-Port M
ZT{2} 2 N-1 n2m_index(M)=N-1
. .
. .
. .
k ZT{k}
1 2
n2m_index(1)=i i j n2m_index(2)=j
11-68
snp2smp
Input s_params_np
Arguments s_params_np is a complex N-by-N-by-K array representing K
N-port S-parameters.
Z0
Z0 is the reference impedance, in ohms, of s_params_np and
s_params_mp.
Default: 50
n2m_index
n2m_index is a vector of length M specifying how the ports of the
N-port S-parameters map to the ports of the M-port S-parameters.
n2m_index(i) is the index of the port from s_params_np that the
function converts to the ith port of s_params_mp. For example,
the setting [1, 2] means that M is 2, and the first two ports
of the N-port S-parameters become the ports of the M-port
parameters. The function terminates any additional ports with
the impedances specified by ZT.
Default: [1, 2]
ZT
ZT is a scalar, vector, or cell array specifying the termination
impedance of the ports. If M is less than N, snp2smp terminates
the N–M ports not listed in n2m_index using the values in ZT. If
ZT is a scalar, the function terminates all N–M ports not listed in
n2m_index by the same impedance ZT. If ZT is a vector of length
K, ZT[i] is the impedance that terminates all N–M ports of the
ith frequency point not listed in n2m_index. If ZT is a cell array
of length N, ZT{j} is the impedance that terminates the jth port
of the N-port S-parameters. The function ignores impedances
related to the ports listed in n2m_index. Each ZT{j} can be a
scalar or a vector of length K.
11-69
snp2smp
M-Port
ZT{1} 1 N ZT{N}
N-Port M
ZT{2} 2 N-1 n2m_index(M)=N-1
. .
. .
. .
k ZT{k}
1 2
n2m_index(1)=i i j n2m_index(2)=j
Default: Z0
11-70
snp2smp
s3p = ckt.NetworkData.Data;
Z0 = ckt.NetworkData.Z0;
s2p = snp2smp(s3p, Z0);
11-71
stabilityk
2
2 2 Δ
K = 1 − S11 − S22 +
2 S12 S21
2 2 2
B1 = 1 + S11 − S22 −Δ
2 2 2
B2 = 1 − S11 + S22 −Δ
where:
• S11, S12, S21, and S22 are S-parameters from the input argument
s_params.
• Δ is a vector whose members are the determinants of the M 2-port
S-parameter matrices:
11-72
stabilityk
11-73
stabilitymu
2
1 − S11
=
*
S22 − S11 Δ + S21 S12
2
1 − S22
′ =
*
S11 − S22 Δ + S21 S12
where:
• S11, S12, S21, and S22 are S-parameters, from the input argument
s_params.
• Δ is a vector whose members are the determinants of the M 2-port
S-parameter matrices:
11-74
stabilitymu
11-75
t2s
⎡ a1 ⎤ ⎡ T11 T12 ⎤ ⎡ b2 ⎤
⎢ b ⎥ = ⎢T T22 ⎥⎦ ⎢⎣ a2 ⎥⎦
,
⎣ 1 ⎦ ⎣ 21
where:
11-76
t2s
11-77
vswr
1+ Γ
VSWR =
1− Γ
The input gamma is a complex vector. The output ratio is a real vector
of the same length as gamma.
gamma = 1/3;
ratio = vswr(gamma)
11-78
y2abcd
11-79
y2h
11-80
y2s
See Also abcd2s | h2s | s2y | y2abcd | y2h | y2s | y2z | z2s
11-81
y2z
See Also abcd2z | h2z | y2abcd | y2h | y2s | y2z | z2s | z2y
11-82
z2abcd
11-83
z2gamma
Z − Z0
Γ=
Z + Z0
z = 100;
gamma = z2gamma(z)
11-84
z2h
11-85
z2s
11-86
z2y
11-87
z2y
11-88
A
Overview
The AMP data file describes a single nonlinear device. Its format can contain
the following types of data:
• S, Y, or Z network parameters
• Noise parameters
• Noise figure data
• Power data
• IP3 data
An AMP file must contain either power data or network parameter data to
be valid. To accommodate analysis at more than one frequency, the file can
contain more than one section of power data. Noise data, noise figure data,
and IP3 data are optional.
Note If the file contains both network parameter data and power data,
RF Toolbox software checks the data for consistency. If the amplifier gain
computed from the network parameters is not consistent with the gain
computed from the power data, a warning appears. For more information, see
“Inconsistent Data Sections” on page A-14.
Two AMP files, samplepa1.amp and default.amp, ship with the toolbox to
show the AMP format. They describe a nonlinear 2-port amplifier with noise.
See “Example — Modeling a Cascaded RF Network” on page 1-14 for an
example that shows how to use an AMP file.
For information on specifying data in an AMP file, see “Data Sections” on page
A-4. For information about adding comments to an AMP file, see “Denoting
Comments” on page A-3.
A-2
Denoting Comments
Denoting Comments
An asterisk (*) or an exclamation point (!) precedes a comment that appears
on a separate line.
A semicolon (;) precedes a comment that appears following data on the same
line.
A-3
A AMP File Format
Data Sections
In this section...
“Overview of Data Sections” on page A-4
“S, Y, or Z Network Parameters” on page A-4
“Noise Parameters” on page A-6
“Noise Figure Data” on page A-8
“Power Data” on page A-9
“IP3 Data” on page A-12
“Inconsistent Data Sections” on page A-14
A new header indicates the end of the previous section. The data sections
can appear in any order in the file.
Note In the data section descriptions, brackets ([]) indicate optional data or
characters. All values are case insensitive.
S, Y, or Z Network Parameters
Header Line 1
The first line of the header has the format
A-4
Data Sections
The following table explains the meaning of the allowable Parameter values.
Parameter Description
MA Data is given in (magnitude, angle) pairs with
angle in degrees (default for S-parameters).
DB Data is given in (dB-magnitude, angle) pairs with
angle in degrees.
RI Data is given in (real, imaginary) pairs (default for
Y- and Z-parameters).
This example of a first line indicates that the section contains S-parameter
data given in (real, imaginary) pairs, and that the reference impedance is
50 ohms.
S RI R 50
Header Line 2
The second line of the header has the format
Independent_variable Units
This example of a second line indicates that the default units for frequency
data is GHz.
FREQ GHZ
A-5
A AMP File Format
Data
The data that follows the header typically consists of nine columns.
The first column contains the frequency points where network parameters are
measured. They can appear in any order. If the frequency is given in units
other than those you specified as the default, you must follow the value with
the appropriate units; there should be no intervening spaces. For example,
FREQ GHZ
1000MHZ ...
2000MHZ ...
3000MHZ ...
Columns two though nine contain 2-port network parameters in the order
N11, N21, N12, N22. Similar to the Touchstone format, each Nnn corresponds
to two consecutive columns of data in the chosen form: MA, DB, or RI. The
data can be in any valid MATLAB format.
This example is derived from the file default.amp. A comment line explains
the column arrangement of the data where re indicates real and im indicates
imaginary.
S RI R 50
FREQ GHZ
* FREQ reS11 imS11 reS21 imS21 reS12 imS12 reS22 imS22
1.00 -0.724725 -0.481324 -0.685727 1.782660 0.000000 0.000000 -0.074122 -0.321568
1.01 -0.731774 -0.471453 -0.655990 1.798041 0.001399 0.000463 -0.076091 -0.319025
1.02 -0.738760 -0.461585 -0.626185 1.813092 0.002733 0.000887 -0.077999 -0.316488
Noise Parameters
Header Line 1
The first line of the header has the format
Keyword
A-6
Data Sections
Header Line 2
The second line of the header has the format
Variable Units
Variable must be F[REQ]. Units indicates the default units of the frequency
data. It can be GHz, MHz, or KHz. You can override this default on any given
line of data. This example of a second line indicates that frequency data is
assumed to be in GHz, unless other units are specified.
FREQ GHz
Data
The data that follows the header must consist of five columns.
The first column contains the frequency points at which noise parameters
were measured. The frequency points can appear in any order. If the
frequency is given in units other than those you specified as the default,
you must follow the value with the appropriate units; there should be no
intervening spaces. For example,
NOI
FREQ GHZ
1000MHZ ...
2000MHZ ...
3 ...
4 ...
5 ...
A-7
A AMP File Format
This example is taken from the file default.amp. A comment line explains
the column arrangement of the data.
NOI RN
FREQ GHz
* Freq Fmin(dB) GammmaOpt(MA:Mag) GammmaOpt(MA:Ang) RN/Zo
1.90 10.200000 1.234000 -78.400000 0.240000
1.93 12.300000 1.235000 -68.600000 0.340000
2.06 13.100000 1.254000 -56.700000 0.440000
2.08 13.500000 1.534000 -52.800000 0.540000
2.10 13.900000 1.263000 -44.400000 0.640000
Header Line 1
The first line of the header has the format
Keyword [Units]
For noise figure data, Keyword must be NF. The optional Units field indicates
the default units of the NF data. Its value must be dB, i.e., data must be
given in decibels.
This example of a first line indicates that the section contains NF data, which
is assumed to be in decibels.
NF
Header Line 2
The second line of the header has the format
Variable Units
Variable must be F[REQ]. Units indicates the default units of the frequency
data. It can be GHz, MHz, or KHz. This example of a second line indicates that
frequency data is assumed to be in GHz.
A-8
Data Sections
FREQ GHz
Data
The data that follows the header typically consists of two columns.
The first column contains the frequency points at which the NF data are
measured. Frequency points can appear in any order. For example,
NF
FREQ MHz
2090 ...
2180 ...
2270 ...
NF dB
FREQ GHz
1.900 10.3963213
2.000 12.8797965
2.100 14.0611765
2.200 13.2556751
2.300 12.9498642
2.400 13.3244309
2.500 12.7545104
Note If your noise figure data consists of a single scalar value with no
associated frequency, that same value is used for all frequencies. Enter the
value in column 1 of the line following header line 2. You must include the
second line of the header, but it is ignored.
Power Data
An AMP file describes power data as input power-dependent output power.
A-9
A AMP File Format
Header Line 1
The first line of the header has the format
Keyword [Units]
For power data, Keyword must be POUT, indicating that this section contains
power data. Because output power is complex, Units indicates the default
units of the magnitude of the output power data. It can be dBW, dBm, mW, or W.
The default is W. You can override this default on any given line of data.
The following table explains the meaning of the allowable Units values.
Units Description
dBW Decibels referenced to one watt
dBm Decibels referenced to one milliwatt
mW Milliwatts
W Watts
This example of a first line indicates that the section contains output
power data whose magnitude is assumed to be in decibels referenced to one
milliwatt, unless other units are specified.
POUT dBm
Header Line 2
The second line of the header has the format
Keyword must be PIN. Units indicates the default units of the input power
data. See Allowable Power Data Units on page A-10 for a complete list of
valid values. The default is W. You can override this default on any given
line of data. FREQ[=]value is the frequency point at which the power is
A-10
Data Sections
measured. The units of the frequency point must be specified explicitly using
the abbreviations GHz, MHz, kHz, or Hz.
This example of a second line indicates that the section contains input power
data that is assumed to be in decibels referenced to one milliwatt, unless
other units are specified. It also indicates that the power data was measured
at a frequency of 2.1E+009 Hz.
Data
The data that follows the header typically consists of three columns:
• The first column contains input power data. The data can appear in any
order.
• The second column contains the corresponding output power magnitude.
• The third column contains the output phase shift in degrees.
Note RF Toolbox software does not use the phase data directly. RF
Blockset™ software uses this data in conjunction with RF Toolbox software
to create the AM/PM conversion table for the General Amplifier and
General Mixer blocks.
If all phases are zero, you can omit the third column. If all phases are zero or
omitted, the toolbox assumes that the small signal phase from the network
parameter section of the file (180*angle(S21(f))/pi) is the phase for all
power levels.
In contrast, if one or more phases in the power data section are nonzero, the
toolbox interpolates and extrapolates the data to determine the phase at
all power levels. The small signal phase (180*angle(S21(f))/pi) from the
network parameter section is ignored.
A-11
A AMP File Format
• The lowest input power value for which power data exists falls in the small
signal (linear) region.
• In the power table for each frequency point f, the power gain and phase
at the lowest input power value are equal to 20*log10(abs(S21(f))) and
180*angle(S21(f))/pi, respectively, in the network parameter section.
If the power is given in units other than those you specified as the default,
you must follow the value with the appropriate units. There should be no
intervening spaces.
This example is derived from the file default.amp. A comment line explains
the column arrangement of the data.
POUT dbm
PIN dBm FREQ = 2.10GHz
* Pin Pout Phase(degrees)
0.0 19.28 0.0
1.0 20.27 0.0
2.0 21.26 0.0
Note The file can contain more than one section of power data, with each
section corresponding to a different frequency value. When you analyze data
from a file with multiple power data sections, power data is taken from the
frequency point that is closest to the analysis frequency.
IP3 Data
An AMP file can include frequency-dependent, third-order input (IIP3) or
output (OIP3) intercept points.
Header Line 1
The first line of the header has the format
Keyword [Units]
A-12
Data Sections
For IP3 data, Keyword can be either IIP3 or OIP3, indicating that this section
contains input IP3 data or output IP3 data. Units indicates the default units
of the IP3 data. Valid values are dBW, dBm, mW, and W. The default is W. See
Allowable Power Data Units on page A-10 for an explanation of the allowable
Units values.
This example of a first line indicates that the section contains input IP3 data
which is assumed to be in decibels referenced to one milliwatt.
IIP3 dBm
Header Line 2
The second line of the header has the format
Variable Units
Variable must be FREQ. Units indicates the default units of the frequency
data. Valid values are GHz, MHz, and KHz. This example of a second line
indicates that frequency data is assumed to be in GHz.
FREQ GHz
Data
The data that follows the header typically consists of two columns.
The first column contains the frequency points at which the IP3 parameters
are measured. Frequency points can appear in any order.
OIP3
FREQ GHz
2.010 ...
2.020 ...
2.030 ...
A-13
A AMP File Format
OIP3 dBm
FREQ GHz
2.100 38.8730377
Note If your IP3 data consists of a single scalar value with no associated
frequency, then that same value is used for all frequencies. Enter the value
in column 1 of the line following header line 2. You must include the second
line of the header, but the application ignores it.
The toolbox compares the small-signal amplifier gain defined by the network
parameters, S21, and by the power data, Pout – Pin. The discrepancy between
the two is computed in dBm using the following equation:
A-14
Data Sections
Pout (dBm)
* * *
*
DP *
fP Pin (dBm)
A-15
A AMP File Format
A-16
B
Examples
B-2
Index
A
Index source reflection coefficient 11-18
ABCD-parameters specified network parameters 9-7
converting to h-parameters 11-2 cascadesparams function 11-6
converting to S-parameters 11-3 cascading
converting to Y-parameters 11-4 S-parameters 11-6
converting to Z-parameters 11-5 chart properties 11-61
abcd2h function 11-2 circle method 9-13
abcd2s function 11-3 circuit 9-2
abcd2y function 11-4 circuit analysis
abcd2z function 11-5 analyze method 9-2
accessing circuit object methods
object properties 3-14 list of 2-7
AMP file format A-1 circuit objects
comments A-3 constructing 3-2
data sections A-4 copying 11-12
noise parameters A-6 exporting to Verilog-A 4-5
overview A-2 list of 2-5
power data A-9 overview 2-4
S, Y, Z Network Parameters A-4 coaxial transmission line
analysis shunt and series stubs 7-154
list of methods 8-2 stubless 7-152
analyze method 9-2 constructing new objects 3-2
conversion
2N-port S-parameters to 4N-port
B S-parameters 11-64
budget plots 3-29 4N-port S-parameters to 2N-port
S-parameters 11-49
ABCD-parameters to h-parameters 11-2
C
ABCD-parameters to S-parameters 11-3
calculate method 9-7 ABCD-parameters to Y-parameters 11-4
example 9-10 ABCD-parameters to Z-parameters 11-5
calculations g-parameters to h-parameters 11-14
cascading S-parameters 11-6 h-parameters to ABCD-parameters 11-21
circuit analysis 9-2 h-parameters to g-parameters 11-22
de-embedding S-parameters 11-13 h-parameters to S-parameters 11-23
input reflection coefficient 11-16 h-parameters to Y-parameters 11-24
list of functions 10-2 h-parameters to Z-parameters 11-25
load reflection coefficient 11-17 impedance to reflection coefficient 11-84
output reflection coefficient 11-19 N-port S-parameters to M-port
power gain 11-29 S-parameters 11-68
Index-1
Index
Index-2
Index
Index-3
Index
Index-4
Index
Index-5
Index
Index-6
Index
Index-7