Frequently Asked Questions About LabVIEW Analysis (FAQ) - NI

HomeSupportFrequently Asked Questions About LabVIEW Analysis (FAQ)

Frequently Asked Questions About LabVIEW Analysis (FAQ)

Updated Apr 7, 2023

Reported In

Reported In shows products that are verified to work for the solution described in this article. This solution might also apply to other similar products or applications.

Software

LabVIEW

Issue Details

I would like to know basic information about signal analysis such as Fourier transform and frequency analysis.

Solution

What is Fourier Transform?

Fourier transform is a mathematical operation that converts a signal from the time domain to the frequency domain (or vice versa). In the real world, the time domain is commonly used. In the time domain, the signal is shown on a time basis. In the frequency domain, the signal is shown based on frequency.

What is the difference between DFT and FFT?

The Fourier transform applied to digital (discrete) signals rather than analog (continuous) signals is called DFT (Discrete Fourier Transform). FFT (Fast Fourier Transform) is a faster DFT that can be applied if the number of samples in the signal is a power of two. The required number of operations is about N * log 2 (N) for FFT and about N ^ 2 for DFT, and FFT is significantly faster.

What is the difference between "cross power" VI, "cross power spectrum" VI, "auto power spectrum" VI, "power spectrum" VI?

The "Cross Power Spectrum" VI and the "Auto Power Spectrum" VI are high level VIs placed on the Measurement sub-palette. Other VIs are low level. We usually recommend using high level VIs. "(Auto) power spectrum" calculates signal power, but phase information is lost. "Cross power (spectrum)" calculates the power of two signals and also returns the phase difference between the spectra.

The output of some analysis VI is shown in units of Vrms ^ 2. What does it mean?

This means that if the input sequence is a unit other than RMS, the output of VI is in RMS (root mean square) units. The RMS value of the waveform can be calculated as the square root of the root mean square of each data point. It can be thought of as one kind of average, but mathematically it is different from arithmetic mean. For example, the RMS amplitude of an amplitude 1 sine wave is 1 / sqrt (2) = 0.707, but the average value of sine waves (in integer cycles) is 0.

Which VI is the best when I want to know the frequency component of the signal?

The "amplitude and phase spectrum" VI (measurement subpalette) is the best. This VI equally divides between the DC (0 Hz) and the Nyquist frequency (half of the sample frequency) by N / 2, and outputs the amplitude and phase of each frequency component. N is the number of samples in the time domain signal. This VI outputs a single-side spectrum, which is different from FFT in that "negative frequency" does not exist. Normally, "negative frequency" information is rarely used.

When using these VIs, what is the interval between adjacent frequency components? How can I change this interval?

These measurement VIs usually have an output labeled "df". This is measured when the frequency difference (in Hz) between adjacent components and dt (difference between time domain samples) is shown in VI in seconds. You can calculate with df = fs / N, where fs is the sample frequency and N is the length of the time domain sequence. To change df, you need to change fs or N. One way to increase N is zero padding (see below).

What is zero padding?

It is to add zeros at the beginning and / or end of the time domain sequence. Even if you add, there is no effect on the frequency spectrum of the signal. Zero padding is suitable when the length of the time domain sequence is not a power of two. By adding zeros so that the sequence is a power of 2, FFT computation can be done more quickly. Zero padding also improves the frequency resolution of the FFT (see question above).

When using FFT VI, where is the "negative frequency" stored?

FFT VI is on both sides. This means that the negative frequency present as a mathematical property of the Fourier transform is contained in the output of the VI. The first half of the FFT output array contains the frequencies from DC (0 Hz) to the Nyquist frequency in ascending order. The other half of the array is a mirror image of the first half (wrapped around the middle element of the array) and contains negative frequencies.

What should I wire to dt input?

dt is the time between samples in the time domain input signal. If the sample rate (fs) at which the signal is acquired is known, it can be calculated from dt = 1 / fs.