Depending on the n-port representation (see n-port Representations below), the signals on the terminals of an n-port are represented as either voltages and currents or traveling waves [1]. The conventions for voltages, currents and voltage waves used in nport are shown in figures A two-port network descibed by voltages and currents and A two-port network descibed by traveling waves.
A two-port network descibed by voltages and currents
A two-port network descibed by traveling waves
In the voltage-current representation, the currents are flowing into the ports. In the traveling-wave representation, a_i and b_i represent voltage waves flowing into and out of port i respectively. The relation between voltages and currents and traveling waves is given by
Pass Z or IMPEDANCE as type on object instantiation.
Pass Y or ADMITTANCE as type on object instantiation.
Pass S or SCATTERING as type on object instantiation.
In addition to the n-port Representations, 2n-ports have two extra representations.
Pass ABCD or TRANSMISSION as type on object instantiation.
Pass T or SCATTERING_TRANSFER as type on object instantiation.
Supported types for 2-port parameters include all of the above and, additionally:
Pass H or HYBRID as type on object instantiation.
Pass G or INVERSE_HYBRID as type on object instantiation.
Bases: nport.base.NPortMatrixBase
Class representing an n-port matrix (Z, Y or S; for 2-ports also T, G, H or ABCD)
Parameters: |
|
---|
Convert to another n-port matrix representation
Parameters: |
|
---|---|
Return type: |
Check whether this n-port matrix is passive
Return type: | bool |
---|
Check whether this n-port matrix is reciprocal
Return type: | bool |
---|
Check whether this n-port matrix is symmetrical
Return type: | bool |
---|
Connect other in parallel with this NPortMatrix.
Parameters: |
|
---|---|
Return type: | NPortMatrix (type Y) |
The number of ports of this NPortMatrix
Return type: | int |
---|
Return this NPortMatrix raised to the nth power
Return type: | NPortMatrix |
---|
Recombine ports, reducing the number of ports of this NPortMatrix.
Parameters: |
|
---|---|
Return type: | NPortMatrix (type Z) |
>>> recombine([(1,3), (2,4), 5, -6]
will generate a four-port where:
Renormalize the n-port parameters to z0
Parameters: |
|
---|---|
Return type: |
Return an NPortMatrix with the ports reversed. This simply flips the matrix horizontally and vertically.
Return type: | NPortMatrix |
---|
Connect ports together, reducing the number of ports of this NPortMatrix.
Parameters: |
|
---|---|
Return type: | NPortMatrix (type Y) |
>>> shunt([1, (2, 3), (4, 5, 6)]
will generate a three-port where:
Keep only the parameters corresponding to the given ports, discarding the others. For a Z-matrix and a Y-matrix this corresponds to terminating the discarded ports in an open or short circuit respectively.
Parameters: |
|
---|---|
Return type: |
Return the 2n-port matrix represented by this n-port matrix
Parameters: |
|
---|---|
Return type: |
Bases: nport.base.NPortMatrixBase
Class representing a 2n-port matrix (Z, Y, S, T or ABCD)
Parameters: |
|
---|
Convert from one 2n-port matrix representation to another
Parameters: |
|
---|
Convert this TwoNPortMatrix to an NPortMatrix
Return type: | NPortMatrix |
---|
The number of ports of this TwoNPortMatrix
Return type: | int |
---|
Renormalize the 2n-port parameters to z0
Parameters: |
|
---|
Bases: nport.base.NPortBase
Class representing an n-port across a list of frequencies
Parameters: |
|
---|
Return an NPort with the specified frequency sample added.
Parameters: |
|
---|---|
Return type: |
If matrix is an NPortMatrix, its elements will be converted to this NPort‘s type and characteristic impedance. If matrix is a complex array, it is assumed the elements are in the format of this NPort.
Convert to another n-port matrix representation
Parameters: |
|
---|
Return the group delay of the parameter as specified by the indices port1 and port2
Parameters: |
|
---|---|
Returns: | group delay of parameter at indices port1 and port2 |
Return type: | ndarray |
alias of NPortMatrix
Connect other in parallel with this NPort.
Parameters: |
|
---|---|
Return type: |
Recombine ports, reducing the number of ports of this NPort.
Parameters: |
|
---|---|
Return type: |
>>> recombine([(1,3), (2,4), 5, -6]
will generate a four-port where:
Renormalize the n-port parameters to z0
Parameters: |
|
---|---|
Return type: |
Return an NPort with the ports reversed. This simply flips the matrices horizontally and vertically.
Return type: | NPort |
---|
Connect ports together, reducing the number of ports of this NPort.
Parameters: |
|
---|---|
Return type: |
>>> shunt([1, (2, 3), (4, 5, 6)]
will generate a three-port where:
Keep only the parameters corresponding to the given ports, discarding the others. For a Z-matrix and a Y-matrix this corresponds to terminating the discarded ports in an open or short circuit respectively.
Parameters: |
|
---|
Convert this NPort to a TwoNPort using inports as the input ports and outports as the output ports.
Parameters: |
|
---|---|
Return type: |
Bases: nport.base.NPortBase
Class representing a 2n-port across a list of frequencies
Parameters: |
|
---|
Return a TwoNPort with the specified frequency sample added.
If matrix is a TwoNPortMatrix, its elements will be converted to this TwoNPort‘s type and characteristic impedance. If matrix is a complex array, it is assumed the elements are in the format of this TwoNPort.
Parameters: |
|
---|---|
Return type: |
Convert to another 2n-port matrix representation
Parameters: |
|
---|
alias of TwoNPortMatrix
[KUR65] | “Power Waves and the Scattering Matrix” by K. Kurokawa in IEEE Transactions on Microwave Theory and Techniques, vol. 13, no. 2, pp. 194–202, 1965 |
Footnotes
[1] | Power wave representations, as introduced by Kurokawa [KUR65], are currently not supported by nport. |