smith

Plot specified circuit object parameters on Smith chart

Description

example

smith(hnet,i,j) plots the ( i, j)th parameter of hnet on a Smith® Chart. hnet is an RF Toolbox™ network parameter object. The inputs i and j are positive integers whose value is less than or equal to 2 for hybrid and hybrid-g parameter objects, or less than or equal to hnet.NumPorts for ABCD, S, Y, or Z-parameter objects.

lineseries = smith(hnet,i,j) returns the line series handle used to create the plot, hsm

[lineseries,hsm] = smith(h,parameter1,...,parametern,type) plots the network parameters parameter1, ..., parametern from the object h on a Smith chart. h is the handle of a circuit ( rfckt ) or data ( rfdata ) object that contains n-port network parameter data.

[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.

If h has multiple operating conditions, such as from a .p2d or .s2d file, the smith method operates as follows:

  • If you do not specify any operating conditions as arguments to the smith method, then the method plots the parameter values based on the currently selected operating condition.

  • If you specify one or more operating conditions, the smith method plots the parameter values based on those operating conditions.

  • When you use an operating condition for the xparameter input argument, the method plots the parameters for all operating condition values.

Note

Use the smithplot function to plot network parameters that are not part of a circuit ( rfckt ) or data ( rfdata ) object, but are specified as vector data.

Examples

collapse all

Create an amplifier object from |default.s2p|.
amp = read(rfckt.amplifier,'default.s2p');

Plot S11 on the smith chart.

smith(amp,'S11')

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

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

  Show all properties

Input Arguments

collapse all

RF network parameter object, specified as a object handle.

RF circuit or data object, specified as a object handle.

Valid parameters of circuit or data objects, specified as a character vector or string.

Use listparam(rfobject) to get a list of valid parameters for the circuit or data object, h. Use listformat(rfobject,parameter) to see the legitimate formats for a specific parameter. The first listed format is the default format for that parameter.

Smith chart type is specified as a string.

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.

This table shows the commonly available parameters and the corresponding xparameter values. The default values listed in the table are used if the xparameter is not specified.

Parameter Namexparameter values
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

Format for the specified xparameter. You do not need to specify xformat when xparameter is an operating condition.

This table shows the available xformat values that are available for the xparameter values, along with the default values that are used if xformat is not specified.

xparameter valuesxformat values
PindBm (default), mW, W, dBW
Freq

THz, GHz, MHz, KHz, Hz

By default, xformat is chosen to provide the best scaling for the given xparameter values.

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

Name-Value Pair Arguments

Example: semilogy(h,'Pout','Pin','Freq',2.1e9)

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

'condition1',value1, ..., conditionm,valuem are the optional condition/value pairs at which to plot the specified parameters. These pairs are usually operating conditions from a .p2d or .s2d file. For some parameters, you can specify a set of frequency or input power values at which to plot 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 condition/value pairs.

  • When plotting large-signal S-parameters as a function of frequency, you can specify input power levels of interest using condition/value pairs.

  • When plotting parameters as a function of an operating condition, you can specify both frequency and input power values using condition/value pairs.

Frequency in Hz, specified as the comma-separated pair consisting of 'Freq' and a positive scalar.

Input power level, in dBm, specified as the comma-separated pair consisting of 'Pin' and a positive scalar.

input frequency value, in hertz, specified as the comma-separated pair consisting of 'fin' and a positive scalar 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 input frequency value you specify is used for subsequent plots until you specify a different value.

Output Arguments

collapse all

Lineseries object, returned as a column vector of object handles.

Smith chart property object, returned as a rfchart.smith object.

More About

collapse all

Properties

smith function plots 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 description.

Property Name

Description

Units, Values

Color

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

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

LabelColor

Color of the line labels.

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

LabelSize

Size of the line labels.

FontSize. Default is 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 is '-' (solid line).

LineWidth

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

Number of points. Default is 0.5.

SubColor

The Y line color for a ZY Smith chart.

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

SubLineType

The Y line spec for a ZY Smith chart.

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

SubLineWidth

The Y line width for a ZY Smith chart.

Number of points. Default is 0.5.

Type

Type of Smith chart.

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

Value

Two-row matrix. Row 1 specifies the values of the constant resistance and reactance lines that appear on the chart. For the constant resistance/reactance lines, each element in Row 2 specifies the value of the constant reactance/resistance line at which the corresponding line specified in Row 1 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]

Changing Properties of the Plotted Lines

The smith function returns lineseries, a column vector of handles to lineseries objects, one handle per plotted line. Use the Line Properties function to change the properties of these lines..

Changing Properties of the Smith Chart

The smith function returns the handle hsm of the Smith chart. Use the properties listed below to change the properties of the chart itself.

Tips

  • Type listparam(h) to get a list of valid parameters for a 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