Title: Chapter 7 - DSP Based Testing
1Chapter 7 - DSP Based Testing
2Outline
- Trigonometric Fourier Series (FS)
- Discrete-Time Fourier Series (DTFS)
- Relationship to FS
- Working directly with samples
- Complex form
- Discrete Fourier Transform (DFT)
- Fast Fourier Transform (FFT)
- Applications
- Equivalence of Time and Frequency Domains
- Frequency Domain Filtering
- Summary
3- Advantages of DSP Based Testing
- Reduced Test Time
- DSP in this class will be limited to discrete
(i.e. sampled) waveforms of finite length. - Advantages of coherent DSP based testing
- reduced test time since we can create signals
with multiple frequencies at the same time. - Once the output response of the DUT has been
captured using a digitizer or capture memory, DSP
allows the separation of test tones to give
individual gain and phase measurements. - Also, by removing the input test tones, we can
measure noise and distortion without running many
separate tests.
4- Advantages of DSP Based Testing
- Separation of Signal Components
- By using coherent test tones, we are guaranteed
that the harmonic distortion components will fall
neatly into separate Fourier spectral bins rather
than being smeared across many bins. - DSP based testing also has the major advantage in
the elimination of errors and poor repeatability. - Advanced Signal Manipulations
- DSP allows us to manipulate digitized output
waveforms to achieve a variety of results - We can apply mathematical filters to remove noise
thereby achieving better accuracy.
5- Digital Signal Processing
- DSP and Array Processing
- There is a slight difference between array
processing and Digital Signal Processing. - An array (or vector) is a series of numbers (i.e.
height of students in class) - A Digital Signal is also a series of numbers
(i.e. voltages), yet the series is time stamped - Thus digital signal processing is a subset of
array processing using time-ordered samples. - All DSP is accomplished on a special computer
called the array processor (so much for the
difference)
6- Digital Signal Processing
- DSP and Array Processing - cont.
- Array processing functions that are useful in
mixed-signal testing - averaging
- To measure the RMS of a signal we must first
remove the DC offset - this is accomplished by
averaging the signal and subtracting the result
from the original - Many functions like averaging are built into the
ATE tester code set to allow easy use. - Built in functions are set up to maximally
utilize the available computational resources to
reduce test time.
7- Digital Signal Processing
- DSP and Array Processing - cont.
- Other built in functions include
- vector average - average value of an array
- vector RMS - root mean square of the array values
- max/min - maximum and minimum values in an array
- vector add - add two arrays
- add scalar to vector - add constant to each array
value - subtract scalar from vector - subtract constant
from each array value - vector multiply - multiply two arrays
- multiply vector by scalar - multiply each array
element by a constant - divide vector by scalar - divide each array
element by a constant
8- Discrete Fourier Analysis
- Fourier Transform
- Jean Baptiste Joseph Fourier
- French mathematician that found that any periodic
waveform can be described as the sum of a series
of sine and cosine waves at various frequencies
plus a DC offset. - Developed for the study of heat transfer in solid
bodies - A sequence is assumed to be periodic with a
period T such that x(t) x(t-T) for all values
of t from minus infinity to plus infinity. - x(t) a0a1cos(w0t)b1sin(w0t)a2cos(2 w0t)
to infinity
9- Discrete Fourier Analysis
- Discrete Fourier Transform
- Mathematical operation that allows us to split a
composite signal into its individual frequency
components. - A DFT operation is equivalent to a series of very
narrow band pass filters followed by
peak-responding voltmeters. The filters are not
only frequency selective but also phase selective
to determine the sine and cosine contributions
individually. - x(n) a0a1cos(2?n/N)b1sin(2?n/N)a2cos(2?n/N
) a(N/2)cos(2?(N/2)n/N) b(N/2)sin
(2?(N/2)n/N)
10The DFT corresponds to a bank of filters and
meters
11- Discrete Fourier Analysis
- Discrete Fourier Transform - cont.
- Digitizing spectrum analyzers and mixed-signal
testers accomplish the filter and peak
measurements using the DFT. The DFT uses a
frequency sensitive correlation calculation for
each value of a and b. - Functions that have zero correlation are called
orthogonal - Superposition and orthogonality of coherent sine
and cosine components allows us to extract the
value of all as and bs, even in the presence of
other coherent test tones. The cosine correlation
function is equivalent to a filter and peak
measurement. Therefore we can measure many
signals simultaneously, reducing test time.
12Frequency and Phase Selectivity of DFT
Correlations
13(No Transcript)
14- Discrete Fourier Analysis
- Complex form of the DFT
- Most traditional DSP books use the Eulers
transform to convert sinusoids into exponentials. - e-j w t cos(wt) jsin(wt)
15- Discrete Fourier Analysis
- Complex form of the DFT
- Notice that the complex form of the DFT
correlates with a negative sine wave instead of a
positive sine wave in the sine/cosine version. - This causes problems in the phase shift
calculations!!! - Some testers will give the straight imaginary
value, while others multiple by minus one to
compensate for the difference. - The test engineer will need to find out whether
the tester is reporting sine amplitudes or
imaginary components before phase measurements
can be made!!!
16Fourier Analysis Of Periodic SignalsTrigonometric
Form
- For any periodic signal with a finite number of
discontinuities, the signal can be represented by
a Fourier Series
17Computing Fourier Coefficients
- Coefficients are found from the following
integral equations
18Fourier Series RepresentationMagnitude Phase
Form
Rectangular Form
MagnitudePhase Form
where
19Spectral Plot
Phase
f1
f3
f
0
f2
fo
2fo
3fo
4fo
5fo
0
20Fourier Series ExampleClock Signal
21Fourier Series ExampleClock Signal
22Spectrum of Clock Signal Example
23Actual Vs. FS Representation
- Increasing the number of terms in the FS
increases the accuracy of the representation. - Gibbs phenomenon (overshoot at discontinuity) is
a result of the finite sum of terms.
24Outline
- Trigonometric Fourier Series (FS)
- Discrete-Time Fourier Series (DTFS)
- Relationship to FS
- Working directly with samples
- Complex form
- Discrete Fourier Transform (DFT)
- Fast Fourier Transform (FFT)
- Applications
- Equivalence of Time and Frequency Domains
- Frequency Domain Filtering
- Summary
25Discrete-Time Fourier SeriesFirst Principles
Consider sampling x(t)
But, FS1/TS, allowing us to write
26Discrete-Time Fourier SeriesCoherent Sampling
- Generally, we are interested in only those sample
sets that are derived from a signal that
satisfies TNTS or foFS/N
27Discrete-Time Fourier SeriesPeriodic Sample Sets
- The fact that we are using coherent sample sets,
implies periodicity in n. However, due to the
symmetry of the formulation, xn is also
periodic with respect to k with period N
28Discrete-Time Fourier SeriesRe-Grouping
Formulation
Split into 2 parts
To simplify further, use trig. substitutions
29Discrete-Time Fourier SeriesRe-Grouping
Formulation
Replace infinite summations with single
parameter
DTFS
30Discrete-Time Fourier SeriesMagnitude Phase
Notation
Rectangular Form
MagnitudePhase Form
Used for spectral plot purposes
where
31DTFS ExampleClock Signal
Evaluate Infinite Summations
After 100 terms
32DTFS ExampleClock Signal
DTFS
33FS Versus DTFSClock Signal Example
- Unlike a FS that attempts to represent the
periodic function over all time, a DTFS only
attempts to represent the N periodic samples - Hence, a much simpler mathematical expression.
34Working Directly With DTFS
Strategy to solve for unknown parameters -Each
sample must satisfy the DTFS for xn
- A DTFS has N unknown parameters corresponding to
N degrees of freedom. - A DTFS is a representation for a coherent sample
set consisting of N samples.
35Solving N Equations In N Unknowns
1st sample (n0)
2nd sample (n1)
Nth sample (nN-1)
36Matrix Formulation Solution
Compact notation
Unknown parameters
37Method of Orthogonal Basis
- Even before Fouriers development in the 1800s ,
the famous mathematician, Euler had developed a
closed-form solution for finding the unknown
coefficients of the DTFS. - involves projections onto a set of orthogonal
basis functions (harmonically-related sinusoids). - his efforts were dropped in the direction of
Fourier analysis because of the conceptual
difficulties that occurred with the step
discontinuities in the signal. - The importance of this method is that it forms
the basis of all modern methods related to
Fourier Analysis, Wavelets, etc.
38Method of Orthogonal Basis
DTFS Coefficients
- The above formulae are found by multiplying the
DTFS by (i) cosk(2p/N)n (ii) sink(2p/N)n,
then summing n from 0 to N-1.
39DTFS ExampleClock Signal
10 samples
bk coefficients
ak coefficients
All other coefficients are zero.
40Spectral PlotClock Signal Example
41Complete Frequency SpectrumHarmonics from k 0,
, infinity
42Frequency Denormalization
FS 100 kHz N 10
- DTFS is expressed in normalized time and
frequency. - To return to proper time scale
- To return to proper frequency scale
43Complex Form of the DTFS
- Through the application of Eulers identity, we
can convert the DTFS in trigonometric form to the
complex form of the DTFS,
where
44Complex Form of the DTFSSeveral Examples
Example 1
Example 2
45Outline
- Trigonometric Fourier Series (FS)
- Discrete-Time Fourier Series (DTFS)
- Relationship to FS
- Working directly with samples
- Complex form
- Discrete Fourier Transform (DFT)
- Fast Fourier Transform (FFT)
- Applications
- Equivalence of Time and Frequency Domains
- Frequency Domain Filtering
- Summary
46Discrete-Time Fourier Transform
- Fourier greatest invention was the Fourier
Transform (FT). - provides a frequency description (known as a
Fourier transform) of an aperiodic signal
(transient signal) - If yn exists for only finite time, then we can
represent it by the following periodic function
xn with period N (periodic extension of yn)
yn
47Discrete-Time Fourier TransformAperiodic Signal
Description
yn
- Given some aperiodic signal yn that can be
described in terms of a periodic signal xn,
then we can write
- As xn is a periodic function, we can write yn
as
48Discrete-Time Fourier TransformInvestigating
Impact of N-gt?
add zeros
- As the period N is made larger, a better match is
made between yn xn. As N-gt?, ynxn for
all finite values of n. - Due to limiting argument, the infinite sum eqn.
changes into an integral eqn
- The term Y(ejw) is called the D.T. Fourier
Transform of yn, given by
49Discrete-Time Fourier TransformExample
- Consider a set of samples from a unit-height
rectangular pulse signal, the F.T. would be
computed as follows
Note Spectrum is continuous.
Y(w)
5
w
0
2p/5
4p/5
-2p/5
-4p/5
?(w)
p
4p/5
2p/5
w
0
-2p/5
-4p/5
-p
50Relationship Between DTFS FT
Y(w)
5
w
0
2p/5
4p/5
-2p/5
-4p/5
- The spectral coefficients of an N-point DTFS are
samples of the FT
- Substituting the appropriate values for Y(ejw)
gives
51Discrete Fourier Transform (DFT)
- The DTFS representation of the periodic extension
of an aperiodic signal yn is referred to as a
Discrete Fourier Transform (DFT) of yn. - In essence, we are working with a DTFS, just
attaching different meaning to the underlying
result. - The coefficients X(0), X(1), , X(N-1) are
referred to as the DFT of yn.
52Outline
- Trigonometric Fourier Series (FS)
- Discrete-Time Fourier Series (DTFS)
- Relationship to FS
- Working directly with samples
- Complex form
- Discrete Fourier Transform (DFT)
- Fast Fourier Transform (FFT)
- Applications
- Equivalence of Time and Frequency Domains
- Frequency Domain Filtering
- Summary
53- Fast Fourier Transform (FFT)
- In the early 1960s James Tukey invented a new
algorithm for calculating the DFT in a much more
efficient manner. - An IBM programmer J.W. Cooley generated the
computer code for Tukeys algorithm and the
Cooley-Tukey Fast Fourier Transform was created. - Uses a folding principle called a butterfly to
reduce the number of calculations required. - Decimation in frequency or Decimation in Time
54Fast Fourier Transform
- The Fast Fourier Transform, or FFT, is a highly
efficient procedure for computing the DFT/DTFS. - For N samples, the FFT requires Nlog2N complex
additions and (N/2)log2N complex multiplication,
whereas the DFT requires N(N-1) complex addition
and N2 complex multiplications. - With N512, the FFT has a 50 to 1 advantage over
the DFT. - N is selected as a power-of-two (i.e., 2n), but
other algorithms exist that can work other
factors.
55Interpreting the FFT Output
- Most software packages, including Matlab,
implements the following FFT algorithm - To determine the spectral coefficients of the
corresponding DTFS, we must perform the scaling
operation on the samples of the Fourier
Transform
56Interpreting the FFT Output
- DTFS in complex form
- To convert DTFS back into rectangular form, we
use
where
and
57Interpreting the FFT Output
- To convert DTFS into magnitude and phase form, we
use - For RMS Value
where
58Interpreting the FFT OutputExample
Time-Domain
Frequency-Domain
Spectral Coefficients
or
59Noise Power Calculation
Spectrum (dB)
BIN
- Include only the noise power ignore the power
contained in the signal bin and its harmonics
(say, contained in S bins)
Correction factor
60Spectral Behavior of a Coherent versus
Non-Coherent Sinusoidal Signal
Logarithmic Scale
Coherent case (M3, f0, N64)
FS/2
Freq. Resolution
FS/2
Spectral leakage
Incoherent case (Mp, f0, N64)
61Outline
- Trigonometric Fourier Series (FS)
- Discrete-Time Fourier Series (DTFS)
- Relationship to FS
- Working directly with samples
- Complex form
- Discrete Fourier Transform (DFT)
- Fast Fourier Transform (FFT)
- Applications
- Equivalence of Time and Frequency Domains
- Frequency Domain Filtering
- Summary
62Equivalence of Time and Frequency Domain
Information
The samples of a periodic signal can be described
in matrix form as
From which the spectral coefficients are found
from
Conversely, given the spectral coefficients, the
original samples can be determined through an
inverse operation given by
This inverse operation can be computed using an
inverse FFT.
63Inverse FFT ApplicationExample
Spectral Coefficients
Time-Domain Samples
Fourier Transform Samples (N8)
64Parsevals Theorem
Complex Form for DTFS
Trigonometric Form for DTFS
- Parsevals theorem states the power of the signal
in either the time or frequency domain is a
constant. - In the time-domain, both signal and noise occur
at the same time, whereas in the
frequency-domain, most of the noise occurs at
frequency locations not occupied by signal.
65Applications of Inverse FFTImproving Time
Resolution of Rise/Fall Time
Noisy signal
Improved Signal (1/2 Noise)
- Knowledge of the spectral distribution of a
signal can be exploited to improve the SNR of the
overall measurement. - Here the clock signal is known to consists of
only odd harmonics, hence, by setting all even
Bins to zero, improves SNR measurement by 3 dB.
66Applications of Inverse FFTTime-Domain
Interpolation
N Samples
Freq. Res FS/N
Freq. Res FS/(NNZ)
NNZ Samples
Add NZ zeros
- Zero-padding with Nz zeros a frequency spectrum
consisting of N samples, followed by an IFFT,
improves the time resolution by the factor
(NNZ)/N.
67Outline
- Trigonometric Fourier Series (FS)
- Discrete-Time Fourier Series (DTFS)
- Relationship to FS
- Working directly with samples
- Complex form
- Discrete Fourier Transform (DFT)
- Fast Fourier Transform (FFT)
- Applications
- Equivalence of Time and Frequency Domains
- Frequency Domain Filtering
- Summary
68Applications of Inverse FFTFrequency-Domain
Filtering
x(n)
c(k)
xfilter(n)
c(k)H(ejw)
69Noise A-Weighting Filtering
- Audio measurements often call for noise
measurement to be weighted in a manner that more
closely approximates the frequency behavior of
the ear. - only the magnitude of the spectrum is of interest.
70Summary
- Coherent DSP-based testing allows AC measurements
to be performed in near-optimum test time. - DSP techniques involving FS, DTFS, DFT and FFTs
were described. - DSP-based test techniques enable test techniques
not available with bench-top equipment, i.e., - Frequency-domain filtering
- Time-domain interpolation
- Noise-reduction