.FOUR — Compute a Fourier Component after a .TRAN Analysis
Syntax:
.four <frequency> [Nharmonics] [Nperiods] <data trace1> [<data trace2> ...]
Example:
.four 1kHz V(out)
This command is performed after a transient analysis. The output from this command is printed in the .log file. Use the menu item "View > Spice Error Log" to see the output. For most purposes, the FFT capability built into the waveform viewer is more useful.
If the integer Nharmonics is present, then the analysis includes that number of harmonics. The number of harmonics defaults to 9 if not specified.
The Fourier analysis is performed over the period from the final time, Tend, to one period before Tend unless an integer Nperiods is given after Nharmonics. If Nperiods is given as -1, the Fourier analysis is performed over the entire simulation data range.
When a sine waveform with no phase shift is the fundamental frequency component in a .four analysis, then this component will be reported with a 90° phase shift, due to the way the Fourier Series is defined.
Copyright © 1998–2025 by Analog Devices Inc. All Rights Reserved.