sparameters

S-parameter object

Description

example

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

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 impedance Z0.

sobj = sparameters(filterobj,freq) calculates the S-parameters of a filter object, filterobj with the default reference impedance.

sobj = sparameters(filterobj,freq,Z0) calculates the S-parameters of a filter object, filterobj with a given reference impedance Z0.

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

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

example

sobj = sparameters(rfdataobj) extracts network data from rfdataobj and converts it into S-parameter object.

sobj = sparameters(rfcktobj) extracts network data from rfcktobj and 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(mnobj,freq,Z0,circuitindices) returns an array of S-parameter objects, one object for each circuit indicated in circuitindices.

example

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

example

sobj = sparameters(array,freq,Z0) calculates the complex s-parameters for an array object 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)

Create a resistor element R50 and add it to a circuit object example2 . Calculate the S-parameters of example2 .

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
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
          Tilt: 0
      TiltAxis: [1 0 0]
          Load: [1x1 lumpedElement]

 sparameters (h, 70e6)
ans = 
  sparameters: S-parameters object

       NumPorts: 1
    Frequencies: 70000000
     Parameters: 0.1867 - 0.0080i
      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: S-parameters object

       NumPorts: 4
    Frequencies: 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: S-parameters object

       NumPorts: 2
    Frequencies: [100x1 double]
     Parameters: [2x2x100 double]
      Impedance: 100

  rfparam(obj,i,j) returns S-parameter Sij

Input Arguments

collapse all

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

Circuit object. The function uses this input argument to calculate the S-parameters of the circuit object.

RF filter, specified as an rffilter object.

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

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

Touchstone data file, specified as a character vector, that contains network parameter data. filename can 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 specify Z0 if you are importing data from a file. The argument Z0 is optional and is stored in the Impedance property.

Matching network, specified as a matchingnetwork object.

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 a K-by-1 vector of positive real numbers sorted from smallest to largest. The function sets this property from the filename or freq input arguments.

  • Parameters — S-parameter data, specified as an N-by-N-by-K array of complex numbers. The function sets this property from the filename or data input arguments.

  • Impedance — Reference impedance in ohms, specified as a positive real scalar. The function sets this property from the filename or Z0 input arguments. If no reference impedance is provided, the function uses a default value of 50.

Introduced in R2012a