This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

sparameters

S-parameter object

Syntax

sobj = sparameters(filename)
sobj = sparameters(data,freq)
sobj = sparameters(data,freq, Z0)
sobj = sparameters(filterobj,freq)
sobj = sparameters(filterobj,freq,Z0)
sobj = sparameters(circuitobj,freq)
sobj = sparameters(circuitobj,freq,Z0)
sobj = sparameters(netparamobj)
sobj = sparameters(netparamobj, Z0)
sobj = sparameters(rfdataobj)
sobj = sparameters(rfcktobj)
sobj = sparameters(mnobj)
sobj = sparameters(mnobj,freq)
sobj = sparameters(mnobj,freq,Z0)
sobj = sparameters(mnobj,freq,Z0,circuitindices)
sobj = sparameters(antenna,freq,Z0)
sobj = sparameters(array,freq,Z0)

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(circuitobj,freq) calculates the S-parameters of a circuit object with the default reference impedance.

example

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

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(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 and characteristic impedance.

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

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

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

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

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

       NumPorts: 1
    Frequencies: 70000000
     Parameters: 0.1866 - 0.0092i
      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

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.

RF data object. Specify rfdataobj as either rfdata.data, or rfdata.network object.

RF network object. Specify rfcktobj as any analyzed rfckt type object, such as rfckt.amplifier, rkckt.cascade object.

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