Appendix: Sampling And Fft Fundamentals; Coherent Sampling; Windowing Functions; Fft Calculations - Analog Devices HSC-ADC-EVALA-SC Manual

High speed adc usb fifo evaluation kit
Table of Contents

Advertisement

APPENDIX: SAMPLING AND FFT FUNDAMENTALS

COHERENT SAMPLING

In a coherent system, the analog and clock sources must be
synchronized, and the analog and clock input frequencies must
be selected such that given 2
there is an integer number of whole sine wave cycles. The
number of cycles should ideally be a prime number. Selecting a
prime number ensures that the same converter codes are not
repeated over and over, therefore exercising as many converter
codes as possible. Although a crystal oscillator can be used as an
clock source in this technique, two synchronized signal
synthesizers are generally preferred because special hardware
may be required to ensure the crystal oscillator is synchronized
with the analog source. The following equation can be used to
mathematically calculate the correct analog and clock
frequencies for a coherent system:
fin
M
=
fs
Mc
where:
fin = Analog Input Frequency
fs = Sampling Clock (encode) Frequency
N
M = Sample Size (2
)
Mc = Number of Cycles of Sine Wave
If the requirements of the coherent system defined above are
not met, the discrete time samples will appear discontinuous at
the end of the captured samples and the results will be invalid.

WINDOWING FUNCTIONS

It is sometimes desirable to use a windowing function instead of
coherent sampling to reduce the restrictions on the analog and
encode sources. Two popular windowing functions are the
Blackman Harris 4-Term and the Hanning window. With
windowing, the time-domain samples are multiplied by the
appropriate weighting function that weights the time-domain
data such that the discontinuities at the end of the captured
samples have less significance. The weighting function for a
Blackman Harris 4-Term window is:
π
×
2
n
=
×
⎟ ⎟
+
Wn
a
0
a
1
cos
M
where:
a0 = 0.35875
a1 = 0.48829
a2 = 0.14128
a3 = 0.01168
N
(N is an integer number) samples,
π
×
π
×
2
2
n
2
3
n
×
⎜ ⎜
×
a
2
cos
a
3
cos
M
M
HSC-ADC-EVALA-SC/HSC-ADC-EVALA-DC
M = Sample Size (2
n = Indexed Sample Number
The weighting function for a Hanning window is:
Wn
where:
M = Sample Size(2
n = Indexed Sample Number

FFT CALCULATIONS

Whether a system is coherent or a windowing function has
been applied, the resulting data will be processed via a discrete
fourier analysis that translates the discrete time-domain
samples into the frequency domain. Because in practice
processing the data quickly is desired, a Fast Fourier Transform
(FFT) is used, which is simply an algorithm that reduces the
required mathematical calculations. There are many FFT
algorithms available but the most popular is the radix 2
algorithm. Regardless of the algorithm, for each time-domain
sample a complex conjugate pair (r ± jx) will be generated from
the FFT. For example, if the time-domain sample size is 16,384,
the resulting FFT array will contain 16,384 complex samples. To
generate a frequency domain plot from this data, the magnitude
of each complex sample must be calculated. The magnitude can
be computed using the following equation:
Magnitude
If the input data to the FFT is complex, the FFT will contain
16,384 magnitudes representing frequencies between plus and
minus fs/2. Although complex ADCs are not available, it is very
common to use two ADCs to synchronously sample the I and Q
data streams from a quadrature demodulator. If the data input
to the FFT is real, representing the data from a single ADC, the
last 8192 samples represent a mirror image of the first 8192
samples. Because this is an exact mirror image, the last 8192
samples can be ignored.
With the data set processed, there are two ways to evaluate the
⎟ ⎟
ADC performance, graphically and computationally. To plot the
data in a meaningful way, the magnitude data must be
converted to decibels (dB). This can be done with the formula:
=
dB
where Magnitude is the individual array elements computed
above, and FullScale is the FullScale magnitude. It is important
to note that the computation for dB assumes the square root
Rev. 0 | Page 43 of 44
N
)
×
n
=
×
0.5
0.5
cos
M
N
)
=
+
2
2
Re
Im
Magnitude
×
⎜ ⎜
10
log
10
FullScale
⎟ ⎟

Advertisement

Table of Contents
loading

Table of Contents