Main Content

sparameters

S-parameter object

Description

example

sobj= sparameters(filename)creates an S-parameter objectsobjby importing data from the Touchstone file specified byfilename.

sobj= sparameters(data,freq)creates an S-parameter object from the S-parameter data,data, and frequencies,freq.

sobj= sparameters(data,freq,Z0)creates an S-parameter object from the S-parameter data,data, and frequencies,freq, with a given reference impedanceZ0.

sobj= sparameters(rfobj,freq)calculates the S-parameters of a RF object such as a filter object, circuit object, transmission line object, series RLC object, shunt RLC object, attenuator object or RF antenna object with the default reference impedance.

example

sobj= sparameters(rfobj,freq,Z0)calculates the S-parameters of a RF object such as a filter object, circuit object or transmission line object with a given reference impedanceZ0.

sobj= sparameters(netparamobj)converts the network parameter object,netparamobj, to S-parameter object with the default reference impedance.

example

sobj= sparameters(netparamobj,Z0)converts the network parameter object,netparamobj, to S-parameter object with a given reference impedance,Z0.

example

sobj= sparameters(rfdataorckt)extracts network data fromrfdataobjorrfcktobjand converts it into S-parameter object.

sobj= sparameters(mnobj)returns the S-parameters of the best created matching network, evaluated at a frequency list constructed from source and load impedance.

sobj= sparameters(mnobj,freq)returns the S-parameters of the best created matching network at each specified frequency.

sobj= sparameters(mnobj,freq,Z0)returns the S-parameters of the best created matching network at each specified frequency and characteristic impedance,Z0.

example

sobj= sparameters(___,circuitindices)returns an array of S-parameter objects, one object for each circuit indicated incircuitindices. Use this option with any of the input argument combinations in the previous syntaxes.

example

sobj= sparameters(antenna,freq,Z0)calculates the complex s-parameters for anantennaobject over specified frequency values and for a given reference impedance,Z0.

example

sobj= sparameters(array,freq,Z0)calculates the complex s-parameters for anarrayobject over specified frequency values and for a given reference impedance,Z0.

Examples

collapse all

Extract S-parameters from file default.s2p and plot it.

S = sparameters('default.s2p'); disp(S)
sparameters: S-parameters object NumPorts: 2 Frequencies: [191x1 double] Parameters: [2x2x191 double] Impedance: 50 rfparam(obj,i,j) returns S-parameter Sij
rfplot(S)

Figure contains an axes. The axes contains 4 objects of type line. These objects represent dB(S_{11}), dB(S_{21}), dB(S_{12}), dB(S_{22}).

Create a resistor element R50 and add it to a circuit objectexample2. Calculate the S-parameters ofexample2.

hR1 = resistor(50,'R50'); hckt1 = circuit('example2'); add(hckt1,[1 2],hR1) setports (hckt1, [1 0],[2 0]) freq = linspace (1e3,2e3,100); S = sparameters(hckt1,freq,100); disp(S)
sparameters: S-parameters object NumPorts: 2 Frequencies: [100x1 double] Parameters: [2x2x100 double] Impedance: 100 rfparam(obj,i,j) returns S-parameter Sij

Extract Y-parameters from file default.s2p. Convert the resulting Y-parameters to S-parameters.

Y1 = yparameters('default.s2p'); S1 = sparameters(Y1,100); disp(Y1)
yparameters: Y-parameters object NumPorts: 2 Frequencies: [191x1 double] Parameters: [2x2x191 double] rfparam(obj,i,j) returns Y-parameter Yij
disp(S1)
sparameters: S-parameters object NumPorts: 2 Frequencies: [191x1 double] Parameters: [2x2x191 double] Impedance: 100 rfparam(obj,i,j) returns S-parameter Sij
file ='default.s2p'; h = read(rfdata.data, file); S = sparameters(h)
S = sparameters: S-parameters object NumPorts: 2 Frequencies: [191x1 double] Parameters: [2x2x191 double] Impedance: 50.0000 + 0.0000i rfparam(obj,i,j) returns S-parameter Sij

Calculate the complex s-parameters for a default dipole at 70MHz frequency.

h = dipole
h = dipole with properties: Length: 2 Width: 0.1000 FeedOffset: 0 Conductor: [1x1 metal] Tilt: 0 TiltAxis: [1 0 0] Load: [1x1 lumpedElement]
sparameters (h, 70e6)
ans = sparameters: S-parameters object NumPorts: 1 Frequencies: 70000000 Parameters: 0.1887 - 0.0045i Impedance: 50 rfparam(obj,i,j) returns S-parameter Sij

