fspot()

Performs a single-frequency time-to-frequency transform

Syntax
y = fspot(x, fund, harm, windowType, windowConst, interpOrder, tstart)

Arguments
Name Description Range Type Default Required
x time domain signal (-∞, ∞) real yes
fund period 1/fund for the Fourier transform [1, ∞) real period that matches the length of the independent axis of x no
harm harmonic number † [1, ∞) integer 1 no
windowType type of window to apply to the data [0, 9]‡ integer, string 0 no
windowConst window constant ‡ † [0, ∞) real 1 no
interpOrder interpolation scheme [1, 3]‡ ‡ integer no
tstart start time [0, ∞) real 1 no
† harm=0 will compute the dc component of x. ‡ The window types and their default constants are: 0 = None 1 = Hamming 0.54 2 = Hanning 0.50 3 = Gaussian 0.75 4 = Kaiser 7.865 5 = 8510 6.0 6 = Blackman 7 = Blackman-Harris 8 = 8510-Minimum 0 9 = 8510-Maximum 13 windowType can be specified either by the number or by the name. ‡ † windowConst is not used if windowType is 8510 ‡ ‡ If the tranorder variable is not present, or if the user wishes to override the interpolation scheme, then interpOrder may be set to a nonzero value: 1 = use only linear interpolation 2 = use quadratic interpolation 3 = use cubic polynomial interpolation

Examples

The following example equations assume that a transient simulation was performed from 0 to 5 ns on a 1-GHz-plus-harmonics signal called vOut.
y = fspot(vOut)
returns the 200-MHz component, integrated from 0 to 5 ns
y = fspot(vOut, , 5)
returns the 1-GHz component, integrated from 0 to 5 ns
y = fspot(vOut, 1GHz, 1)
returns the 1-GHz component, integrated from 4 to 5 ns
y = fspot(vOut, 0.5GHz, 2, , , , 2.5ns)
returns the 1-GHz component, integrated from 2.5 to 4.5 ns
y = fspot(vOut, 0.25GHz, 4, "Kaiser")
returns the 1-GHz component, integrated from 1 to 5 ns, after applying the default Kaiser window to this range of data
y = fspot(vOut, 0.25GHz, 4, 3, 2.0)
returns the 1-GHz component, integrated from 1 to 5 ns, after applying a Gaussian window with a constant of 2.0 to this range of data

Defined in

Built in

See Also

fft(), fs()

Notes/Equations

fspot(x) returns the discrete Fourier transform of the vector x evaluated at one specific frequency. The value returned is the peak component, and it is complex. The harmth harmonic of the fundamental frequency fund is obtained from the vector x. The Fourier transform is applied from time tstop-1/fund to tstop, where tstop is the last timepoint in x.

When x is a multidimensional vector, the transform is evaluated for each vector in the specified dimension. For example, if x is a matrix, then fspot(x) applies the transform to every row of the matrix. If x is three dimensional, then fspot(x) is applied in the lowest dimension over the remaining two dimensions. The dimension over which to apply the transform may be specified by dim; the default is the lowest dimension (dim=1). x must be numeric. It will typically be data from a transient, signal processing, or envelope analysis.
By default, the transform is performed at the end of the data from tstop-1/fund to tstop. By using tstart, the transform can be started at some other point in the data. The transform will then be performed from tstart to tstart+1/fund.
Unlike with fft() or fs(), the data to be transformed are not zero padded or resampled. fspot() works directly on the data as specified, including non-uniformly sampled data from a transient simulation.

Transient simulation uses a variable timestep and variable order algorithm. The user sets an upper limit on the allowed timestep, but the simulator will control the timestep so the local truncation error of the integration is controlled. If the Gear integration algorithm is used, the order can also be changed during simulation. fspot() can use all of this information when performing the Fourier transform. The time data are not resampled; the Fourier integration is performed from timestep to timestep of the original data.

When the order varies, the Fourier integration will adjust the order of the polynomial it uses to compute the shape of the data between timepoints.
This variable order integration depends on the presence of a special dependent variable, tranorder, which is output by the transient simulator. If this variable is not present, or if the user wishes to override the interpolation scheme, then interpOrder may be set to a nonzero value.

Only polynomials of degree one to three are supported. The polynomial is fit because time domain data are obtained by integrating forward from zero; previous data are used to determine future data, but future data can never be used to modify past data.

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources