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
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
FileName
— Touchstone file
string scalar | character vector
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
Input
— Input port number
[]
(default) | scalar
Since R2023b
Input port number, specified as a scalar. Use this property to designate a port in a multiport (n-port) element as the 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 this two-port
element in an rfbudget
object to calculate the RF budget results for a chain
of two-port elements.
Example: 1
NumPorts
— Number of ports
scalar
Number of ports, specified as a scalar.
Example: 2
Output
— Output port number
[]
(default) | scalar
Since R2023b
Output port number, specified as a scalar. Use this property to designate a port in a multiport (n-port) 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 this two-port
element in an rfbudget
object to calculate the RF budget results for a chain
of two-port elements.
Example: 2
NetworkData
— Network data
scalar
Network data, specified as a scalar. Network data can be of S, Z, Y, ABCD, h, or g-parameters.
NoiseData
— Noise Data
noiseParameter
object
Noise data of the n-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 n-port
element to noiseless, set the NoiseData
to
[]
.
Specify the NoiseData
property with the
NetworkData
property.
Example: NoiseData=np
Termination
— Impedance to terminate unused ports
NetworkData.Impedance
(default) | real scalar | real vector
Since R2023b
Impedance to terminate unused ports, specified as a real scalar or real
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
Termination
to0
Open-circuit termination — Set
Termination
toInf
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.
Example: 75
Name
— Name of n-port object
scalar
Name of n-port object, specified as a scalar.
Example: obj
Ports
— Port names
cell vector
Port names, stored as a cell vector. This property is a read only.
Example: {’p1’ ‘p2’}
Terminals
— Terminal names
cell vector
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.
ParentNodes
— Parent circuit nodes connected to n-port object terminals
vector of integers.
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.
ParentPath
— Full path of circuit to which n-port object belongs
character vector
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 N-port Object
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 N-Port Object to Circuit
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'
Treat Three-Port Element As Two-Port Element
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 R2013bR2023b: Treat multiport n-port element as two-port element
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.
R2023b: Recommended over rfckt.passive
and rfdata.noise
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
rfbudget
object or the RF Budget Analyzer app.Export the passive RF S-parameter components to RF Blockset™ or to
rfsystem
System object™ for circuit envelope or idealized baseband analysis.Build a n-port element with the noise data, specified as a
noiseParameters
object. ThenoiseParameter
object contains a frequency-dependent noise figure loaded from a two-port Touchstone file or built at the MATLAB® command line.
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)