nport
Create linear n-port circuit element
Description
The nport object creates an n-port element. You can add
this element to an rfbudget object
for RF Budget Analysis. You can input a n-port S-parameters and define it is an
nport object.
Creation
Syntax
Description
nport_obj = nport(
creates an n-port object and sets the NetworkData.netparamobj)
nport_obj = nport(___,
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.name)
sets the Properties of an
nport_obj = nport(Name=Value)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
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
Since R2023b
Input port number of a multiport (n-port) element in RF budget, specified as a scalar. Use this property to designate a port in a multiport element as an input port.
The Input, Output, and
Termination properties enable you to treat a
multiport (n-port) element as a two-port element. You can use the resulting
two-port element in an rfbudget object to calculate the RF budget results for a chain
of two-port elements.
Note
If you set the
Input property to the same port number as
the Output property, the nport
object assigns a new port number to the Output
property through a circular right-shift. For example, in a
three-port element, if you set the Input and
Output property to 2,
then the nport object sets the
Output property to
3. (since R2024a)
Example: 1
Since R2023b
Output port number of a multiport (n-port) element in an RF budget, specified as a scalar. Use this property to designate a port in a multiport element as the output port.
The Input, Output, and
Termination properties enable you to treat a
multiport (n-port) element as a two-port element. You can use the resulting
two-port element in an rfbudget object to calculate the RF budget results for a chain
of two-port elements.
Note
If you set the
Output property is set to the same port
number as the port number of the Input
property, the nport object assigns a new port
number to the Input property using a circular
left-shift. For instance, in a three-port element, if you set the
Input and Output
property to 2, the nport object
sets the Input property to
1. (since R2024a)
Example: 3
Since R2023b
Impedance to terminate unused ports of multiport elements in an RF budget,
specified as a real nonnegative scalar or real nonnegative vector of length
NumPorts in ohms. When you do not specify an
impedance, the object terminates the unused ports by assigning them to
NetworkData.Impedance. To create a:
Short-circuit termination — Set
Terminationto0Open-circuit termination — Set
TerminationtoInf
The Input, Output, and
Termination properties enable you to treat a
multiport (n-port) element as a two-port element. You can use this two-port
element in an rfbudget object to calculate the RF budget results for a chain
of two-port elements.
Note
When you set the
Terminationproperty to[], thenportelement is no longer treated as a two-port element and theInputandOutputproperties will not appear in the property list. (since R2024a)Delete the
rfbudgetobject before setting theTerminationto[]when thenportobject is an input to therfbudgetobject.
When the
nportobject is specified with anInput,Output, andTermination, the resulting S-parameters are equivalent tosnp2smp(n.NetworkData,[n.Input n.Output],n.Termination), wherenrepresents the number of ports.
Example: 75
Network data, specified as a scalar. Network data can be of S, Z, Y, ABCD, h, or g-parameters.
Noise data of the two-port element, specified as a noiseParameters object. The noiseParameter
object contains a frequency-dependent noise figure loaded from a two-port
Touchstone file or built at the MATLAB® command line. To reset the two-port
element to noiseless, set the NoiseData to
[].
When Numports is greater than 2
set the NoiseData property alongside the
NetworkData property.
Example: NoiseData=np
Name of nport object, specified as a scalar.
Example: nportobj
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
Examples
Create and display N-port data object.
npass = nport('passive.s2p')npass =
nport: N-port element
FileName: 'passive.s2p'
NetworkData: [1×1 sparameters]
Name: 'Sparams'
NumPorts: 2
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: [1×1 sparameters]
Name: 'Sparams'
NumPorts: 2
ParentNodes: [1 2 0 0]
ParentPath: 'example'
Since R2023b
Input a three-port Touchstone file to the nport object. To treat a three-port element as a two-port element, specify the input and output ports. This example assigns the port 1 as the input port and the port 3 as the output port. The object terminates port 2 with NetworkData.Impedance.
nport_obj = nport('default.s3p',Input=1,Output=3);Create two-port elements to add them to the RF budget chain.
a = amplifier(Gain=4); m = modulator(OIP3=13); r = rfelement(Gain=10);
Add the n-port element and other two-elements to an RF budget chain and compute the budget results for the chain of two-port elements.
b = rfbudget([a m r nport_obj],2e9,-30,1e3)
b =
rfbudget with properties:
Elements: [1x4 rf.internal.rfbudget.Element]
InputFrequency: 2 GHz
AvailableInputPower: -30 dBm
SignalBandwidth: 1 kHz
Solver: Friis
AutoUpdate: true
Analysis Results
OutputFrequency: (GHz) [ 2 3 3 3]
OutputPower: (dBm) [-26 -26 -16 -16.32]
TransducerGain: (dB) [ 4 4 14 13.68]
NF: (dB) [ 0 0 0 0]
IIP2: (dBm) []
OIP2: (dBm) []
IIP3: (dBm) [Inf 9 9 9]
OIP3: (dBm) [Inf 13 23 22.68]
SNR: (dB) [114 114 114 114]
Version History
Introduced in R2013bThe updates to the Input, Output, and
Termination properties are as follows:
If you set the
Inputproperty to the same port number as theOutputproperty, thenportobject assigns a new port number to theOutputproperty through a circular right-shift.If you set the
Outputproperty to the same port number as theInputproperty, thenportobject assigns a new port number to theInputproperty using a circular left-shift.If you input the
nportobject to anrfbudgetobject or a two-portNoiseDatais provided as an input to annportobject, you cannot set theTerminationproperty to[]. In such cases, specify theTerminationproperty as a real nonnegative scalar or nonnegative vector.
Use the Input, Output, and
Termination properties of the nport object
to treat a multiport n-port element as two-port element. You can use this two-port
element in an rfbudget
object to calculate the RF budget results for a chain of two-port elements.
nport is recommend over rfckt.passive and
rfdata.noise because it enables you to:
Create passive RF S-parameter components and networks that are characterized by passive network parameter data.
Model a passive RF S-parameter components in an RF chain created using an
rfbudgetobject or the RF Budget Analyzer app.Export the passive RF S-parameter components to RF Blockset™ or to
rfsystemSystem object™ for circuit envelope or idealized baseband analysis.Build a n-port element with the noise data, specified as a
noiseParametersobject. ThenoiseParameterobject contains a frequency-dependent noise figure loaded from a two-port Touchstone file or built at the MATLAB® command line.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)