Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

sparameters

S-parameter object

Syntax

sobj = sparameters(filename)
sobj = sparameters(data,freq)
sobj = sparameters(cktobj,freq,Z0)
sobj = sparameters(netparamobj,freq,Z0)
sobj = sparameters(obj)
sobj = sparameters(__,Z0)
sobj = sparameters(rftbxobj)

Description

sobj = sparameters(filename) creates an S-parameter object obj by importing data from the Touchstone file specified by filename. All data is stored in real or imaginary format.

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

sobj = sparameters(cktobj,freq,Z0) calculates the S-parameters of a circuit object.

sobj = sparameters(netparamobj,freq,Z0) converts other network parameter object, netparamobj, to S-parameter object.

sobj = sparameters(obj) copies the contents of s-parameter object, sobj.

sobj = sparameters(__,Z0) creates an S-parameter object with a new impedance of Z0.

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

Examples

Extract and Plot the S-Parameters of File

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

S = sparameters('default.s2p');
disp(S)
rfplot(S)
  sparameters: S-parameters object

       NumPorts: 2
    Frequencies: [191x1 double]
     Parameters: [2x2x191 double]
      Impedance: 50

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

Calculate the S-Parameters of Circuit Object

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

Convert Y-Parameters to S-Parameters

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)
disp(S1)
  yparameters: Y-parameters object

       NumPorts: 2
    Frequencies: [191x1 double]
     Parameters: [2x2x191 double]

  rfparam(obj,i,j) returns Y-parameter Yij

  sparameters: S-parameters object

       NumPorts: 2
    Frequencies: [191x1 double]
     Parameters: [2x2x191 double]
      Impedance: 100

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

Convert RF Data Object to S-parameters

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

Input Arguments

collapse all

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

Circuit object, specified as scalar handle object. The function uses this input argument to calculate the S-parameters of the circuit object.

Example: sobj = sparameters(hckt1, freq, 100);

Network parameter object, specified as scalar handle object. The network parameter objects are of the type: S, Y, Z, ABCD, G, H, and T.

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');

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.

When making a deep copy of an S-parameter object, this input argument is not supported. To change the reference impedance of an S-parameters object, use newref.

Network object, specified as scalar handle. Specify rftbxobj as one of the following types: rfdata.data, rfdata.network, and any analyzed rfckt type.

Example: sobj = sparameters(rfdata.data);

Output Arguments

collapse all

S-parameter data, returned as a scalar handle. disp(hs) 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 before R2006a

Was this topic helpful?