Using the .FFT Statement

The general form of the .FFT statement is shown below. The parameters are described in .FFT Statement Parameters.

Syntax
.FFT <output_var> <START=value> <STOP=value> <NP=value>
+ <FORMAT=keyword> <WINDOW=keyword> <ALFA=value> <FREQ=value>
+ <FMIN=value> <FMAX=value>

 

Table 28-2: .FFT Statement Parameters

Parameter

Default

Description

output_var

 

Can be any valid output variable, such as voltage, current, or power

START

see Description

Specifies the beginning of the output variable waveform to be analyzed - Defaults to the START value in the .TRAN statement, which defaults to 0 s.

FROM

see START

An alias for START in .FFT statements

STOP

see Description

Specifies the end of the output variable waveform to be analyzed. Defaults to the TSTOP value in the .TRAN statement.

TO

see STOP

An alias for STOP in .FFT statements

NP

1024

Specifies the number of points used in the FFT analysis. NP must be a power of 2; if NP is not a power of 2, Star-Hspice automatically adjusts it to the closest higher number that is a power of 2.

FORMAT

NORM

Specifies the output format:
NORM= normalized magnitude
UNORM=unnormalized magnitude

WINDOW

RECT

Specifies the window type to be used:

RECT=simple rectangular truncation window
BART=Bartlett (triangular) window
HANN=Hanning window
HAMM=Hamming window
BLACK=Blackman window
HARRIS=Blackman-Harris window
GAUSS=Gaussian window
KAISER=Kaiser-Bessel window

ALFA

3.0

Specifies the parameter used in GAUSS and KAISER windows to control the highest side-lobe level, bandwidth, and so on

1.0 <= ALFA <= 20.0

FREQ

0.0 (Hz)

Specifies a frequency of interest. If FREQ is nonzero, the output listing is limited to the harmonics of this frequency, based on FMIN and FMAX. The THD for these harmonics also is printed.

FMIN

1.0/T (Hz)

Specifies the minimum frequency for which FFT output is printed in the listing file or which is used in THD calculations.

T = (STOP-START)

FMAX

0.5*NP*FMIN
(Hz)

Specifies the maximum frequency for which FFT output is printed in the listing file or which is used in THD calculations.

Example

Below are four examples of valid .FFT statements.

.fft v(1)
.fft v(1,2) np=1024 start=0.3m stop=0.5m freq=5.0k window=kaiser alfa=2.5
.fft I(rload) start=0m to=2.0m fmin=100k fmax=120k format=unorm
.fft par(`v(1) + v(2)') from=0.2u stop=1.2u window=harris

Only one output variable is allowed in an .FFT command. The following is an incorrect use of the command.

.fft v(1) v(2) np=1024 

The correct use of the command is shown in the example below. In this case, an .ft0 and an .ft1 file are generated for the FFT of v(1) and v(2), respectively.

.fft v(1) np=1024
.fft v(2) np=1024
Star-Hspice Manual - Release 2001.2 - June 2001