sparameters
Calculates S-parameters for radio frequency data, networks, circuits, and related objects.
| Library |
|
Syntax
Function call
-
sobj = sparameters(netparamobj)— transforms an object of network parametersnetparamobjto the S-parameter object with the calculated impedance by default.
-
sobj = sparameters(netparamobj, Z0)— transforms an object of network parametersnetparamobjinto an S-parameter object with a specified design impedanceZ0.
-
sobj = sparameters(rfdataorckt)— extracts network data fromrfdataobjorrfcktobjand converts them into an object of S-parameters.
-
sobj = sparameters(_, circuitindices)— returns an array of S-parameter objects, one object for each chain specified incircuitindices. Use this option with any combination of input arguments from the previous syntaxes.
Arguments
Input arguments
# filename — Touchstone file
+
line | character vector
Details
A Touchstone data file specified as a character vector containing data about network parameters.
#
data —
S-parameter
data
an array of complex numbers
Details
S-parameter data, specified as an array of complex numbers of the size on on .
# freq — frequencies of S-parameters
+
positive real vector
Details
The frequencies of the S-parameters are defined as a vector of positive real numbers sorted from smallest to largest.
# Z0 is the calculated impedance, ohms
+
50 | positive real scalar | positive real vector
Details
The calculated impedance in ohms is set using one of the following methods:
-
A 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 - the 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 is is equal to the number of data frequencies , , then the function sparameters assigns each element of the vector to each network port. To set the calculated impedance for each frequency in this case, specify Z0 as a three-dimensional vector of size 1 by 1 on .
Argument Z0 it cannot be specified when importing S-parameter data from a file. Argument Z0 is optional, and the function stores the resistance in the property Impedance the object sobj.
# rfobj — radio frequency object
+
RF object
Details
A radio frequency (RF) object, specified as one of the following:
-
The object of the electrical circuit diagram
circuit. -
RF Filter Object:
rffolterandlcladder. -
Transmission Line object:
txlineCoaxial,txlineCPW,txlineMicrostrip,txlineParallelPlate,txlineRLCGLine,txlineLumped,txlineTwoWire,txlineEquationBased,txlineDelayLossless,txlineDelayLossy,txlineElectricalLength,txlineStripline. -
Sequential and shunting RLC facilities:
seriesRLCandshuntRLC. -
Attenuator Object
attenuator. -
RF Antenna Object
rfantenna. -
The phase shift object
phaseshift. -
The IMT mixer object
mixerIMT. -
RF Divider object
rfdivider. -
Mutual inductance object
mutualInductor.
# netparamobj — object of network parameters
+
the object of network parameters
Details
An object of network parameters of the following types: sparameters, yparameters, zparameters, gparameters, hparameters, abcdparameters and tparameters.
# rfdataorktt — RF data object or schema
+
RF data object | RF network object
Details
An RF data object or schema. Specify rfdataobj as an object rfdata.data or rfdata.network, or specify rfcktobj like any analyzed object of the type rfckt For example, rfckt.amplifier or rkckt.cascade.
# mnobj — matching circuit
+
the object of the matching scheme
Details
Matching scheme specified as an object matchingnetwork.
| Типы данных |
|
# circuitindices — index of the matching circuit
+
scalar
Details
The index of the matching scheme, set as a scalar.
| Типы данных |
|
Output arguments
# sobj — S-parameter data
+
the S-parameter object
Details
S-parameter data returned as an object. The object contains the following properties:
-
NumPorts— the number of ports as an integer. The function calculates this value automatically when creating an object. -
Frequencies— frequencies of S-parameters in the form of a vector of size There are 1 positive real numbers sorted from smallest to largest. The function sets this property based on the argumentsfilenameorfreq. -
Parameters— S-parameter data in the form of an array of complex numbers of the size on on . The function sets this property based on the argumentsfilenameordata. -
Impedance— the calculated impedance in ohms in the form of a positive real scalar. The function sets this property based on the argumentsfilenameorZ0. If the calculated impedance is not specified, the function uses the default value.50.
Examples
Calculation of S-parameters for a schema object
Details
Create a resistor R50 and add it to the schema object. example1. Calculate the S-parameters for example1 and output the properties of the S-parameter object.
using EngeeRF
hR1 = resistor(50,"R50")
hckt1 = circuit("example1")
add(hckt1,[1 2],hR1)
setports(hckt1, [1 0],[2 0])
freq = range(1e3, 2e3, length=100)
S = sparameters(hckt1,freq,100)
println("NumPorts - ", S.NumPorts)
println("Parameters - ", summary(S.Parameters))
println("Frequencies - ", summary(S.Frequencies))
println("Impedance - ", S.Impedance)
NumPorts - 2
Parameters - 2×2×100 Array{Float64, 3}
Frequencies - 100-element StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}
Impedance - 100