主要内容

frequencySweep

Create frequency sweep object

Since R2025a

    Description

    Create a frequency sweep object to setup the interpolation parameters for frequency sweep with a full-wave solver.

    Creation

    Description

    h = frequencySweep creates a default interpolating sweep object.

    You can set the properties of this object only after its creation. Properties that you do not specify, retain their default values.

    For example, h = frequencySweep; h.NumFreqs = 150; creates a default frequency sweep object and sets the number of frequency points to 150.

    example

    Properties

    expand all

    Type of interpolating frequency sweep, specified as:

    • "interp" uses interpolation with the minimum possible set of points within the specified frequency range.

    • "interpWithGrad" uses a gradient-based interpolation technique to predict the next point within the specified frequency range.

    Example: "interpWithGrad"

    Data Types: string

    Maximum error tolerance in subsequent fitting iterations, specified as a negative scalar. The default error tolerance is -80 dB.

    Example: -90

    Data Types: double

    Number of points to discretize frequency range, specified as a positive integer.

    Example: 150

    Data Types: double

    Maximum number of iterations for fitting, specified as a positive integer.

    Example: 50

    Data Types: double

    Object Functions

    getRationalModelRead rational fitting parameters

    Examples

    collapse all

    Create a frequency sweep object for using a gradient-based interpolating sweep.

    h = frequencySweep;
    h.SweepType = "interpWithGrad";
    h.NumFreqs = 200;

    Create a dipole antenna. Calculate its S-parameter in the range 60 MHz to 80 MHz using frequency sweep interpolation.

    d = dipole; 
    [s,sweeptype] = sparameters(d,[60e6,80e6],SweepOption=h)
    s = 
      sparameters with properties:
    
          Impedance: 50
           NumPorts: 1
         Parameters: [1×1×200 double]
        Frequencies: [200×1 double]
    
    
    sweeptype = 
      frequencySweep with properties:
    
        SweepType: "interpWithGrad"
           ErrTol: -80
         NumFreqs: 200
         NumIters: 25
    
    

    View rational fit parameters of the interpolated sweep.

    g = getRationalModel(sweeptype)
    g = 
      rational with properties:
    
          NumPorts: 1
          NumPoles: 5
             Poles: [5×1 double]
          Residues: [1×1×5 double]
        DirectTerm: 0.0936
             ErrDB: -161.8124
    
    

    Plot the S-parameter.

    figure
    rfplot(s)

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

    Version History

    Introduced in R2025a

    See Also

    Objects

    Functions