Define Traces Using Range Functions (2D and Circuit)
Range Functions are special functions that use a 2D dataset as input, along with 0 or more additional parameters. Range functions can be used to produce a user-created 2D report display that is a collection of traces and their attributes. The trace collection and attributes are used to generate a portion of a report-definition that generates a family of curves in the report window.
Range Functions can be applied to a range (subset) of points on an X-Y plot, then calculates a single-number representation of the specified range, and display that number directly over a plotted wave-form. Range functions can be used to extract trace characteristics (such as max, min, overshoot) from a plot and use those values for additional plotting, or use the values for exporting to a file, where the data table formats are supported. Range Functions are listed in the Reporter window and Output Variable window for users to employ. Extracted trace characteristics may also be used in optimetrics.
For example, with a wave-form in a transient plot that contains a square pulse, a range function can calculate and display a single value that represents the High-to-Low/Low-to-High transition states. Or, with a plot that shows a pulse, the PulseWidth and RiseTime Range Functions can use the entire plotted curve to calculate a single number that represents the width or rise-time, and display that single-number representation directly over the specified range of plotted points.
- Range functions trace characteristics are displayed on the report window as a column in legend window
- Range functions are available from reporter and optimetrics
- Numerous range functions are available in the following categories:
— Pulse width functions
— Overshoot/Undershoot functions
— TR & DC functions
— Error functions
— Period functions
— Radiation functions
For all range functions, the second parameter is assumed to be a sweep variable, and if it is not, the following error message results: “Second parameter to functions that apply to a range of values must be a sweep variable ”. You receives this message if you create a range function where the second parameter is a non-variable, such as deriv(dB(S11),dB(S12)). Whereas deriv(dB(S11),F) is acceptable.
Define Traces Using Range Functions

Trace Characteristics