Calculate the complex s-parameters for a default rectangular array at 70MHz frequency.

h = rectangularArray; sparameters(h,70e6)
ans = sparameters:的参数对象NumPorts: 4Frequencies: 70000000 Parameters: [4x4 double] Impedance: 50 rfparam(obj,i,j) returns S-parameter Sij

This example shows how to calculate the S-Parameters for a newly created matching network for the auto-generated circuit #2 with a reference impedance of 100 Ohm.

n = matchingnetwork('LoadImpedance', 100,'Components',3); freq = linspace(n.CenterFrequency-n.Bandwidth/2,n.CenterFrequency+n.Bandwidth/2); RefZ0 = 100; ckt_no = 2; s = sparameters(n,freq,RefZ0,ckt_no)
s = sparameters:的参数对象NumPorts: 2 Frequencies: [100x1 double] Parameters: [2x2x100 double] Impedance: 100 rfparam(obj,i,j) returns S-parameter Sij

Create an RLCG transmission line using the these specifications:

  • Resistor : 100 ohms

  • Capacitor : 1 pF

rlcglinetxline = txlineRLCGLine('R', 100,'C',1e-12)
rlcglinetxline = txlineRLCGLine: RLCGLine element Name: 'RLCGLine' Frequency: 1.0000e+09 R: 100 L: 0 C: 1.0000e-12 G: 0 IntpType: 'Linear' LineLength: 0.0100 Termination: 'NotApplicable' StubMode: 'NotAStub' NumPorts: 2 Terminals: {'p1+' 'p2+' 'p1-' 'p2-'}

Calculate the S-parameters of the transmission line at 1 GHz.

sparam = sparameters(rlcglinetxline,1e9);

Input Arguments

collapse all

S-parameter data, specified as an array of complex numbers, of sizeN-by-N-by-K.

RF object, specified as one of the following:

Circuit object circuit
RF Filter object rffilter
Transmission line objects txlineCoaxial,txlineMicrostrip,txlineCPW,txlineParallelPlate,txlineRLCGLine,txlineTwoWire,txlineEquationBased,txlineDelayLossless, andtxlineDelayLossy
Series and Shunt RLC objects seriesRLC, andshuntRLC
Attenuator object attenuator
RF antenna object rfantenna

Network parameter object. The network parameter objects are of the type:sparameters,yparameters,zparameters,gparameters,hparameters,abcdparameters, andtparameters.

Example:S1 = sparameters(Y1,100).Y1is a parameter object. This example converts Y-parameters to S-parameters at100ohms.

Touchstone data file, specified as a character vector, that contains network parameter data.filenamecan be the name of a file on the MATLAB®path or the full path to a file.

Example:sobj = sparameters('defaultbandpass.s2p');

Antenna object, specified as a scalar handle.

Array object, specified as a scalar handle.

S-parameter frequencies, specified as a vector of positive real numbers, sorted from smallest to largest.

Reference impedance in ohms, specified as a positive real scalar. You cannot specifyZ0if you are importing data from a file. The argument Z0 is optional and is stored in theImpedanceproperty.

RF data or circuit object. Specifyrfdataobjas eitherrfdata.data, orrfdata.networkobject or specifyrfcktobjas any analyzedrfckttype object, such asrfckt.amplifier,rkckt.cascadeobject.

Matching network, specified as amatchingnetworkobject.

Data Types:char|string

Index of the matching network circuit, specified as a scalar.

Data Types:double

Output Arguments

collapse all

S-parameter data, returned as an object.disp(sobj)returns the properties of the object:

  • NumPorts— Number of ports, specified as an integer. The function calculates this value automatically when you create the object.

  • Frequencies— S-parameter frequencies, specified as aK-by-1 vector of positive real numbers sorted from smallest to largest. The function sets this property from thefilenameorfreqinput arguments.

  • Parameters— S-parameter data, specified as anN-by-N-by-Karray of complex numbers. The function sets this property from thefilenameordatainput arguments.

  • Impedance— Reference impedance in ohms, specified as a positive real scalar. The function sets this property from thefilenameorZ0input arguments. If no reference impedance is provided, the function uses a default value of50.

Introduced in R2012a