Main Content

nport

Create linear n-port circuit element

Description

The nport class creates an n-port object that can be added into an RF Toolbox™ circuit. The n-port S-parameters define the n-port object.

Creation

Description

example

nport_obj = nport(filename) creates an n-port object and sets the FileName property.

example

nport_obj = nport(netparamobj) creates an n-port object and sets the NetworkData.

nport_obj = nport(___,name) creates an n-port object and sets the Name property. Specify the name-value argument after any of the input argument combinations in the previous syntaxes.

nport_obj = nport(Name=Value) sets the Properties of an nport object using one or more name-value arguments. For example, nport_obj = nport(FileName='passive.s2p') creates an nport object from passive.s2p. Properties you do not specify retain their default values.

Properties

expand all

Touchstone file, specified as a string scalar or character vector.

Note

The Touchstone file must be passive at all specified frequencies. To make n-port S-parameters passive, use the makepassive function.

Data Types: char | string

Number of ports, specified as a scalar.

Example: 2

Network data, specified as a scalar. Network data can be of S, Z, Y, ABCD, h, or g-parameters.

Example: [1x1 sparameters]

Name of n-port object, specified as a scalar.

Example: obj

Port names, stored as a cell vector. This property is a read only.

Example: {’p1’ ‘p2’}

Terminal names, stored as a cell vector. There are two terminals per port. The positive terminal names are listed first ('p1+', 'p2+'...) followed by the negative terminal ('p1–', 'p2–'...). This property is read only.

Parent circuit nodes connected to n-port object terminals, stored as a vector of integers. ParentNodes is same length as Terminals. This property is read only and appears only after you add the n-port data.

Full path of the circuit to which the n-port object belongs, stored as character vector. This property is read only and appear only after you add the n-port object is added to the circuit.

Object Functions

smithplotPlot impedance transformation for selected matching network on smith chart
cloneCreate copy of existing circuit element or circuit object

Examples

collapse all

Create and display N-port data object.

npass = nport('passive.s2p')
npass = 
  nport: N-port element

       FileName: 'passive.s2p'
    NetworkData: [1x1 sparameters]
           Name: 'Sparams'
       NumPorts: 2
      Terminals: {'p1+'  'p2+'  'p1-'  'p2-'}

Add a N-port object to a circuit. Display the object.

nobj = nport('passive.s2p');
ckt = circuit('example');
add(ckt,[1 2],nobj)
disp(nobj)
  nport: N-port element

       FileName: 'passive.s2p'
    NetworkData: [1x1 sparameters]
           Name: 'Sparams'
       NumPorts: 2
      Terminals: {'p1+'  'p2+'  'p1-'  'p2-'}
    ParentNodes: [1 2 0 0]
     ParentPath: 'example'

Version History

Introduced in R2013b