The following table lists the available Range Functions:
Range Function |
Category |
Description |
Parameter(s) |
avg |
Math |
Average of first param over the second param. |
N/A |
avgabs |
Math |
Returns the mean of the absolute value of the selected quantity. |
N/A |
bandwidth |
AC |
Returns the bandwidth of the selected simulation quantity in Hz. |
Base Gain: Ref AC magnitude; Base phase: Ref phase angle |
cang_deg |
TR & DC |
Cumulative angle of the first param in degrees, along the second param (typically sweep variable). Returns double. |
N/A |
cang_rad |
TR & DC |
Cumulative angle of the first param in radians, along the second param (typically sweep variable). Returns double. |
N/A |
crestfactor |
TR & DC |
Returns the crest factor (peak/RMS) for the selected quantity. |
N/A |
deadtime |
TR & DC |
Obtains the latest time when the qtyl is within a tolerance of zero. |
Tolerance:The +/- bandwidth around 0 |
delaytime |
TR & DC |
Obtains the time from zero to 50% of the target point. |
Target: The target value for input |
deriv |
TR & DC |
Derivative of a given param |
N/A |
distortion |
TR & DC |
Returns the total distortion for the selected simulation quantity and an additional argument frequency, which is the frequency in Hz at which to calculate the fundamental RMS of the simulation quantity. |
Frequency: Freq in Hz at which to calculate the RMS of the qty |
duty |
TR & DC |
Duty cycle measurement. |
N/A |
eyeheight |
TR & DC |
Eye-diagram characteristics. |
N/A |
eyejitter |
TR & DC |
Eye-diagram characteristics. |
N/A |
eyewidth |
TR & DC |
Eye-diagram characteristics. |
N/A |
FFT |
Math |
Fast Fourier Transform. Returns output signal. |
Incoming signal. |
formfactor |
TR & DC |
Returns the form factor (RMS/Mean Absolute Value) for the selected quantity. |
N/A |
fundamentalmag |
TR & DC |
Returns the RMS value of the fundamental frequency for the selected quantity and an additional argument frequency, which specifies the fundamental frequency. |
Frequency: Freq in Hz at which to calculate the RMS of the qty |
gaincrossover |
AC |
Returns the gain crossover frequency (where the gain is 0 dB) of the selected simulation quantity in Hz. |
Base Gain: Ref AC magnitude; Base phase: Ref phase angle |
gainmargin |
AC |
Returns the gain margin in dB at the phase crossover frequency of the selected simulation quantity. |
Base Gain: Ref AC magnitude; Base phase: Ref phase angle |
iae |
Error |
Returns the integral of the absolute deviation of the selected quantity from a target value that is entered via the additional argument. |
Target: Target value |
integ |
Math |
Integral of the selected quantity. Uses trapezoidal area. |
N/A |
integabs |
Math |
Returns the integral of the absolute value of the selected qty. |
N/A |
ise |
Error |
Returns the integral of the squared deviation of the selected quantity from a target value that is entered via an additional argument. |
Target: Target value |
itae |
Error |
Returns the time-weighted absolute deviation of the selected quantity from a target value that is entered via an additional argument. |
Target: Target value |
itse |
Error |
Returns the time-weighted squared deviation of the selected qty from a target value that is entered via an additional argument. |
Target: Target value |
lowercutoff |
AC |
Returns the lower 3dB frequency of the selected simulation channel in Hz. |
Base Gain: Ref AC magnitude; Base phase: Ref phase angle |
max |
Math |
Maximum (of magnitudes).
|
N/A
|
min |
Math |
Minimum (of magnitudes). |
N/A |
overshoot |
Overshoot/Undershoot
|
Calculates peak overshoot given a threshold value and number of evenly spaced points over entire time range.
|
Threshold: The reference value from where the overshoot/undershoot is calculated; Number of Points: Number of evenly spaced time points
|
peakgain |
AC |
Returns the peak gain of the selected simulation quantity in dB. |
Base Gain: Ref AC magnitude; Base phase: Ref phase angle |
peakgainfreq |
AC |
Returns the frequency in Hz at which the peak gain of the selected simulation quantity occurs. |
Base Gain: Ref AC magnitude; Base phase: Ref phase angle |
per
|
Period
|
Calculates period.
|
Threshold:Y transition value which determines the period; Number of Points: Number of evenly spaced time points
|
phasecrossover |
AC |
Returns the phase crossover freq, at which the phase is -180 degrees, in Hz for the selected simulation quantity. |
Base Gain: Ref AC magnitude; Base phase: Ref phase angle |
phasemargin |
AC |
Returns the phase angle in degrees at the gain crossover frequency of the selected simulation quantity. |
Base Gain: Ref AC magnitude; Base phase: Ref phase angle |
pk2pk |
Math |
Difference between max and min of the first param over the second param. Returns the peak-to-peak value for the selected simulation quantity. |
N/A |
pkavg |
Math |
Returns the ratio of the peak to peak-to-average for the selected quantity. |
N/A |
pmax |
Period |
Maximum period of input stream. |
Threshold:Y transition value which determines the period; Number of Points: Number of evenly spaced time points |
pmin |
Period |
Minimum period of input stream. |
Threshold:Y transition value which determines the period; Number of Points: Number of evenly spaced time points |
prms |
Period |
Rms of period of input stream. |
Threshold:Y transition value which determines the period; Number of Points: Number of evenly spaced time points |
pulsefall9010 |
Pulse Width |
Returns the pulse fall time of the selected quantity derived from estimates of the signal at 90% and 10% of its peak value. |
N/A |
pulsefront1090 |
Pulse Width |
Returns the pulse front time of the selected quantity derived from estimates of the signal at 10% and 90% of its peak value. |
N/A |
pulsefront3090 |
Pulse Width |
Returns the pulse front time of the selected quantity derived from estimates of the signal at 30% and 90% of its peak value. |
N/A |
pulsemax |
Pulse Width |
Returns the pulse maximum on the front and tail estimates for the selected quantity. |
N/A |
pulsemaxtime |
Pulse Width |
Returns the time at which the maximum pulse value of the selected quantity is reached. |
N/A |
pulsemin |
Pulse Width |
Returns the pulse minimum on the front and tail estimates for the selected quantity. |
N/A |
pulsemintime |
Pulse Width |
Returns the time at which the minimum pulse value of the selected quantity is reached. |
N/A |
pulsetail50 |
Pulse Width |
Returns the pulse tail time of the selected quantity on the virtual peak to 50%. |
N/A |
pulsewidth5050 |
Pulse Width |
Returns the pulse width of the selected quantity as measured on the 50% points on the pulse front and pulse tail. |
N/A |
pw_minus |
Pulse Width |
Pulse width of the first negative pulse. |
Threshold:Y transition value which determines the pulse width ; Number of Points: Number of evenly spaced time points |
pw_minus_avg |
Pulse Width |
Average of the negative pulse width input stream. |
Threshold:Y transition value which determines the pulse width ; Number of Points: Number of evenly spaced time points |
pw_minus_max |
Pulse Width |
Max. Pulse width of the negative pulse of input stream. |
Threshold:Y transition value which determines the pulse width ; Number of Points: Number of evenly spaced time points |
pw_minus_min |
Pulse Width |
Min. Pulse width of the negative pulse of input stream. |
Threshold:Y transition value which determines the pulse width ; Number of Points: Number of evenly spaced time points |
pw_minus_rms |
Pulse Width |
RMS of the negative pulse width input stream. |
Threshold:Y transition value which determines the pulse width ; Number of Points: Number of evenly spaced time points |
pw_plus |
Pulse Width |
Pulse width of first positive pulse. |
Threshold:Y transition value which determines the pulse width ; Number of Points: Number of evenly spaced time points |
pw_plus_avg |
Pulse Width |
Average of the positive pulse width input stream. |
Threshold:Y transition value which determines the pulse width ; Number of Points: Number of evenly spaced time points |
pw_plus_max |
Pulse Width |
Max. Pulse width of the positive pulse of input stream. |
Threshold:Y transition value which determines the pulse width ; Number of Points: Number of evenly spaced time points |
pw_plus_min |
Pulse Width |
Min. Pulse width of the positive pulse of input stream. |
Threshold:Y transition value which determines the pulse width ; Number of Points: Number of evenly spaced time points |
pw_plus_rms |
Pulse Width |
RMS of the positive pulse width input stream. |
Threshold:Y transition value which determines the pulse width ; Number of Points: Number of evenly spaced time points |
ripple |
Math |
Returns the ripple factor (AC RMS/Mean) for the selected quantity. |
N/A |
risetime |
TR & DC |
Obtains the time taken to go from 10% to 90% of target point. |
Target: The target value for input |
rms |
Math |
Returns total RMS of the selected quantity. |
N/A |
rmsAC |
Math |
Returns the AC RMS for the selected quantity |
N/A |
settlingtime |
TR & DC |
Returns the latest time at which the value of the selected simulation quantity fell outside its tolerance band. The target value of the quantity and the +/- bandwidth of the tolerance band are the additional args. |
Target; Tolerance |
undershoot |
Overshoot/Undershoot |
Calculates peak undershoot given a threshold value and number of evenly spaced points over entire time range. |
Threshold: The reference value from where the overshoot/undershoot is calculated; Number of Points: Number of evenly spaced time points |
uppercutoff |
AC |
Returns the upper 3dB frequency of the selected simulation channel in Hz. |
Base Gain: Ref AC magnitude; Base phase: Ref phase angle |
XAtYMax |
Math |
Returns the X value at maximum Y. |
N/A |
XAtYMin |
Math |
Returns the X value at minimum Y. |
N/A |
XAtYVal |
Math |
Returns the X value at the first occurrence of Y value. |
Y Value: Y value at which to find X |