Main Content

smith

Plot circuit object parameters on Smith chart

Description

RF Network Object

example

smith(hnet,i,j) plots the (i, j)th parameter of the network object hnet on a Smith® Chart.

example

lineseries = smith(hnet,i,j) returns the line series property object lineseries. The lineseries object can be used to set the properties of the data in the Smith plot.

RFCKT or RF Data Objects

example

smith(h,circuitPara) plots the circuit parameter circuitPara from the RFCKT or RF data object h on a Smith chart. You can specify multiple circuit parameters in this syntax.

example

smith(h,circuitPara,xAxisPara,xAxisFmt) plots the circuit parameters circuitPara on a Smith chart along with the variables xAxisPara and their corresponding format xAxisFmt.

Derive xAxisPara and xAxisFmt for the RFCKT or RF data object h using the listparam(h) and listformat(h,'xAxisPara') commands, respectively.

example

smith(h,circuitPara,xAxisPara,xAxisFmt,opCon,opVal) plots the circuit parameters on a Smith chart with operating conditions opCon and operating values opVal for the circuit object h.

Derive operating conditions for the RFCKT or RF data object h using the getop(h) command

example

smith(___,Name,Value) plots the data of a RFCKT or RF data object with name-value arguments. Specify name-value argument after any of the input argument combinations in the previous syntaxes.

smith(___,gridType) plots the data of the RFCKT or RF data object on a Smith chart with the specified grid type.

example

[lineseries,hsm] = smith(___) returns the line series property object lineseries and Smith chart property object hsm.

Examples

collapse all

Create an S-Parameters object from the specified file.

S = sparameters('default.s2p');

Plot the input reflection coefficient S11 on a Smith chart.

smith(S,1,1)

Create an S-parameters object from the specified Touchstone® file of an RF Filter.

S = sparameters('RFBudget_RF.s2p');

Plot the input reflection coefficient S11 on a Smith chart.

lineseries = smith(S,1,1)
lineseries = 
  Line (S_{11}) with properties:

              Color: [0 0.4470 0.7410]
          LineStyle: '-'
          LineWidth: 0.5000
             Marker: 'none'
         MarkerSize: 6
    MarkerFaceColor: 'none'
              XData: [1x600 double]
              YData: [1x600 double]
              ZData: [1x0 double]

  Show all properties

Change the color of the S11 data line in the Smith chart.

lineseries.Color = [0.7 0.3 0.35]

lineseries = 
  Line (S_{11}) with properties:

              Color: [0.7000 0.3000 0.3500]
          LineStyle: '-'
          LineWidth: 0.5000
             Marker: 'none'
         MarkerSize: 6
    MarkerFaceColor: 'none'
              XData: [1x600 double]
              YData: [1x600 double]
              ZData: [1x0 double]

  Show all properties

Import network parameters, noise data, and power data from the default.amp file into the amplifier object h.

h = read(rfckt.amplifier,'default.amp');

Set the interpolation method of the amplifier object, h, to cubic.

h.IntpType = 'cubic';

Plot the S11 and S22 parameters of the amplifier object h on a Z Smith chart.

lineseries = smith(h,'S11','S22');
lineseries(1).LineStyle = '-';
lineseries(1).LineWidth = 1;
lineseries(2).LineStyle = ':';
lineseries(2).LineWidth = 1;

Create an amplifier object from the specified P2D file.

ckt1 = read(rfckt.amplifier, 'default.p2d');

Plot the input reflection coefficient and output power of the amplifier.

smith(ckt1,'S11','Pout','Freq','GHz');

Plot the output power of the amplifier when the input power is at 18 dBm.

 smith(ckt1,'S11','Pout','Freq','GHz','bias',1.5,'Pin',18);

Create an amplifier object from the specified Touchstone® file.

amp = read(rfckt.amplifier,'default.s2p');

Set the circuit parameters as S11 and grid type as y and plot the amplifier data on the Smith chart.

[lineseries,hsm] = smith(amp,'S11','y');

Change the color of the Smith chart.

set(hsm,'Color',[0.7 0.3 0.35]);

Input Arguments

collapse all

RF network parameter object, specified as a one of these objects:

Note

Use the smithplot function to plot network parameters that are not part of an RFCKT or RF data object but are specified as vector data.

(i, j)th parameter of the network object, hnet, specified as positive integers.

  • When hnet is a hybrid or hybrid-g parameter object, specify i and j in the range [1,2] .

  • When hnet is an ABCD, S, Y, or Z-parameters object, specify i and j such that they are less than or equal to number of ports in hnet.

Example: smith(hnet,2,1)

RFCKT or RF data object, specified as a rfckt or rfdata object.

For complete list of RFCKT and RF data objects, see RF Circuit Objects and RF Data Objects.

Valid RFCKT or data object parameter, specified as a character vector or string scalar.

Use listparam(h) for a list of valid parameters for the circuit or data object h. You can also use listformat(h,parameter) to see the valid formats for a specific parameter.

Independent variables to plot with the circuit parameters, circuitPara, specified as a character vector or string scalar.

This table shows the commonly used circuitPara and their corresponding xAxisPara values. The function uses the default values listed in the table if you do not specify xAxisPara .

