ts()

Performs a frequency-to-time transform

Syntax
y= ts(x, tstart, tstop, numtpts, dim, windowType, windowConst, nptsspec)

Arguments
Name Description Range Type Default Required
x frequency-domain data to be transformed (-∞, ∞) real yes
tstart starting time [0, ∞) integer, real 0 no
tstop stoping time [0, ∞) integer, real tstop = tstart + 2.0/fabs(freq[0]) no
numtpts number of time points [1, ∞) integer 101 no
dim dimension to be transformed (not used currently) [1, ∞) integer highest dimension no
windowType type of window to be applied to the data [0, 9]† integer, string 0 no
windowConst window constant ‡ [0, ∞) integer, real 0 no
nptsspec number of first harmonics to be transformed [1, NumFreqs] integer 1 no
† 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 (This is equivalent to the time-to-frequency transformation with normal gate shape setting in the 8510 series network analyzer.) 6 = Blackman 7 = Blackman-Harris 8 = 8510-Minimum 0 9 = 8510-Maximum 13 ‡ windowConst is not used if windowType is 8510

Examples

The following examples of ts assume that a Harmonic Balance simulation was performed with a fundamental frequency of 1 GHz and order = 8:
Y = ts(vOut)
returns the time series (0, 20ps, ... , 2ns)
Y = ts(vOut, 0, 1ns)
returns the time series (0, 10ps, ..., 1ns)
Y = ts(vOut, 0, 10ns, 201)
returns the time series (0, 50ps, ... , 10ns)
Y = ts(vOut, , , , , , , 3)
returns the time series (0, 20ps, ... , 2ns), but only uses harmonics from 1 to 3 GHz

Defined in

Built in

See Also

fft(), fs(), fspot()

Notes/Equations

Used in Harmonic Balance and Circuit Envelope simulations.
The dim argument is not used and should be left empty in the expression. Entering a value will have no impact on the results.

ts(x) returns the time domain waveform from a frequency spectrum. 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 ts(x) applies the transform to every row of the matrix. If x is three dimensional, then ts(x) is applied in the lowest dimension over the remaining two dimensions. The dimension over which to apply the transform may be specified by dimension; the default is the lowest dimension (dimension=1). ts() originated in MDS and is similar to vt().

x must be numeric. It will typically be data from a Harmonic Balance analysis.
By default, two cycles of the waveform are produced with 101 points, starting at time zero, based on the lowest frequency in the input spectrum. These may be changed by setting tstart, tstop, or numtpts.

All of the harmonics in the spectrum will be used to generate the time domain waveform. When the higher-order harmonics are known not to contribute significantly to the time domain waveform, only the first n harmonics may be requested for the transform, by setting nptsspec = n.

ts(x) can be used to process more than Harmonic Balance. For example, ts(x) can be used to convert AC simulation data to a time domain waveform using only one frequency point in the AC simulation.

Note that if the data does not have an explicit independent variable "freq", it is assumed to be starting at 0.0 and incremented in steps of 1. In some cases, this might lead to an incorrect time waveform. For example to obtain the time waveform of the second tone in a single tone analysis, using ts(Vout[2]) would give incorrect results. In this case use ts(Vout[2::3],,,,,,,1) to obtain the correct waveform.

In harmonic balance analysis if variables are swept, the data set saved has an inner most independent harmindex and a first dependent freq . In the case of argument tstop not being given the default is calculated using the dependent variable freq . But if the argument x in the ts() function is arithmetically operated or sub-indexed, the dependent freq is not maintained and in such cases the ts() function returns incorrect time values. This can be prevented by first using the ts() function on such data and then obtaining the necessary data. The example below illustrates this point.
Assume that the harmonic balance analysis has swept variable Pin . In this case the data has two independents [Pin, harmindex]. If Idd.i and Iout.i are 2 currents then the expression below:
tsERR = ts(Idd.i - Iout.i)
would return the incorrect time axis values. This can be solved by the expression:
tsWORKS = ts(Idd.i) - ts(Iout.i)
Similarly the expression:
tsERR1 = ts(Idd.i[0,::])
would return the incorrect time axis values. This can be solved by the expressions:
ts_Idd = ts(Idd.i)
ts_Idd_0 = ts_Idd[0,::]

 

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

Contents
Additional Resources