Overview:
Embedded systems increasingly employ a combination of low speed serial, analog voltages and RF communications which are tightly synchronized in time. This session will discuss the background of performing time and frequency domain analysis on these systems with example measurements on a digitally controlled RF transmitter.
What will you learn?
The challenges of debugging embedded systems
Frequency domain analysis and FFT basics
Time gating, Dynamic range and Triggering considerations
PLL locking measurement example
2. Agenda
l Complex Embedded Systems
l The Challenge of Debugging Embedded Systems
l Frequency domain analysis
l Time gating
l Dynamic range
l triggering
l Measurement Example: PLL locking
l SPI triggering
l Measuring settling time and transient spectrum
2
3. Complex Embedded Systems
Digital signals
D/A
IQ modulator
D/A
RF signals
DSP
Micro controller Analog signals
3
4. The Challenge of Debugging Embedded Systems
l Baseband digital, RF and analog signals are interdependent
l Feedback control of RF by microcontroller
l Low speed serial busses
l Critical timing relationships
l Interference between RF and digital signals
l Analyzing and debugging in the frequency domain
l Frequency domain analysis synchronized with time and digital domains
l Frequency analysis speed
l Sufficient sensitivity in both time and frequency domains
l Triggering ( time, digital and frequency)
4
6. Measurement Tools: Spectrum Analyzer
l Spectrum is measured by sweeping the local oscillator across the
band of interest
l Band pass filter after IF amplifier determines the frequency resolution (RBW)
l Very low noise due to IF gain and filtering
l Sweep can be fast over narrow span
l Real time operation possible over a limited frequency range using FFT after IF
filter
6
7. Spectrum Measurement is a Function of Time
Glitches
time
f1 f2 f3 f4 f5 f6 f7
Measurement frequency
Center frequency of the RBW filter is swept across the Frequency range to build the
signal spectrum
7
8. Discrete Fourier Transform
l Transform signal into N “bins”
l Each “bin” is the inner product
(sum of signal samples
multiplied by a base signal)
N 1 k
i 2 n
X k xn e
l Base signals are from a set of
orthogonal functions N
l Resolution bandwidth filter is
determined by the number of n 0
samples at a given sample rate
f 1 fs
tint N
8
9. Fourier Transform: Instantaneous Spectrum
f1 f2 f3 f4 f5 f6 f7
f1 f2 f3 f4 f5 f6
f7
f1 f2 f3 f4 f5 f6
f1 f2 f3 f4 f5 f6 f7
f1 f2 f3 f4 f5 f6 f7
9
10. Frequency Domain Analysis
FFT Basics
FFT
ts f FFT
Integration time tint Total bandwidth fs
NFFT samples input for FFT NFFT filter output of FFT
l NFFT Number of consecutive samples (acquired in
time domain), power of 2 (e.g. 1024)
l ∆ fFFT Frequency resolution
l tint integration time
l fs sample rate
10
11. FFT Implementation
Resolution Bandwidth
l Two important FFT rules
l RBW dependent on f s tint N FFT
l Integration time, e.g. 1 sec => 1 Hz,
100 ms => 10 Hz
l Highest measureable
f s NFFT
frequency dependent on
f max
l Sample rate (e.g. fs = 2 GHz => fmax
= 1 GHz)
2 2tint
l Nyquist theorem: fs > 2 fmax
11
12. FFT Implementation
Digital Down Conversion
l Conventional oscilloscopes
l Calculate FFT over entire acquisition
l Improved method:
l Calculate only FFT over span
of interest
l fC = center frequency of FFT
12
13. FFT Implementation
Digital Downconversion
Traditional Oscilloscope FFT calculation
Time Domain Frequency
Domain
Zoom
t Windowing FFT
(f1…f2)
Record length f
f1 f2
Data aquisition Display
FFT calculation with digital downconverter
Time Domain DDC Frequency
Domain
Digital down- SW
conversion fc Windowing FFT Zoom
t
Record length (f3…f4)
Span f1…f2 f
f3 f4
(HW Zoom)
Data aquisition Display
=> FFT much faster & more flexible
13
14. FFT Implementation
Overlapping FFT
l Conventional oscilloscopes
FFT over complete acquisition
first aquisition second aquisition third aquisition
FFT 1 FFT 2 FFT 3
l Improved approach
FFT can be split in several FFTs and also overlapped
first aquisition
Faster processing,
FFT 1 FFT 2 FFT 3 FFT 4
faster display update rate
FFT 1 Ideal for finding
FFT 2 sporadic / intermittent
FFT 3
50% overlapping FFT 4
signal details
14
15. Tradeoff for Windowing: Missed Signal Events
l All oscilloscope FFT processing uses windowing
l Spectral leakage eliminated
l However, signal events near window edges are attenuated or lost
Original Signal
Signal after Windowing
15
16. FFT Overlap Processing
l Overlap Processing ensures no signal details are missed
Original Signal
…
16
17. Time Gating
FFT
•Signal characteristics change over the acquisition interval
•Gating allows selection of specific time intervals for analysis
17
19. Time Gating
l Frequency spectrum is
often a function of time
l Locking of a PLL
l EMI caused by time
domain switching
l Time gating allows the
user to select a specific
portion of the waveform
for frequency domain
analysis
l Window limits frequency
resolution
19
20. Frequency domain measurement dynamic
range
l Analog to digital conversion (ADC) performance sets the
dynamic range
l Signal to noise ratio (ENOB)
l Frequency domain spurious
l Front-end amplifier gain
l Noise figure and sensitivity
20
21. Ideal ADC
l How can we measure with sufficient range in the
frequeny domain?
l The A/D converter sets the dynamic range
l K bit ADC (2K quantization levels)
l Effective Number Of Bits (ENOB) = K
Ideal ADC
s(t) sq (ti )
21
22. Analog-to-Digital Converter - ENOB
l Effective Number of Bits (ENOB): A measure of signal fidelity
Effective Quantization Least Significant
Bits (N) Levels Bit ∆V
± ½ LDB Error
4 16 62.5 mV
5 32 31.3 mV
Quantatized
Digital Analog Waveforms
6 64 15.6 mV
Level typical
Sample 7 128 7.8 mV
Ideal ADC vertical 8bits = Points
256 Quantatizing levels Ideal 8 256 3.9 mV
8 Effective
+ + + < Number of Bits !
Offset Error Gain Error Nonlinearity Error Aperture Uncertainty
And Random Noise
l Higher ENOB => lower quantization error and higher SNR
=> better accuracy
22
23. A Scope is more than an ADC….
Model of oscilloscope front-end
Variable Gain Analog Filter Non-Ideal ADC
Amplifier
p(t) q(t) s(t) sq (ti )
l Variable gain amplifier sets the V/div range and level into
the (non-ideal) ADC
l Analog filter prevents aliasing
l ADC generates quantized and sampled signal
l Amplifier and other components in the input chain add
noise to the ADC
23
24. Signal to Noise and ENOB
l What noise level would be observed in the spectrum measured with
100 KHz resolution bandwidth?
l Assume 2 GHz instrument bandwidth with 8 ENOB (ideal ADC)
l SNRdB = 49.76 dB
l SNR = 92.8 dB
SNRdB 1.76
B
6.02
Displayed noise level is
2E9
reduced by the ratio of SNRdB SNR 10 log 10
full bandwidth to RBW 1E 5
24
27. Effect of interleaving in the frequency domain
Interleaved A/D Non-interleaved A/D
harmonics
Interleaving spurious
27
28. High Gain Amplifier Reduces Noise at 1 mV/div
Noise power
in 50 KHz
BW = -102
dBm ~ -148
dBm/Hz
28
29. Triggering
l Triggers can be required different “domains”
l Time domain (edge, runt, width, etc.)
l Digital domain (pattern, serial bus)
l Frequency domain (amplitude/frequency mask)
l Sensitivity of time domain triggers
l Matching bandwidth with acquisition for all trigger types
l Noise reduction (filtering, hysteresis)
l Frequency domain triggers
l Processing speed of FFT
29
30. Conventional Oscilloscope Triggering System
display
memory stored samples
ADC samples
sample time
time
meas signal time
base
stop acquisition
trigger
position of waveform on display
system
TDC locates trigger position
30
31. Trigger Sets the Horizontal Position of the
Waveform trigger position
trigger level
samples
31
34. Digital Trigger System
display
time sample time memory stored samples
base
meas signal ADC samples
stop acquisition
samples
trigger
position of waveform on display
system
34
39. Evaluation Board Schematic
Test point for
Loop Filter Voltage RF
Output
Test points for
CLK, DATA & LE
39
40. RF OUT + CLK & DATA (analog + SPI decoding)
RF carrier (time domain view)
SPI decoding
CLK
DATA
MOSI trigger pattern = 0003XXXXh
40
41. FFT Gating Off
RF carrier (time domain view)
Note Frequency overshoot. Also note the VCO Tuning Voltage
RF carrier, Gating OFF
(freq domain view)
Serial decoding of SPI data
VCO Tuning Voltage
VCO is programmed to toggle between 825 MHz and 845 MHz
41
42. FFT Gating On
RF carrier (time domain view) FFT Gate step size = 400 us
RF carrier, Gating ON
(freq domain view)
RF carrier, Gating OFF
(freq domain view)
Serial decoding of SPI data
VCO Tuning Voltage
VCO is programmed to move from 825 MHz to 845 MHz (single shot)
42
43. Multiple Gated FFTs
RF carrier (time domain view)
RF carrier position RF carrier position RF carrier position
after 400 us after 800 us after 1200 us
Serial decoding of SPI data
VCO Tuning Voltage
VCO is programmed to move from 825 MHz to 845 MHz (single shot)
43
44. Summary
l FFT based spectrum analysis can be enhanced to enable
time-correlated spectrum analysis
l Improved throughput using digital down conversion
l High dynamic range A/D conversion
l High gain amplifier for small signal measurement
l Real time oscilloscope platform is ideal for digital, time and
frequency analysis
l Synchronized time and frequency domain analysis
l Serial protocol trigger and decode
l Parallel data channels
44
45. Summary
l Watch the recorded webinar on this presentation here!
l http://bit.ly/SYqjzC
l Or scan the QR code on your mobile device:
45
Editor's Notes
Any real waveform such as that measured on an oscilloscope can be separated into the sum of orthogonal functions. The most common set of such functions are sine and cosine waves. Here we show a waveform on the left side of this slide that is composed of the sum of 2 sine waves of different frequencies as an example. The Fourier transform breaks waveforms down into their sine wave components such that it represents the original waveform as a set of complex numbers representing the magnitude and phase of each one of the constituent sine waves. The waveform is known as the frequency spectrum or simply the spectrum.
One common way to measure the frequency spectrum of a signal is to use a spectrum analyzer. This instrument, a very simplified block diagram shown here, determines the magnitude of each frequency component by sweeping a measurement filter over a range of frequencies and measuring the power at each frequency. This instrument has the benefit of being very accurate due to its low noise and can measure over a very wide frequency range. The measurement is not real time in the sense that the instrument measures frequency over the sweep time. The sweep time itself is dependent on many factors including the frequency span. In general, however, the sweep speed will be fast over smaller spans. Many spectrum analyzers also include a Fourier transform that allows real time measurement in spans of 40 MHz.
Time domain samples are transformed to N FFT /2 equally spaced lines in the frequency domain. The number of time domain samples times the sample interval of the A/D converter determines the integration time over which each frequency component is measured. The frequency resolution is dependent on this integration time such that the resolution is the inverse of the integration time or, equivalently, the A/D sampling rate divided by the number of samples over which the FFT is computed. The total frequency span of an FFT is determined by the sampling rate of the FFT and covers a span from DC to Ts/2 when the sampled waveform is real. Each frequency sample computed by the FFT can be viewed as a “bin” whose shape in the frequency domain is determined by the integration window over which the bin value is computed. Because all of the samples in the integration are weighted equally, this shape is that of a sin(x)/x function. The bins overlap in the frequency domain in such a way that the amplitude of each bin contains some energy from the adjacent bins.
There are two important rules when working with FFT’s: The resolution bandwidth is determined by the integration time so, for example, a 1 Hz resolution requires an integration time of 1 second and a resolution of 10 Hz requires 100 ms. The highest measurable frequency is set by the A/D sampling rate with the maximum frequency equal to ½ of the sampling rate. Meeting these requirements often requires very long time domain records if, for example, one wants to measure a high resolution over a relatively narrow span at a high center frequency. For example, measuring a 100 MHz span centered at 1.5 GHz (from 1.45 GHz to 1.55 GHz) with a 100 Hz resolution will require 50 million A/D samples at 5 Gs/s since we must sample fast enough to acquire the 1.5 GHz center frequency and long enough to resolve the 100 Hz resolution.
Another limitation of the FFT in spectrum analysis applications is the inefficiency of the computation for analysis of narrow spans at high frequencies. A conventional FFT is computed on a single record of data samples acquired by an A/D converter and the spectrum is computed from DC to ½ the sample rate. The desired resolution bandwidth is set by the number of time samples used in the computation and the span is set by zooming in on the desired section of the spectrum. A better approach is to select the desired center frequency using a down converter to shift the center frequency of the span of interest down to DC and then sampling this bandwidth limited spectrum at a lower rate consistent with the span of interest. The lower sampling rate allows a much narrower resolution bandwidth using a smaller number of time domain samples. The shorter time record improves the computational throughput dramatically.
This slide shows a more detailed comparison of the two methods of computation. The conventional FFT is computed on the complete data record and then zooming in on the desired span. The R&S RTO uses a digital down converter to shift the center frequency and span of interest to DC and reduce the sample rate at its output. The window function and FFT is computed on the shorter time record at a much faster rate. Zooming is also possible after the FFT.
The fast computation of the FFT that results from the use of the down converter can be exploited in overlap processing. Conventional oscilloscopes compute FFT‘s on time records that are separated in time by an amount equal to the processing time for each FFT. Overlap processing allows the computation of multiple FFT‘s on overlapping data records in such a way that data making up one FFT consists of a percentage of the data from the previous FFT with the remaining part being new data. The percentage of overlap can be set by the user. In this slide, a 50% overlap is shown. Overlap processing is valuable because most signals are dynamic and change over time and, as you recall, the window function attenuates the signal at the edges of the inteval. Intermittent signals that appear near the edges of the interval will not be seen due to the weighting of the window but with a 50% overlap, the signal attenuated in one FFT will be seen in the next one.
A non-integral number of cycles cause discontinuities in the waveform produce high frequency transients which add false frequency information => Leakage Multiply the waveform record by applying a window function that is zero at the both ends, reducing the discontinuities, resulting a more accurate FFT measurement.
A non-integral number of cycles cause discontinuities in the waveform produce high frequency transients which add false frequency information => Leakage Multiply the waveform record by applying a window function that is zero at the both ends, reducing the discontinuities, resulting a more accurate FFT measurement.
In the frequency domain, however, the affect is much more obvious. While the interleaving artifacts appear as noise in the time domain they are, in fact, not random and appear as discrete spectral lines. These frequency components appear at the sampling frequency of each A/D and at harmonics of this frequency. For example, if a 10 Gs/s A/D is built from four 2.5 Gs/s interleaved A/D converters, there will be spectral components at 2.5, 5, 7.5, and 10 GHz. These spectral components then mix with the spectrum of the input signal to generate additional spurs. The level of these spurious frequency components is fairly low – typically 50 dB below full scale. Since it is impossible to separate the spurious from the signal spectrum, the noise floor is essentially at the spurious level. This can be seen in this slide where on the left we see the spectrum of a 100 MHz sine wave sampled with interleaving and without interleaving on the right. The fundamental and harmonics of the sine wave are clearly seen in both spectra but the spurious in the spectrum on the left limit the effective dynamic range to 50 dB while the non-interleaved A/D produces a spectrum with 74 dB dynamic range.
Adding an additional low noise amplifier to the front end of the instrument ahead of the A/D improves the noise from -143 dBm/Hz to -148 dBm/Hz. This additional gain enables measurement of very small signals. Also note the very low spurious even with the lower noise floor.