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: [0.9369 0.9364 0.9360 0.9355 0.9351 0.9346 0.9341 0.9337 0.9332 0.9327 0.9322 0.9317 0.9313 0.9308 0.9302 0.9297 0.9292 0.9287 0.9282 0.9276 0.9271 0.9266 0.9260 0.9254 0.9249 0.9243 0.9237 0.9232 0.9226 0.9220 ... ] (1x600 double)
              YData: [-0.3435 -0.3447 -0.3458 -0.3470 -0.3482 -0.3494 -0.3506 -0.3518 -0.3530 -0.3542 -0.3554 -0.3566 -0.3579 -0.3591 -0.3604 -0.3617 -0.3629 -0.3642 -0.3655 -0.3668 -0.3681 -0.3694 -0.3708 -0.3721 -0.3735 -0.3748 ... ] (1x600 double)

  Use GET to 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: [0.9369 0.9364 0.9360 0.9355 0.9351 0.9346 0.9341 0.9337 0.9332 0.9327 0.9322 0.9317 0.9313 0.9308 0.9302 0.9297 0.9292 0.9287 0.9282 0.9276 0.9271 0.9266 0.9260 0.9254 0.9249 0.9243 0.9237 0.9232 0.9226 0.9220 ... ] (1x600 double)
              YData: [-0.3435 -0.3447 -0.3458 -0.3470 -0.3482 -0.3494 -0.3506 -0.3518 -0.3530 -0.3542 -0.3554 -0.3566 -0.3579 -0.3591 -0.3604 -0.3617 -0.3629 -0.3642 -0.3655 -0.3668 -0.3681 -0.3694 -0.3708 -0.3721 -0.3735 -0.3748 ... ] (1x600 double)

  Use GET to 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 Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

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

Default value is [0.4 0.4 0.4] (dark gray). For more information, see Color Specification.

LabelColor

Color of the line labels

Default value is [0 0 0] (black). For more information, see Color Specification.

LabelSize

Size of the line labels

FontSize. Default value 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

Default value is '-' (solid line). For more information, see Line Specification.

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

Default value is [0.8,0.8,0.8] (medium gray). For more information, see Color Specification.

SubLineType

The Y line spec for a ZY Smith chart

Default value is ':' (dotted line). For more information, see Line Specification.

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.

Line Specification

Use the table provided to set Line style of the Smith Chart

Line StyleDescriptionResulting Line
'-'Solid line

Sample of solid line

'--'Dashed line

Sample of dashed line

':'Dotted line

Sample of dotted line

'-.'Dash-dotted line

Sample of dash-dotted line, with alternating dashes and dots

Color Specification

Use the table provided to set color of the Smith Chart.

Color NameShort NameRGB TripletHexadecimal Color CodeAppearance
'red''r'[1 0 0]'#FF0000'

Sample of the color red

'green''g'[0 1 0]'#00FF00'

Sample of the color green

'blue''b'[0 0 1]'#0000FF'

Sample of the color blue

'cyan' 'c'[0 1 1]'#00FFFF'

Sample of the color cyan

'magenta''m'[1 0 1]'#FF00FF'

Sample of the color magenta

'yellow''y'[1 1 0]'#FFFF00'

Sample of the color yellow

'black''k'[0 0 0]'#000000'

Sample of the color black

'white''w'[1 1 1]'#FFFFFF'

Sample of the color white

Here are the RGB triplets and hexadecimal color codes for the default colors MATLAB® uses in many types of plots.

RGB TripletHexadecimal Color CodeAppearance
[0 0.4470 0.7410]'#0072BD'

Sample of RGB triplet [0 0.4470 0.7410], which appears as dark blue

[0.8500 0.3250 0.0980]'#D95319'

Sample of RGB triplet [0.8500 0.3250 0.0980], which appears as dark orange

[0.9290 0.6940 0.1250]'#EDB120'

Sample of RGB triplet [0.9290 0.6940 0.1250], which appears as dark yellow

[0.4940 0.1840 0.5560]'#7E2F8E'

Sample of RGB triplet [0.4940 0.1840 0.5560], which appears as dark purple

[0.4660 0.6740 0.1880]'#77AC30'

Sample of RGB triplet [0.4660 0.6740 0.1880], which appears as medium green

[0.3010 0.7450 0.9330]'#4DBEEE'

Sample of RGB triplet [0.3010 0.7450 0.9330], which appears as light blue

[0.6350 0.0780 0.1840]'#A2142F'

Sample of RGB triplet [0.6350 0.0780 0.1840], which appears as dark red

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.

Version History

Introduced before R2006a