Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
LabVIEW-Measurements.pdf
Скачиваний:
61
Добавлен:
29.05.2015
Размер:
3.37 Mб
Скачать

Chapter 13 Frequency Analysis

where ∆ f is the frequency resolution, T is the acquisition time, fs is the sampling frequency, and N is the block size of the FFT.

Fast FFT Sizes

Direct implementation of the DFT on N data samples requires approximately N2 complex operations and, therefore, is a time-consuming process. However, when the size of the sequence is a power of 2,

N = 2m for m = 1, 2, 3,…

a fast algorithm can compute the DFT with approximately N log2(N) operations. This makes the calculation of the DFT much faster. This algorithm can compute the FFT in place, so it is highly memory efficient. Examples of sequence sizes where you can use this algorithm are 512, 1024, and 2048.

In addition, another optimized algorithm is used for short DFTs of lengths 2, 3, 4, 5, 8, and 10. As a result, when the size of the sequence is not a power of 2, but can be factored as

N = 2m3k5j for m, k, j = 0, 1, 2, 3,…,

the DFT can be computed with speeds comparable to the radix-2 FFT, but requires more memory. It can be used for sequence sizes such as 640, 480, 1000, and 2000.

When the sequence size cannot be factored into sizes that are in the set of short DFTs, a Chirp-Z implementation of the DFT is used. This is much faster than the direct evaluation of the DFT expression. This algorithm uses more memory than the prime-factor algorithms, because it must allocate additional buffers for storing intermediate results during processing.

Magnitude and Phase

The FFT spectrum output produces complex numbers. In other words, every frequency component has a magnitude and phase. The phase is relative to the start of the time record or relative to a single-cycle cosine wave starting at the beginning of the time record. Single-channel phase measurements are stable only if the input signal is triggered. Dual-channel phase measurements compute phase differences between channels so that if the channels are simultaneously sampled, triggering usually is not necessary.

LabVIEW Measurements Manual

13-4

www.ni.com

Chapter 13 Frequency Analysis

Normally the magnitude of the spectrum is displayed. The magnitude is the square root of the sum of the squares of the real and imaginary parts.

The phase is the arctangent of the ratio of the imaginary and real parts, and is usually between π and –π radians (between 180 and –180 degrees).

Windowing

In practical applications, you obtain only a finite number of samples of the signal. The FFT assumes that this time record repeats. If you have an integral number of cycles in your time record, the repetition is smooth at the boundaries. However, in practical applications, you usually have a nonintegral number of cycles. In such cases the repetition results in discontinuities at the boundaries, as shown in Figure 13-3. These artificial discontinuities were not originally present in your signal and result in a smearing or leakage of energy from your actual frequency to all other frequencies. This phenomenon is known as spectral leakage. The amount of leakage depends on the amplitude of the discontinuity, a larger one causing more leakage.

A signal that is exactly periodic in the time record is composed of sine waves with exact integral cycles within the time record. Such a perfectly periodic signal has a spectrum with energy contained in exact frequency bins.

A signal that is not periodic in the time record has a spectrum with energy split or spread across multiple frequency bins. The FFT spectrum models the time domain as if the time record repeated itself forever. It assumes that the analyzed record is just one period of an infinitely-repeating periodic signal.

Because the amount of leakage is dependent on the amplitude of the discontinuity at the boundaries, you can use windowing to reduce the size of the discontinuity and hence reduce spectral leakage. Windowing consists of multiplying the time-domain signal by another time-domain waveform, known as a window, whose amplitude tapers gradually and smoothly towards zero at edges. The result is a windowed signal with very small or no discontinuities, and therefore reduced spectral leakage. There are many different types of windows. The one you choose depends on your application.

© National Instruments Corporation

13-5

LabVIEW Measurements Manual

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]