y2s
Converts Y-parameters to S-parameters.
| Library |
|
Arguments
Input arguments
# y_params — N-port Y-parameters
+
N×N×M array
Details
-port Y-parameters specified as an array of size on on , where represents the number of frequency points -port Y-parameters.
# Z0 is the calculated impedance, ohms
+
50 | positive real scalar | positive real vector
Details
The calculated impedance in ohms is set in one of the following ways:
-
Positive real scalar, if you want to set the same calculated impedance for all network ports.
-
A positive real vector of length if you want to set a different design impedance for each port in - port network.
-
A positive real vector of length if you want to set a different design impedance for each of the frequencies in the data.
If the calculated impedance is a vector, and the number of ports equal to the number of data frequencies , , then the function sparameters will assign each element of the vector to each port of the network. To specify the calculated impedance for each frequency in this case, specify Z0 as a three-dimensional vector of size on on .
Output arguments
# s_params — N-port S-parameters
+
N×N×M array of complex numbers
Details
-port S-parameters returned as an array of complex numbers of the size on on , where represents the number of frequency points -port S-parameters.
Examples
Converting Y-parameters to S-parameters
Details
Let’s define a matrix of Y-parameters and convert them to S-parameters.
using EngeeRF
Y11 = 0.0488133074245012 - 0.390764155450191im
Y12 = -0.0488588365420561 + 0.390719345880018im
Y21 = -0.0487261119282660 + 0.390851884427087im
Y22 = 0.0487710062903760 - 0.390800401433241im
y_params = [Y11 Y12; Y21 Y22]
s_params=y2s(y_params)
2×2 Matrix{ComplexF64}:
0.00381839+0.0247966im 0.996111-0.0249991im
0.996392-0.0253812im 0.00374364+0.0249161im