Вы находитесь на странице: 1из 10

Sampling

• The data is acquired by an ADC using a process


called sampling.
• Sampling an analog signal occurs at discrete
time intervals.
• The rate at which the signal is sampled is known
as the sampling frequency.
Sampling
• The sampling frequency determines the quality of the analog signal
conversion process.

• A Higher sampling frequency achieves better conversion of the


analog signals.

• The minimum sampling frequency required to represent the signal


should be at least twice the maximum frequency of the analog signal
under test (this is called the Nyquist rate).

• If the sampling frequency is equal or less than twice the frequency of


the input signal, a signal of lower frequency is generated from such a
process (this is called aliasing).
Sampling

• For accurate frequency representation:


– Sample at least 2x the highest frequency
signal being measured.

• For accurate shape representation


– Sample 5–10x the highest frequency signal
being measured.
Sampling
• # of Samples to Read is defines as how many data points the DAQ will
return
• Sampling Rate tells the DAQ how fast to acquire the data.
T=1/(sampling rate)

• Divide the number of samples by the sample rate to determine the


sample time (i.e. that last time in the graph), then you can determine
how many cycle of input signal period will be shown.

• # of cycles= (sample time)*(input signal period)

• Note: The # of samples for 1 cycle= (sampling frequency)/ (input


signal frequency)
Sampling Math. Example
• If the input signal has 2 Vp-p, 100 Hz and Sine Wave.
• If you set the DAQ to 1000Hz sample rate, 50 Samples
• What is the sample time? __(50mSec )_
• How many wave cycles should we see? __(5)__
Aliasing-Varying Sample Rate
• Now try sampling of
– 500Hz and 25 samples
– 300Hz and 15 samples
– 210Hz and 10 samples
Aliasing-Varying Sample Rate
• Now sample rates below Nyquist Frequency
Resolution
• Precision of the analog to digital
conversion process is dependent upon the
number of bits the ADC uses.

• The higher the resolution, the higher the


number of divisions the voltage range is
broken into, and therefore, the smaller the
detectable voltage changes.
Resolution
• An 8 bit ADC gives 256 levels (2^8) compared to
a 12 bit ADC that has 4096 levels (2^12).
16-Bit versus 3-Bit Resolution
(5 kHz Sine Wave)
10.00
111
8.75
110 16-bit
7.50
101
6.25
3-bit
Amplitude 5.00 100
(Volts) 011
3.75
010
2.50
001
1.25
000
0 | | | | |
0 50 100 150 200
Time (ms)
Digital to Analog Converter
• The multifunction boards also have on-board digital to
analog converters (DAC). A DAC can generate an
analog output from a digital input. This allows the board
to generate analog signals, both dc and ac voltages.

• Like the ADC, the DAC's performance is limited by the


number of samples it can process and the number of bits
that is used in converting the digital code into an analog
signal.

Sine wave generation from


a 3-bit digital code

Вам также может понравиться