Amplitude and Phase Spectrum VI
- Updated2025-07-30
- 3 minute(s) read
Computes the single-sided, scaled amplitude spectrum of a real-valued time-domain signal and returns the amplitude spectrum as magnitude and phase.

Inputs/Outputs
Signal (V)
—
Signal specifies the input time-domain signal, usually in volts. The time-domain record must contain at least three cycles of the signal for a valid estimate.
unwrap phase (T)
—
unwrap phase, when TRUE, enables phase unwrapping on the output Amp Spectrum Phase. The default is TRUE. If unwrap phase is FALSE, this VI does not unwrap the output phase.
dt
—
dt is the sample period of the time-domain signal, usually in seconds. Set dt to 1/fs, where fs is the sampling frequency of the time-domain signal. The default is 1.
Amp Spectrum Mag (Vrms)
—
Amp Spectrum Mag returns the magnitude of the single-sided power spectrum. If the input signal is in volts (V), Amp Spectrum Mag has units of volts-rms (Vrms). If the input signal is not in volts, Amp Spectrum Mag has units of the input signal unit-rms.
Amp Spectrum Phase (radians)
—
Amp Spectrum Phase is the single-sided amplitude spectrum phase in radians.
df
—
df is the frequency interval of the power spectrum in hertz, if dt is in seconds. |
The Amplitude and Phase Spectrum VI uses two steps to compute the single-sided, scaled amplitude spectrum.
First, this VI uses the following equation to compute the two-sided amplitude spectrum:
where A is the two-sided amplitude spectrum, X is the discrete Fourier transform of Signal, and N is the number of points in Signal.
Second, this VI uses the following equation to convert the two-sided amplitude spectrum to the single-sided amplitude spectrum:
where B is the single-sided amplitude spectrum, and
is the floor operation.
Amp Spectrum Mag is the magnitude of the single-sided amplitude spectrum B, as shown in the following equation:
Amp Spectrum Mag = |B|Amp Spectrum Phase is the corresponding phase in radians, as shown in the following equation:
Amp Spectrum Phase = phase(B)df returns the frequency interval, which typically is used as the multiplier of the frequency axis in order to display the frequency domain.
Related Information
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Signal Processing\Point by Point\Amplitude Spectrum PtbyPt.vi
- labview\examples\Signal Processing\Transforms\FFT and Power Spectrum Units.vi
Signal (V)
—
unwrap phase (T)
—
dt
—
Amp Spectrum Mag (Vrms)
—
df
—