circuitPara ValuexAxisPara Value
Pout, Phase, LS11, LS12, LS21, LS22Pin (default), Freq
S11, S12, S21, S22, NF, IIP3, OIP3, GroupDelay, VSWRIn, VSWROut, GammaIn, GammaOut, FMIN, GammaOPT, RN, TF1, TF2, Gt, Ga, Gp, Gmag, Gmsg, GammaMS, GammaML, K, Delta, Mu, MuPrimeFreq
AM/AM, AM/PMAM

xAxisPara format, specified as a character vector or string scalar. You do not need to specify xAxisFmt when xAxisPara is an operating condition.

This table shows the commonly used xAxisPara and their corresponding xAxisFmt. The function uses the default values listed in the table if you do not specify xAxisFmt .

xAxisPara ValuexAxisFmt Value
PindBm (default), mW, W, dBW
Freq

THz, GHz, MHz, KHz, Hz

By default, xAxisFmt is chosen to provide the best scaling for the given xAxisPara values.

AMMagnitude (decibels) (default), Magnitude (linear)

Example: smith(h,'Pout','Pin','mW') plots data on a Smith chart for circuit object, h, with xAxisPara set to 'Pin' and xAxisFmt set to 'mW'.

Operating conditions derived from a P2D or S2D file, specified as a string scalar or a character vector.

For some circuit parameters, you can specify a set of frequency or input power values at which the function plots the specified parameter.

For example:

  • When plotting large-signal S-parameters as a function of input power, you can specify frequency points of interest using opCon and opVal arguments.

  • When plotting large-signal S-parameters as a function of frequency, you can specify input power levels of interest using opCon and opVal arguments.

  • When plotting parameters as a function of an operating condition, you can specify both frequency and input power values using opCon and opVal arguments.

Enter the getop(h) command at the command line to get the operating conditions for the RF circuit object h.

Value of the operating conditions specified using the opCon argument, specified as a scalar.

Example: smith(h,'Pout','Pin','mW','bias',1.5) plots the data on a Smith chart for circuit object, h, with opCon set to 'bias' and value set to 1.5.

Smith chart grid type, specified as a character vector or string scalar.

Example: smith(h,'Pout','Pin','mW','bias',1.5,'Freq',2.4,'y') plots the data on a Smith chart for circuit object, h, with the Smith chart grid type set to the admittance grid.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: smith(h,'Pout','Pin','mW','bias',1.5,'Freq',2.4)

Frequency value used to plot the Smith chart, specified as the comma-separated pair consisting of 'Freq' and a positive scalar in Hz.

Input power level used to plot the Smith chart, specified as the comma-separated pair consisting of 'Pin' and a scalar in dBm.

Input frequency value used to plot the spur power in the Smith chart, specified as the comma-separated pair consisting of 'fin' and a positive scalar in Hz.

  • When the input object to the function is an rfckt.mixer object, the default value of fin is the input frequency at which the magnitude in decibels of the S21 parameter of the mixer is the highest.

  • When the input object to the function 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.

Output Arguments

collapse all

Line series property object, returned as a column vector.

Smith chart properties, returned as an rfchart.smith object.

More About

collapse all

Change Properties of Smith Chart

The smith function returns the Smith chart properties object, hsm.

The smith function plots the Smith chart using the default property values. Use set(hsm,'PropertyName',PropertyValue) to change the property values of the chart and use get(hsm) to get the property values.

This table lists all the properties you can specify for a Smith chart object along with their descriptions and associated values. Use the table below to change the properties of the chart.

Name

Description

Units, Values

Color

Line color for a Z or Y Smith chart and the color of the Z line for a ZY Smith chart

ColorSpec. Default value is [0.4 0.4 0.4] (dark gray).

LabelColor

Color of the line labels

ColorSpec. Default value is [0 0 0] (black).

LabelSize

Size of the line labels

FontSize. Default ivalue s 10.

LabelVisible

Visibility of the line labels

'on' (default) or 'off'

LineType

Line spec for a Z or Y Smith chart. For a ZY Smith chart, the Z line spec

LineSpec. Default value is '-' (solid line).

LineWidth

Line width for a Z or Y Smith chart. For a ZY Smith chart, width of the Z line

Number of points. Default value is 0.5.

SubColor

The Y line color for a ZY Smith chart

ColorSpec. Default value is [0.8,0.8,0.8] (medium gray).

SubLineType

The Y line spec for a ZY Smith chart

LineSpec. Default value is ':' (dotted line).

SubLineWidth

The Y line width for a ZY Smith chart

Number of points. Default value is 0.5.

Type

Type of Smith chart

'z' (default), 'y', or 'zy'

Value

Two-row matrix. First row specifies the values of the constant resistance and reactance lines that appear on the chart. For constant resistance or reactance lines, each element in second row specifies the value of the constant reactance or resistance line at which the corresponding line specified in first row ends

2-by-n matrix. Default is [0.2000 0.5000 1.0000 2.0000 5.0000; 1.0000 2.0000 5.0000 5.0000 30.0000]

Change Properties of Plotted Lines

The smith function returns a lineseries object as a column vector of handles to lineseries objects, one object per plotted line. For more information, see Line Properties.

Tips

  • Type listparam(h) to get a list of valid parameters for the circuit object h.

    Note

    For all circuit objects, except those that contain data from a data file, you must use the analyze function to perform a frequency domain analysis before calling smith.

Introduced before R2006a