Contenido principal

sparameters

R2026b

S-parameters for antenna or array

    Description

    sobj = sparameters(object,freq) calculates the complex S-parameter for an antenna or array over specified frequency values.

    example

    [___] = sparameters(___,Z0) calculates the complex S-parameter of antenna or array using Z0 reference impedance.

    [___] = sparameters(___,UseParallel=true) uses the parallel pool to calculate S-parameter of antenna or array for each frequency. To use this feature, you need a Parallel Computing Toolbox™ license.

    [___,sweepobj] = sparameters(___,SweepOption=Value) uses the specified frequency sweep interpolation method to calculate S-parameters of antenna or array, and returns the type of interpolation method and rational fit parameters in addition to the calculated S-parameters.

    example

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

    example

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

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

    Examples

    collapse all

    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: [1×1 metal]
              Tilt: 0
          TiltAxis: [1 0 0]
              Load: [1×1 lumpedElement]
    
    
     sparameters(h,70e6)
    ans = 
      sparameters with properties:
    
          Impedance: 50
           NumPorts: 1
         Parameters: 0.1872 - 0.0028i
        Frequencies: 70000000
    
    

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

    h = rectangularArray
    h = 
      rectangularArray with properties:
    
               Element: [1×1 dipole]
                  Size: [2 2]
            RowSpacing: 2
         ColumnSpacing: 2
               Lattice: 'Rectangular'
        AmplitudeTaper: 1
            PhaseShift: 0
                  Tilt: 0
              TiltAxis: [1 0 0]
    
    
    s = sparameters(h,70e6);
    s.Parameters
    ans = 4×4 complex
    
       0.3044 - 0.0811i  -0.0579 - 0.2369i  -0.0580 - 0.2369i  -0.0248 - 0.0707i
      -0.0579 - 0.2369i   0.3045 - 0.0812i  -0.0248 - 0.0707i  -0.0580 - 0.2370i
      -0.0580 - 0.2369i  -0.0248 - 0.0707i   0.3044 - 0.0811i  -0.0579 - 0.2369i
      -0.0248 - 0.0707i  -0.0580 - 0.2370i  -0.0579 - 0.2369i   0.3045 - 0.0812i
    
    

    Extract S-parameters from corrugatedconicalhorn.s2p touchstone file.

    sobj = sparameters("corrugatedconicalhorn.s2p");
    display(sobj)
    sobj = 
      sparameters with properties:
    
          Impedance: 50
           NumPorts: 1
         Parameters: [1×1×11 double]
        Frequencies: [11×1 double]
    
    

    Plot the S-parameters data using rfplot function.

    rfplot(sobj)

    Figure contains an axes object. The axes object with xlabel Frequency (GHz), ylabel Magnitude (dB) contains an object of type line. This object represents dB(S_{11}).

    This example compares S-parameter calculations using full-frequency and interpolated sweep methods.

    Create Antenna

    Use the design function to create a microstrip patch antenna operating at a frequency of 1.9 GHz.

    antenna = design(patchMicrostrip,1.9e9);

    Calculate S-parameters

    Calculate S-parameters of the antenna using three sweep options, over a frequency range of 1.8 GHz to 2.2 GHz.

    First use a full-frequency sweep with 100 frequency points. Observe the computation time.

    freq = linspace(1.8e9,2.2e9,100);
    tic
    Sfull = sparameters(antenna,freq,SweepOption="direct");
    toc
    Elapsed time is 118.265701 seconds.
    

    Next, use interpolated frequency sweep. Observe the computation time.

    freqinterp = [1.8e9, 2.2e9];
    tic
    Sinterp = sparameters(antenna,freqinterp,SweepOption="interp");
    toc
    Elapsed time is 12.907425 seconds.
    

    Next, use interpolation-with-gradient frequency sweep. Observe the computation time.

    tic
    Sinterpgrad = sparameters(antenna,freqinterp,SweepOption="interpWithGrad");
    toc
    Elapsed time is 13.539956 seconds.
    

    Visualize S-parameters

    Plot the S11 of all three calculation methods.

    figure
    rfplot(Sfull,1,1,'o');
    hold on
    rfplot(Sinterp,1,1,'+');
    rfplot(Sinterpgrad,1,1,'*');
    hold off

    Figure contains an axes object. The axes object with xlabel Frequency (GHz), ylabel Magnitude (dB) contains 3 objects of type line. One or more of the lines displays its values using only markers These objects represent dB(S_{11}).

    Input Arguments

    collapse all

    Antenna or array to calculate S-parameters, specified as one of the following options:

    Example: dipole

    Example: linearArray

    Example: array(pcbStack,"linear")

    Frequency to calculate S-parameters, specified as a scalar for a single frequency or a vector for a frequency range in Hertz. For vector frequencies, specify the values in lowest to highest order.

    You must specify this argument as a two or more element vector when using frequency sweep interpolation. Elements of this vector represent the frequency range of interest.

    Example: [500e6 550e6 600e6]

    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.

    S-parameter data, specified as an array of complex numbers, of size N-by-N-by-K where K represents number of frequency points.

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

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

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: UseParallel=true

    Option to enable parallel pool, specified as a logical value. The default value is false. Set the flag to true or 1 to enable the parallel pool. Use parallel pool to speedup the S-parameter calculations at multiple frequencies for computationally large antennas and arrays. To use this feature, you need a license to the Parallel Computing Toolbox.

    Example: UseParallel=true

    Data Types: logical

    Sweep interpolation method, specified as one of the following:

    • "direct" — Uses all the specified frequencies to compute S-parameters

    • "interp" — Interpolates sweep using rational fitting to compute S-parameters with minimum possible set of frequency points within the specified frequency range

    • "interpWithGrad" — Interpolates sweep using rational fitting with gradient calculations to compute S-parameters with minimum possible set of frequency points within the specified frequency range

    • frequencySweep object — Interpolates sweep using manually set parameters such as error tolerance, number of frequency points, and number of iterations

    Frequency sweep interpolation methods use rational fitting to interpolate results over the frequency range defined by two or more specified frequency points.

    When you use an interpolating sweep, the frequencies at which the sparameters function computes the results can differ from the frequencies in the input frequency vector. The effective set of frequencies depends on SweepOption:

    • If SweepOption is a frequencySweep object, the effective frequencies are determined by its NumFreqs property.

    • If SweepOption is "interp" or "interpWithGrad", the number of frequency points depends on how many frequencies you provide:

      • If you provide more than 30 frequencies, the sweep uses your frequencies directly.

      • If you provide 30 or fewer frequencies, the sweep uses the default of 100 points across the band.

    Sweep Interpolation Methods

    MethodWhen to UseTrade-off
    "direct"Results at all specified frequenciesHigh computational cost; slow for large sweeps
    "interp"Faster results with automatic accuracy control and fewer simulationsNo control over number of frequency points
    "interpWithGrad"Faster results with gradient information for optimizationSlightly more expensive than "interp"
    frequencySweep objectManual control over frequency resolution, error tolerance, and number of iterationsRequires manual tuning; no adaptive refinement

    To use this feature, you need an RF Toolbox™ license.

    Example: s = sparameters(patchMicrostrip,[0.8e9,1.2e9],SweepOption="interp")

    Data Types: string

    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.

    Frequency sweep interpolation parameters, returned as a frequencySweep object.

    Tips

    • Interpolating frequency sweeps may report results at frequencies that differ from the frequencies you specify. If you require results at exact frequencies, either use the default direct sweep, or set the NumFreqs property of the frequencySweep object greater than or equal to the number of frequencies you provide.

    • When using the "interp" or "interpWithGrad" sweep options, provide more than 30 frequency points to have the sweep use your frequency resolution exactly; otherwise the sweep defaults to 100 points across the band.

    References

    [1] Yuan, Hao-Bo, Wen-Tao Bao, Chung Hyun Lee, Brian F. Zinser, Salvatore Campione, and Jin-Fa Lee. “A Method of Moments Wide Band Adaptive Rational Interpolation Method for High-Quality Factor Resonant Cavities.” IEEE Transactions on Antennas and Propagation 70, no. 5 (2022): 3595–604. https://doi.org/10.1109/TAP.2022.3142281.

    Version History

    Introduced in R2015a

    expand all