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

Chapter 11 Introduction to Measurement Analysis in LabVIEW

A question often asked is, “How fast should I sample?” Your first thought may be to sample at the maximum rate available on your DAQ device. However, if you sample very fast over long periods of time, you may not have enough memory or hard disk space to hold the data. Figure 11-7 shows the effects of various sampling rates. In case a, the sine wave of frequency f is sampled at the same frequency fs (samples/sec) = f (cycles/sec), or at 1 sample per cycle. The reconstructed waveform appears as an alias at DC. As you increase the sampling to 7 samples/4 cycles, as in case b, the waveform increases in frequency, but aliases to a frequency less than the original signal (3 cycles instead of 4). The sampling rate in case b is fs = 7/4 f. If you increase the sampling rate to fs = 2f, the digitized waveform has the correct frequency (same number of cycles), and can be reconstructed as the original sinusoidal wave, as shown in case c. For time-domain processing, it may be important to increase your sampling rate so that the samples more closely represent the original signal. By increasing the sampling rate to well above f, say to fs=10f, or 10 samples/cycle, you can accurately reproduce the waveform, as shown in case d.

A) 1 sample/1 cycle

C) 2 samples/cycle

B) 7 samples/4 cycles

D) 10 samples/cycle

Figure 11-7. Effects of Sampling at Different Rates

Why Do You Need Anti-Aliasing Filters?

We have seen that the sampling rate should be at least twice the maximum frequency of the signal that we are sampling. In other words, the maximum frequency of the input signal should be less than or equal to half of the sampling rate. But how do you ensure that this is definitely the case in

LabVIEW Measurements Manual

11-6

www.ni.com

Chapter 11 Introduction to Measurement Analysis in LabVIEW

practice? Even if you are sure that the signal being measured has an upper limit on its frequency, pickup from stray signals (such as the powerline frequency or from local radio stations) could contain frequencies higher than the Nyquist frequency. These frequencies may then alias into the desired frequency range and thus give us erroneous results.

To be completely sure that the frequency content of the input signal is limited, a low pass filter (a filter that passes low frequencies but attenuates the high frequencies) is added before the sampler and the ADC. This filter is called an anti-alias filter because by attenuating the higher frequencies (greater than Nyquist), it prevents the aliasing components from being sampled. Because at this stage (before the sampler and the ADC) we are still in the analog world, the anti-aliasing filter is an analog filter.

An ideal anti-alias filter is as shown in Figure 11-8 (a).

 

 

 

 

Transition Band

 

 

 

 

 

 

Filter Output

 

 

Frequency

Filter Output

 

 

Frequency

 

 

 

 

 

 

 

 

 

 

 

 

 

f1

f1

f2

 

 

 

 

a. Ideal Anti-alias Filter

b. Practical Anti-alias Filter

Figure 11-8. Ideal versus Practical Anti-Alias Filter

It passes all the desired input frequencies (below f1) and cuts off all the undesired frequencies (above f1). However, such a filter is not physically realizable. In practice, filters look as shown in figure (b) above. They pass all frequencies < f1, and cut-off all frequencies > f2. The region between f1 and f2 is known as the transition band, which contains a gradual attenuation of the input frequencies. Although you want to pass only signals with frequencies < f1, those signals in the transition band could still cause aliasing. Therefore, in practice, the sampling frequency should be greater than two times the highest frequency in the transition band. So, this turns out to be more than two times the maximum input frequency (f1). That is one reason why you may see that the sampling rate is more than twice the maximum input frequency.

Why Use Decibels?

On some instruments, you will see the option of displaying the amplitude in a linear or decibel (dB) scale. The linear scale shows the amplitudes as they are, whereas the decibel scale is a transformation of the linear scale

© National Instruments Corporation

11-7

LabVIEW Measurements Manual

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