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.

Note

To use in an rfbudget object, nport object must be created from a data file.

Creation

Description

example

nport_obj = nport(filename) creates an n-port object from the specified filename.

example

nport_obj = nport(netparamobj)creates an n-port object from a network parameter object. Network parameter object can be S, Z, Y, ABCD, h, or g-parameters.

nport_obj = nport(___,name)creates an nport object with the given name.

Properties

expand all

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

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

    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

    NetworkData: [1x1 sparameters]
           Name: 'Sparams'
       NumPorts: 2
      Terminals: {'p1+'  'p2+'  'p1-'  'p2-'}
    ParentNodes: [1 2 0 0]
     ParentPath: 'example'
Introduced in R2013b