Uploaded by Gianluca Bruno

31 - Spectrum analyzers v14 ADN

advertisement
Gruppo Misure
Elettriche
ed Elettroniche
Electrical and electronic measurements group
Spectrum Analyzers
Gruppo Misure
Elettriche
ed Elettroniche
Introduction
The Spectrum Analyzer (SA) is the fundamental tool for the analysis of
signals in the frequency domain.
This device, which can be analog or digital, may base its operation on
different techniques; the most commonly employed devices are however
only two: swept-tuned analyzers (Analogue spectrum analyzer) and
Fast Fourier Transform analyzers (Digital spectrum Analyzer).
On the market today you can find dedicated spectrum analyzers or allin-one instruments that integrate other features, proper of an
oscilloscope or a data acquisition device.
2
Gruppo Misure
Elettriche
ed Elettroniche
With a spectrum analyzer you can visualize the harmonic
content of a signal, characterize circuits of various types, measure signal-
to-noise ratios, verify the emission levels of EM disturbances of electronic
devices and appliances etc.
3
Gruppo Misure
Elettriche
ed Elettroniche
History of spectral analysis
The origin of the spectral analysis can be traced back to Bunsen and
Kirchhoff who, in 19th century, developed the idea that the spectrum of the
luminous radiation emitted by a substance (for example when heated)
depends on its chemical composition and its properties.
Although at that time no one probably realized the great relevance of this
"invention", some time later it gave rise to what is now commonly called
spectral analysis, whose mathematical expression is undoubtedly the
Fourier Transform (developed before the idea of Bunsen and Kirchhoff).
4
Gruppo Misure
Elettriche
ed Elettroniche
A significant contribution to this subject was given, in 1958, by two brilliant
researchers:
Blackman
and
Tukey;
they
published
the
famous
autocorrelation method which allowed to derive the power spectrum of a
signal by an estimation of the autocorrelation function of the observed
data.
It is however the introduction, in 1965, of the Fast Fourier Transform
(FFT) accredited to Cooley and Tukey which marks the advent of direct
estimation methods of the spectrum of signals.
5
Gruppo Misure
Elettriche
ed Elettroniche
The reason for the frequency analysis...
The most immediate way to analyze signals, characterize devices and
circuits, compare quantities and parameters of various types, is
undoubtedly to use a visualization in Time Domain.
The most commonly used instrument in these cases is the
oscilloscope.
The time domain, certainly the most immediate, is convenient in many
circumstances, such as for measurements of rise or settling times etc.
On the other hand, it is easy to verify that the visualization in time
provides an “overview" of the signal, i.e. all the different harmonic
components are added together and displayed simultaneously.
6
Gruppo Misure
Elettriche
ed Elettroniche
The Fourier analysis,
on
the
other
hand,
produces
the
decomposition of the
entire waveform into
spectral components,
each with a certain
amplitude, frequency, and phase value.
This passage from the time domain to the frequency one does not imply any
loss of information on the signal but only a different representation of it.
Therefore it can be said that the frequency domain, while perhaps less
congenial than time domain, is in many cases more useful for the study of
signals and devices.
7
Gruppo Misure
Elettriche
ed Elettroniche
So, for example, the oscilloscope display (time domain) of
a signal with many harmonics will hardly ever be able to highlight the
different components, even more so their respective amplitudes:
A [V]
2.5
2
A [V]
1.5
0
-2
0.5
0
0.02
0.04
t [s]
0.06
0
100
200
300
400
f [Hz]
Instead the use of a spectrum analyzer (frequency domain) will produce
complete signal information:
x ( t ) = 2  sin ( 2    50  t ) +1  sin ( 2    150  t ) +1  sin ( 2    250  t )
8
Gruppo Misure
Elettriche
ed Elettroniche
In the following example, a high frequency disturbance is shown:
A [V]
35
20
25
A [V]
15
-20
5
0
0.02
0.04
t [s]
0.06
0
400
800
1200
f [Hz]
by using frequency domain analysis, you can write:
x ( t ) = 30  sin ( 2    50  t ) + 2  sin ( 2    1000  t )
9
Gruppo Misure
Elettriche
ed Elettroniche
Even in the case of a small sinusoidal signal drowned in noise:
x ( t ) = 5  sin ( 2    50  t ) + n ( t )
A [V]
30
4.5
A [V]
3.5
Harmonic component at
invisible in the time domain
10
50
Hz
2.5
-10
1.5
-30
0.5
0
0.04
0.08
0.12
t [s]
0.16
0.2
0
1000
2000
3000
4000
f [Hz]
only the frequency analysis allows to shed light on the various components
present.
10
Gruppo Misure
Elettriche
ed Elettroniche
... and some of its applications
Therefore, applications of spectral analysis may cover multiple disciplinary
sectors (not only measurements) in which frequency components matter;
examples are telecommunications, digital signal processing, electrical
drives, geophysics, medicine etc.
In cellular radio systems it is very important to control the spectral content
of transmitted signals to avoid interference with other systems operating on
the same frequency bands. As another example, it is essential to carry out
signal-to-noise ratio measurements in the characterization of devices or,
for electronic manufacturers, to verify the emission levels at various
frequencies (EM disturbances) in compliance with regulations that are
more and more stringent.
11
Gruppo Misure
Elettriche
ed Elettroniche
Analog and digital spectrum analyzers
Basically a spectrum analyzer can obtain the frequency representation of a
signal in one of two different ways:
• Swept-tuned analog analyzers
• Fast Fourier Transform Real-time digital analyzers
The first method, typically implemented with the super-heterodyine
technique, basically consists in translating in frequency (heterodyning) a
signal in a band different from that of the original spectral components,
where they will then be filtered by a suitable band-pass filter and
demodulated.
This technique is used for the realization of analog
spectrum analyzers.
12
Gruppo Misure
Elettriche
ed Elettroniche
The second method digitizes the signal in the time domain and produces
its frequency representation using the discrete Fourier transform for a finite
number of samples. The practical result of this operation is a simultaneous
parallel filtering over the entire useful frequency band. A technique of this
kind allows the realization of digital spectrum analyzers.
13
Gruppo Misure
Elettriche
ed Elettroniche
The advantages of the digital analyzer over the former analog one are, in general,
1)
a significant improvement in speed, so much so that the analyzers that employ
it are also called "real-time",
2)
the possibility of characterizing single-shot signals (a consequence of point 1)
3)
the possibility to measure phase and amplitude of each single component (for
this reason they are also called vector spectrum analyzers).
Disadvantages of the digital technique are
1) a smaller bandwidth and 2) smaller sensitivity and dynamic range.
Today, digital spectrum analyzers combine both heterodyning (frequency
shifting) and FFT, hence they offers advantages of both methods.
14
Gruppo Misure
Elettriche
ed Elettroniche
1. Analog spectrum analyzers
It was the first type of spectrum analyzer to appear on the market (early
‘60s) before the widespread diffusion of digital spectrum analyzers.
However, it had some advantages that first digital spectrum analyzers did
not had (very high bandwidth, wide dynamic range etc.), which made them
irreplaceable for measurements on high frequency signals (order of tens of
GHz) recurring in cellular and satellite radio applications.
The most used analog analyzer is based on super-heterodyine which is a
frequency conversion method that permits the selection and display of
different signal components. More precisely, we'll see later that the
displayed powers refer, in reality, to more or less narrow subbands, not to
individual components.
15
Gruppo Misure
Elettriche
ed Elettroniche
If you have well understood the duality of the representation of a signal
in the time and frequency domains, you will also understand that the
easiest and immediate way to perform the analysis of the spectral
content of a signal would be building a sufficiently selective bandpass
filter with a variable and electronically controllable central frequency.
Before continuing, however, it is essential to give some details on signal
filters.
16
Gruppo Misure
Elettriche
ed Elettroniche
Analog and Digital filters
A filter is an electronic device able to select (filter) the spectral components
of a signal, strongly attenuating some and leaving almost unchanged (or
amplifying) others.
Filters can be either Analog (i.e. implemented by means of a suitable
connection of circuit elements such as capacitors, inductors and resistors)
or Digital, i.e. implemented by means of appropriate digital processing
techniques operated on signals that have been digitized.
The most common filters used in analogue spectrum analyzers are
themselves analogue, although, in the most sophisticated hybrid models,
there are also digital filtering stages that allow to increase performance
considerably.
17
Gruppo Misure
Elettriche
ed Elettroniche
Filters can be classified according to four basic types: Low-
pass, High Pass, Band-pass and Band-stop. Their names originate from the
residual spectral content that they leave in the output signal. Here is a
representation of the transfer functions of ideal filters:
G( j )
G( j )

 C1

C 2
filtro passa-basso ideale
Ideal
low-pass filter
filtro passa-alto
ideale
Ideal
high-pass
filter
G( j )
G( j )
 C1
C 2

filtro passa-banda
Ideal
band-passideale
filter
 C1
C 2

filtro sopprimi-banda
Ideal
band-stop ideale
filter
18
Gruppo Misure
Elettriche
ed Elettroniche
The frequency band where 𝐺 𝑗𝜔
the filter; the band where 𝐺 𝑗𝜔
≠ 0 is called the passband of
= 0 is called, instead, stopband.
The pulsations c, called cutoff (or break, or corner) frequencies,
are in correspondence with the transitions between passband and
stopband.
Actual physically realizable filters, however, have not such net
transitions between passband and stopband; they have, instead,
intermediate bands of non-zero width, called transition bands. In
addition, actual filters also present a certain variability of the
transfer function in passband as well as stopband.
19
Gruppo Misure
Elettriche
ed Elettroniche
There are several classes of analogue filters, with different
advantages and drawbacks. The main classes are:
• Chebyshev filters of type I, with
equiripple oscillations in
passband;
• Chebyshev filters of type II, with
equiripple oscillations in
stopband;
• Cauer, a.k.a. elliptic, filters, with
equiripple oscillations in
passband and stopband, but has
smallest transition band.
H ( j ) [dB]
• Butterworth filters, with a
maximally flat response;
𝐻(𝑗𝜔)/𝐻0 (dB)
normalizzata)
di trasferimento
funzione
dellaof
(modulo
transfer function
normalized
Module
0
-20
Butterworth
-40
Chebychev tipo II
Ellittico (Cauer)
-60
-80
Chebychev tipo I
-100
-120
-140
0.1
1
pulsazione normalizzata
Normalized
pulsation 𝜔(/
𝜔𝐶/ C )
10
The figure shows the module of the typical frequency response of several filters,
normalized to maximum amplitude 𝐻0 and expressed in dB. The frequency axis is
also normalized to the cutoff frequency 𝜔𝑐 . Please note the different transition
20
band widths.
Gruppo Misure
Elettriche
ed Elettroniche
The specifications on the frequency response of a filter are given through masks
that indicate to the designer the limits within which the transfer characteristic should
stay. For example, a design mask for a low pass filter might be the following:
massima variazione di guadagno
ammessa in banda passante
-20
-40
-60
-80
banda passante
banda di transizione
H ( j ) [dB]
𝐻(𝑗𝜔)/𝐻
0 (dB)
normalizzata)
di trasferimento
funzione
dellaof
(modulo
transfer function
normalized
Module
0
banda oscura
attenuazione minima
richiesta in banda oscura
-100
-120
-140
pulsazione di
taglio
𝑐𝑢𝑡𝑜𝑓𝑓
𝑝𝑢𝑙𝑠𝑎𝑡𝑖𝑜𝑛
In more advanced applications it is often necessary to meet well-defined constraints
also for the phase response of the filter, i.e. the behaviour of the phase of the
21
transfer function.
Gruppo Misure
Elettriche
ed Elettroniche
For our purposes (spectral analysis), however, it would be
necessary to create a very selective band-pass filter with a central frequency variable
and electronically controllable in a wide range.
B2
B1
(banda passante)
0
An essential feature of a band-pass filter is its
selectivity or quality factor, which have
several more or less equivalent definitions. For
our purposes, they can be defined as the ratio
between resonance frequency 𝜔0
and
bandwidth (where bandwidth is defined within
a given attenuation).
-20
H ( j) (dB)
-40
-60
-80
𝜔0
selectivity 𝑄 =
𝐵1
Δ
-100
-120
 C1
(pulsazione di taglio 1)
𝜔0

C2
(pulsazione di taglio 2)
However, this proved to be a rather difficult technological challenge, hence all spectrum
analyzers use different techniques to achieve the same end result, i.e. the selection of
small portions of the frequency spectrum of the signal to be analyzed.
22
Gruppo Misure
Elettriche
ed Elettroniche
The most widely used analysis method in commercial
analog spectrum analyzers is the so-called super-heterodyne, which has
the following working principle:
attenuatore
di ingresso
filtro passa basso
di preselezione
mixer
sensibilità
verticale
filtro IF
rivelatore
di picco
ingresso
segnale
filtro
video
VCO
Display CRT
generatore
di rampa
23
Gruppo Misure
Elettriche
ed Elettroniche
Let's briefly describe each functional block:
Input attenuator
Permits to adapt the amplitude of the input signal to the sensitivity of later stages. Its
presence reduces the distortion that would be introduced by the mixer for high power signals,
thus increasing the spurious free dynamic range of the analyzer which, in commercial
products, can be several tens of dBs.
Low-pass preselection filter
Filters the input signal to eliminate signals outside the analyzer's sensitivity band; given the
particular principle of operation of the spectrum analyzer, the presence of these signals would
distort measurement results.
VCO (Voltage Controlled Oscillator)
It is a sine waveform signal generator (sine oscillator) with frequency directly proportional to
the voltage applied on a control input.
24
Gruppo Misure
Elettriche
ed Elettroniche
Mixer
It is perhaps the main component of an analog spectrum analyzer; it shifts in frequency the
input signal permitting the use of a fixed frequency Intermediate Frequency band-pass filter.
Hence it overcomes the difficulty in implementing highly selective band-pass filters with
variable center frequency. We will see soon why the mixer is able to shift in frequency input
signals.
Ramp generator
It is a signal generator of a saw tooth waveform, virtually identical to what you can find in
analog oscilloscopes; it provides the input to the VCO and, in old spectrum analyzers, it is the
signal that pilots the horizontal deflection of the cathode ray tube (CRT).
Vertical sensitivity
It is an adjustable gain amplifier that (often) operates "in sync" with the input attenuator, in the
sense that, by "default“, its gain compensates exactly the attenuation of the input attenuator.
However, the operator is free to set any other gain among those available.
25
Gruppo Misure
Elettriche
ed Elettroniche
IF filter (intermediate frequency filter)
It's a band-pass filter with a fixed central frequency but with a bandwidth that can be controlled
by the operator. The output signal at this stage has very small bandwidth compared to the
bandwidth under examination (frequency span). Indeed, the bandwidth of the IF filter is called
Resolution Bandwidth (RBW).
Peak detector
Allows you to measure the peaks of its input signal; if the IF filter is selective enough, this
stage receives, ideally, a sine signal and, if it is well designed, it outputs a constant signal with
very low residual ripple.
Video filter
It is basically a low-pass filter and is inserted here to improve the quality of the signal
displayed on the CRT; it strongly attenuates the noise that adds to the signal at the various
intermediate stages of the analyzer.
Display
It is used to visualize the result of the spectral analysis and, in old analog analyzers, had a
structure very similar to that of the Vector scan CRT (Catod Ray Tube which use electrostatic
deflection) of analog oscilloscopes. Showing instrument settings and menus can only be
obtained with Raster CRT displays (which use magnetic deflection), which in modern digital
analyzers are replaced by LCDs.
26
Gruppo Misure
Elettriche
ed Elettroniche
Operating principle
To make clear the principle of operation of a super-heterodyne system,
few observations are sufficient:
1) the product of two signals in the time domain is equivalent to the
convolution of the respective spectra in the frequency domain (a
fundamental result of Fourier's theory). In formulas:
ℑ
+∞
𝑥1 (𝑡) ⋅ 𝑥2 (𝑡) ֎ 𝑋1 (𝑓) ∗ 𝑋2 (𝑓) = න
𝑋1 (𝜑) ⋅ 𝑋2 (𝑓 − 𝜑) 𝑑𝜑
−∞
27
Gruppo Misure
Elettriche
ed Elettroniche
2) the frequency spectrum of the function cos 𝜔0 𝑡 is real and consists
of two Dirac delta distributions with area 1/2, at frequencies ±𝜔0 :
T0 =
1
1
1
 ( −  0 ) +  ( +  0 )
2
2

⎯⎯
→
⎯
⎯
cos( 0t )
1
 ( + 0 )
2
1 2
=
f 0 0
F
0
t
1
 ( − 0 )
2
1
2
− 0
1
2
0 + 0

-1
28
Gruppo Misure
Elettriche
ed Elettroniche
3) the convolution of any function with a Dirac delta gives the same
function translated onto the delta; if we see this operation directly in
the frequency domain, we have:
X ( )  ( − 0 ) = X ( − 0 )
X ( )
X ( − 0 )
0

0 0

 ( −0 )

0 0


29
Gruppo Misure
Elettriche
ed Elettroniche
Apart from some side effects due to the inherent
nonlinearity of some of its components (especially the mixer), the superheterodyne system of an analog spectrum analyzer uses precisely these
three properties to produce a copy of the signal to be analyzed translating
in frequency its spectrum.
Afterwards, the intermediate frequency filter (a very selective band-pass
filter at a fixed central frequency) selects a small portion of the translated
signal spectrum and feeds it to the next stages, until it reaches the
vertical deflection stage of the CRT.
Since the (sinusoidal) signal provided by the VCO has a variable
frequency, controlled by the ramp generator which also pilots the
horizontal deflection of the CRT, the end result is to get a more detailed
representation of the signal spectrum the more selective the IF filter is.
30
Gruppo Misure
Elettriche
ed Elettroniche
Let [fmin,SA, fmax,SA] be the useful range of the spectrum analyzer. We should design
the analyzer by choosing both the frequency of the IF filter, fIF , as well as the
frequency range of the signal generated by the VCO.
It should be considered that the mixer is a non-linear device which outputs the sum
of: 1) the analyzer input signal (without frequency shift); 2) the signal coming from
the VCO; 3) components at frequencies which are the sum and the difference of
mixer inputs.
f SA
f SA
fVCO
In a real mixer, several components are
produced at frequencies ±𝑛 ∙ 𝑓𝑆𝐴 ±𝑚 ∙ 𝑓𝑉𝐶𝑂 ,
where n and m are integers ≥ 0. Stronger
components are obtained for small n and m.
fVCO
Gruppo Misure
Elettriche
ed Elettroniche
1.Choosing the Intermediate Filter frequency
First, you must use an intermediate filter frequency that is greater than the
spectrum analyzer range (fIF > fmax,SA), because part of the input signal
passes through the mixer (pass through) without being shifted in
frequency and would appear directly at the IF filter exit regardless of fVco.
Example: Suppose the frequency range of the spectrum analyzer is [10
kHz - 4 GHz] and that, by mistake, it is fIF 2 GHz. In this case, as
mentioned above, by choosing fIF within the instrument band, it cannot be
identified whether the harmonic component selected by the IF filter is
obtained by means of frequency shift or is an input signal component at
frequency 2 GHZ. In addition, to properly analyze the input signal
component located at 2 GHz, the signal should be shifted by 0 Hz, hence
the VCO should generate a 0 Hz, which is not possible.
Gruppo Misure
Elettriche
ed Elettroniche
2.Choosing the VCO frequency range
Remember that real signals have symmetrical spectrum and therefore it is
enough to analyze only half of the spectrum. When multiplying the input
signal with the VCO sinewave output, the spectrum of the signal is shifted
by fVco.
At this point, you need to choose which of the two subbands analyze,
namely which subband should be shifted into the band of the intermediate
frequency filter.
𝑓𝐼𝐹
Lower
Side band
Upper
Side band
0 f min
f max
Lower
Side band
𝑓𝑉𝐶𝑂 − 𝑓max
fVCO
Upper
Side band
𝑓𝑉𝐶𝑂 + 𝑓max
𝑓𝑉𝐶𝑂 − 𝑓min
𝑓𝑉𝐶𝑂 + 𝑓min
33
Gruppo Misure
Elettriche
ed Elettroniche
There are two options for choosing the VCO band:
Lower side band analysis
Upper side band analysis
𝑓𝑉𝐶𝑂 − 𝑓max ≤ 𝑓𝐼𝐹 ≤ 𝑓𝑉𝐶𝑂 − 𝑓min
𝑓𝑉𝐶𝑂 + 𝑓min ≤ 𝑓𝐼𝐹 ≤ 𝑓𝑉𝐶𝑂 + 𝑓max
f IF + f min  fVCO  f IF + f max
f IF − f max  fVCO  f IF − f min
You choose the solution that analyzes the lower side band to exclude that
products of the mixer at harmonic frequencies of 𝑓𝑉𝐶𝑂 fall into the filter
band. So the smallest frequency of the VCO is 𝑓min_𝑉𝐶𝑂 = 𝑓𝐼𝐹 + 𝑓min .
Signal band
f IF
VCO range
Choice of 𝑓𝑉𝐶𝑂
𝑓𝑉𝐶𝑂
For analyzing the
upper side band
f min
f max
f IF − f max
For analyzing the
f IF + f min
lower side band
f IF − f min
f IF + f max
Gruppo Misure
Elettriche
ed Elettroniche
In conclusion the following conditions must be verified:
1. f max_ SA  f IF
2. fVCO   f IF + f min_ SA ; f IF + f max_ SA 
A consequence of point 2 is that 𝑓𝐼𝐹 ≤ 𝑓min_𝑉𝐶𝑂 .
X ( f − f LO )
0
X( f )
f
f LO
mixer
HIF ( f )
0
f
0
sensibilità
verticale
0
f LO
f0,IF  f LO f
filtro IF
f
35
Gruppo Misure
Elettriche
ed Elettroniche
Under these conditions it is not possible for super-heterodyne spectrum
analyzers to measure the continuous component.
In fact, to analyze the component at zero frequency (𝑓min_SA = 0), you
should have fmin_VCO=fIF (in accordance with condition 2). In this case, due
to the mixer behavior, the same signal generated by the VCO passes
through the IF filter and is then displayed as if it was part of the input signal.
A further observation can be made regarding the condition 𝑓max_𝑆𝐴 < 𝑓𝐼𝐹 .
To enforce this condition, you use the low pass preselection filter that
filters the incoming signal in the spectrum analyzer band and avoids the
problem due to image frequencies.
36
Gruppo Misure
Elettriche
ed Elettroniche
Example: Consider a SA designed to operate in the range [5 kHz-10 MHz] having
an IF filter at 20 MHz. As seen above, the VCO should generate in the [20.005-30]
MHz frequency range.
There are no problems if you want to display a sine signal having frequency
fIN1=5 MHz (which complies to fIN1<fmax_SA), just use FVCO=25 MHz. In this case, at
the exit of the mixer you will get two pulses: one at 20 MHz frequency that falls
into the IF filter band and the other at 30 MHz frequency that is not displayed.
-5
−𝑓𝐼𝑁1
5
𝑓𝐼𝑁1
20
𝑓𝑉𝐶𝑂 − 𝑓𝐼𝑁1
25
𝑓𝑉𝐶𝑂
MHz
37
Gruppo Misure
Elettriche
ed Elettroniche
Let's see, instead, what happens to an input component of the SA at frequency
fIN2=45 MHz (fIN2>fmax_SA) in the case that component is not filtered by
preselection filter.
At fVCO=25 MHz, two pulses are obtained at the mixer output: one at a 20 MHz
frequency that falls into the IF filter band and the other at a 70 MHz frequency
that is not displayed. In conclusion, the analog spectrum analyzer in the absence
of the preselection low pass filter, at the same VCO setting, would
simultaneously measure the component associated with the 5 MHZ signal and
the component at 45 MHz, which is therefore called image frequency.
-5
−𝑓𝐼𝑁1
5
𝑓𝐼𝑁1
20
𝑓𝑉𝐶𝑂 − 𝑓𝐼𝑁1
𝑓𝐼𝑁2 − 𝑓𝑉𝐶𝑂
25
𝑓𝑉𝐶𝑂
MHz
45
𝑓𝐼𝑁2
image frequency
of 5 MHz
38
Gruppo Misure
Elettriche
ed Elettroniche
2. Digital Spectrum analyzers
The scheme of a digital spectrum analyzer can be traced back to 5 key
blocks:
Sensor
Or
Transducer
Analog
preconditioning
(amplifiers,
filters)
ADC
Processing
Display
Transduction: It happens (if necessary) at the probe level
Preconditioning: Consisting of electronic amplifiers, anti-aliasing filters,
low-pass filters (for noise elimination) and high-pass filters for the
elimination of DC.
Conversion: Fast or very fast ADCs (on the order of GSa/s) with low
resolutions (typical value: 8 bit);
39
Gruppo Misure
Elettriche
ed Elettroniche
Processing: possible application of a weighing window (Hann, Hamming,
Kaiser, Flat-Top etc.); Fast Fourier Transform (FFT); calculations on the
spectrum (RMS of individual harmonics, RMS of noise floor, THD, etc.)
Display: representation of the result of the spectral analysis
It is therefore clear that the "heart" of the instrument is the processing block,
that is, the block that deals with the implementation of the Discrete Fourier
Transform (DFT). To better understand the working principle of the digital
spectrum analyzer it is worth recalling some fundamental properties of the
Fourier Transform (FT). It is known that the FT of a continuous time signal 𝑥(𝑡)
is given by:
+∞
𝑋 𝑓 =න
𝑥 𝑡 ⋅ 𝑒 −𝑗⋅2⋅𝜋⋅𝑓⋅𝑡 𝑑𝑡
−∞
40
Gruppo Misure
Elettriche
ed Elettroniche
while the inverse Fourier transform is:
+∞
𝑥 𝑡 =න
𝑋 𝑓 ⋅ 𝑒 𝑗⋅2⋅𝜋⋅𝑓⋅𝑡 𝑑𝑓
−∞
The implementation of the FT In the discrete time domain (signal sampled
with period Ts) as the sum of an infinite number of samples leads to the
definition of the DTFT (Discrete Time Fourier Transform):
+∞
𝑋 𝑓 = ෍ 𝑥 𝑛𝑇𝒔 𝑒 −𝑗⋅2⋅𝜋⋅𝑓⋅𝑛⋅𝑇𝒔
X (f) is periodic with period 1/Ts , as a
consequence of sampling
𝑛=−∞
Clearly, since the memory of any real instrument is finite, it is necessary to
limit the length of the sample; this leads to the definition of Discrete Fourier
Transform (DFT):
𝑁−1
𝑋 𝑚𝐹 = ෍ 𝑥 𝑛𝑇𝒔 ⋅
𝑛=0
𝑁−1
𝑒 −𝑗⋅2⋅𝜋⋅𝑛⋅𝑚⋅𝐹⋅𝑇𝒔
= ෍ 𝑥 𝑛𝑇𝒔 ⋅
𝑛=0
2⋅𝜋
−𝑗⋅ 𝑁 ⋅𝑛⋅𝑚
𝑒
,
1
𝐹=
𝑁𝑇𝑆
41
Gruppo Misure
Elettriche
ed Elettroniche
where N is the number of samples, Ts the sampling period, To= N Ts the
window duration and F the frequency resolution given by:
𝐹𝑠
𝟏
𝟏
𝐹= =
=
𝑁 𝑵𝑻𝒔 𝑻𝑶
Also in this case it will be possible to derive the time-discrete signal of
origin by means of the Inverse Discrete Fourier Transform (IDFT):
𝑥 𝑛𝑇𝒔 =
𝑁−1
𝑁−1
𝑚=0
𝑚=0
1
1
෍ 𝑋 𝑚𝐹 ⋅ 𝑒 𝑗⋅2⋅𝜋⋅𝑛⋅𝑚⋅𝐹⋅𝑇𝒔 = ෍ 𝑋 𝑚𝐹 ⋅ 𝑒 𝑗⋅2⋅𝜋⋅𝑛⋅𝑚/𝑁
𝑁
𝑁
In Practice the DFT establishes the relationship between the signal
samples in the time domain and their representation in the frequency
domain.
42
Therefore if you consider N samples of x (t):
Gruppo Misure
Elettriche
ed Elettroniche
𝑥(0), 𝑥(𝑇𝒔 ), 𝑥(2𝑇𝒔 ), . . . , 𝑥((𝑁 − 1)𝑇𝒔 )
The DFT, which produces the frequency representation of the signal, is also
made up of N samples:
𝑋(0), 𝑋(𝐹), 𝑋(2𝐹), . . . , 𝑋((𝑁 − 1)𝐹)
X ( mF )
x ( nTs )
0.8
0.9
0.4
0.7
DFT
0
-0.4
0.5
0.3
-0.8
0.1
0
10
20
30
0
Time Domain
10
20
30
Frequency domain
43
Gruppo Misure
Elettriche
ed Elettroniche
where the distance between two successive samples in
time will be equal to the sampling period Ts while the distance between two
samples in frequency will be equal to the spectral resolution 𝐹 =
1
𝑁𝑇𝑠
.
The sequence notation 𝒙 𝒏 = 𝒙𝒏 = 𝒙(𝒏𝑻𝒔 ) and 𝑿 𝒎 = 𝑿𝒎 = 𝑿(𝒎𝑭) is
also used. To fully understand the operation of the digital Spectrum
Analyzer it is now useful to recall some properties of the DFT.
1. The discrete signal 𝑥(𝑛𝑇𝑠) and its DFT 𝑋(𝑚𝐹) can both be considered
periodic with periods 𝑁𝑇𝑠 and 𝑁𝐹 = 1/𝑇𝑠 , respectively:
𝑥( 𝑛 + 𝑘 ⋅ 𝑁 𝑇𝒔 ) = 𝑥(𝑛𝑇𝒔 )
𝑋( 𝑚 + 𝑘 ⋅ 𝑁 𝐹) = 𝑋(𝑚𝐹)
2. The DFT of a signal x(nTs) is, generally, a complex function of 𝑚𝐹:
𝑋(𝑚𝐹) = 𝑋𝑟𝑒 (𝑚𝐹) + 𝑗 ⋅ 𝑋𝑖𝑚 (𝑚𝐹)
44
Gruppo Misure
Elettriche
ed Elettroniche
3.
If the signal x (nTs) is real, the module of DFT has even symmetry, while phase
has odd symmetry. Equivalently, we can say that the real part of the DFT is an
even function of 𝑚𝐹 while the imaginary part is an odd function of 𝑚𝐹:
X re ( m)
𝑋𝑟𝑒 (−𝑚𝐹) = 𝑋𝑟𝑒 ( 𝑁 − 𝑚 𝐹) = 𝑋𝑟𝑒 (𝑚𝐹)
X im ( m)
𝑋𝑖𝑚 (−𝑚𝐹) = 𝑋𝑖𝑚 ( 𝑁 − 𝑚 𝐹) = −𝑋𝑖𝑚 (𝑚𝐹)
45
Gruppo Misure
Elettriche
ed Elettroniche
4. If the signal x(nTs) is imaginary, its DFT will have a real part with odd
symmetry and an imaginary part with even symmetry:
𝑋𝑟𝑒 (−𝑚𝐹) = 𝑋𝑟𝑒 ( 𝑁 − 𝑚 𝐹) = −𝑋𝑟𝑒 (𝑚𝐹)
𝑋𝑖𝑚 (−𝑚𝐹) = 𝑋𝑖𝑚 ( 𝑁 − 𝑚 𝐹) = 𝑋𝑖𝑚 (𝑚𝐹)
5. The DFT of the linear combination of two signals over time is the
linear combination of the individual DFTs (i.e. the DFT is a linear
operator):
𝑥(𝑛𝑇𝒔 ) = 𝑎1 ⋅ 𝑥1 𝑛𝑇𝑺 + 𝑎2 ⋅ 𝑥2 𝑛𝑇𝒔 ⇔ 𝑋(𝑚𝐹) = 𝑎1 ⋅ 𝑋1 (𝑚𝐹) + 𝑎2 ⋅ 𝑋2 (𝑚𝐹)
6. A delay (cyclic shift) of the signal in the time domain is equivalent to a
phase shift of the DFT:
𝑦(𝑛𝑇𝒔 ) = 𝑥( 𝑛 − 𝑘 𝑇𝒔 ) ⟺ 𝑌(𝑚𝐹) = 𝑋(𝑚𝐹) ⋅
2⋅𝜋
−𝑗 𝑁 𝑘𝑚
𝑒
46
Gruppo Misure
Elettriche
ed Elettroniche
7. A phase shift in the time domain introduces a corresponding delay
(cyclic shift) in the DFT :
𝑥 𝑛𝑇𝒔 ⋅ 𝑒
+𝑗
2⋅𝜋
𝑘𝑛
𝑁
⟺𝑋
​ ( 𝑚 − 𝑘 𝐹)
8. The DFT of the cyclic convolution of two signals in the time domain is
given by the product of the individual DFT In the frequency domain:
𝑁−1
𝑦 𝑘𝑇𝑠 = 𝑥 𝑘𝑇𝑠 ∗ ℎ 𝑘𝑇𝑠 = ෍ 𝑥 𝑛𝑇𝑠 ⋅ ℎ 𝑘 − 𝑛 𝑇𝑠 ⟺
𝑛=0
⟺ 𝑌(𝑚𝐹) = 𝑋(𝑚𝐹) ⋅ 𝐻(𝑚𝐹)
9. The product of two signals in the time domain is equivalent to the
cyclic convolution of their respective DFTs:
𝑧(𝑛𝑇𝒔 ) = 𝑥 𝑛𝑇𝒔 ⋅ 𝑦 𝑛𝑇𝒔 ⟺ 𝑍(𝑚𝐹) = 𝑋(𝑚𝐹) ∗ 𝑌(𝑚𝐹)
47
Gruppo Misure
Elettriche
ed Elettroniche
Returning now to the problem of the elaboration of the FT in the digital
spectrum analyzer and using the previously seen DFT properties, two
important conclusions can be drawn:
• The digital spectrum analyzer will only process real signals over time,
its DFT will be complex and contain information of both amplitude and
phase:
𝑋 𝑚𝐹 = 𝑋 𝑚𝐹 𝑒 𝑗∡𝑋
𝑚𝐹
• Moreover, since the signal will certainly be real, its DFT will be
symmetric with respect to the index N/2:
𝑋(𝑚𝐹) = 𝑋( 𝑁 − 𝑚 𝐹)
∡𝑋[𝑚𝐹] = −​∡​𝑋[ 𝑁 − 𝑚 𝐹]
48
Gruppo Misure
Elettriche
ed Elettroniche
Hence the DFT of a real signal contains redundant information in its N
samples, and the use of N/2 samples is sufficient for a full representation
in the frequency domain of the signal.
It is now easy to describe how the DFT algorithm works.
It has been seen that a sampling interval of Ts corresponds to a frequency
resolution 𝐹 = 𝐹𝑠 /𝑁 = 1/𝑁𝑇𝑠 . This means that the k-th output of the DFT
corresponds to the harmonic frequency component 𝑓𝑘 = 𝑘 · 𝐹 ; the
properties of the DFT ensure that only the first half of its samples carry
independent information because the remaining N/2 are redundant and
contain information about the negative frequencies.
We’ll see things in more detail...
49
Gruppo Misure
Elettriche
ed Elettroniche
The bin X (0·F) = X [0] always
represents the continuous
𝑁=32
3
component of the signal. If N is
even, bins X [1].... X [N/2-1]
2
contain useful spectral
information, bin X[N/2] shows the
component (cosine only, not
1
sine) at the folding frequency and
bins from N/2 + 1 to N-1
represent components at
0
5
15
25
31
negative frequencies, which will
have amplitude (module) equal
to the corresponding
components at positive
frequency, e.g. 𝑋 1 = 𝑋 𝑁 − 1 ∗ .
Continuous
Component
Positive
Frequencies
Folding
Frequency
f = 16 F
Negative
Frequencies
50
Gruppo Misure
Elettriche
ed Elettroniche
The only difference when N is
3
an odd number, is that the
folding component is not
2
visible because in this case
N/2 isn’t a whole number.
1
0
Component
Go on
5
15
Frequencies
Positive
25
30
Frequencies
Negative
51
Gruppo Misure
Elettriche
ed Elettroniche
It is worth noting that to get a significant time saving in digital
processing, the implementation of DFT is done efficiently through the FFT. This
algorithm (which, as mentioned above, was originally proposed by Cooley and
Tukey), is effective when N is a power of 2, and exploits many symmetries in DFT
calculation. The computational saving produced in this case is the reduction of the
number of complex value operations from N2 to about N·log2N (e.g. when N = 4096,
you pass from almost 17 million to just about 49’000 operations!).
In case N is not a power of 2 several artifices can be used to allow the use of the
FFT; the most widespread artifice, useful when the signal is not periodic, is the zeropadding, that is the addition at the end of the sequence of zero-value samples, which
speeds up processing and "fictitiously" increases frequency resolution. This operation
actually produces only a frequency interpolation of the spectrum of a signal which is
zero outside the observation window; it increases the number of DFT bins while
maintaining the shape of the spectrum almost intact but producing a more detailed
view of it (reduction of the picket-fence effect).
52
Gruppo Misure
Elettriche
ed Elettroniche
0.7
0.8
0.5
0.4
0
0.3
-0.4
0.1
-0.8
0
4
8
12
16
20
0
4
8
12
16
20
0.7
0.8
0.5
0.4
0
0.3
-0.4
0.1
-0.8
0
10
20
30
0
10
20
30
53
Gruppo Misure
Elettriche
ed Elettroniche
ampiezze
3
The Power spectrum
2
It has been seen that the DFT
measures not only amplitudes but,
1
compared to the analogue SA, also
the phases of the individual signal
components. In all those cases where
0
5
15
25
35
25
35
80
potenza
you are not interested in the signal
60
phase, it may be convenient to
consider the Power Spectral Density
40
(PSD). The PSD, proportional to the
square of the individual components
of the DFT, shows the power of the
signal components at the various
frequencies.
20
0
5
15
54
Gruppo Misure
Elettriche
ed Elettroniche
For time continuous signals 𝑥 𝑡 , power is
1 +𝑇/2
𝑃𝑥 = lim න
𝑥 𝑡
𝑇→∞ 𝑇 −𝑇/2
2
𝑑𝑡
Power Spectral Density 𝑆𝑥 𝑓 is
2
𝑋𝑇 𝑓
𝑆𝑥 𝑓 = lim
𝑇→∞
𝑇
𝑇
where 𝑋𝑇 (𝑓) is the Fourier transform of 𝑥𝑇 𝑡 = ൝
𝑇
𝑥 𝑡 , for − 2 < 𝑡 < 2
0,
elsewhere
.
𝑆𝑥 𝑓 has the dimensions of power divided frequency, hence it is measured in
W/Hz , or, for voltage signals, V 2 /Hz.
𝑓
Power in a band between 𝑓1 and 𝑓2 is given by‫ 𝑓׬‬2 𝑆𝑥 𝑓 𝑑𝑓 .
1
That definitions are developed further in the context of random signals, however
deterministic signals will be considered here.
55
Gruppo Misure
Elettriche
ed Elettroniche
• For finite sequences of samples we can calculate the DFT 𝑋(𝑚𝐹), instead of
the Fourier transform 𝑋(𝑓) , and the Periodogram is defined as:
𝑋(𝑚𝐹)
𝑁
2
• Power Spectral Density of the original continuous signal can be estimated
from the Periodogram as:
𝑋(𝑚𝐹)
𝑆𝑥 𝑚𝐹 = 𝑇𝑠 ×
𝑁
2
2
2
𝑋𝑟𝑒
(𝑚𝐹) + 𝑋𝑖𝑚
(𝑚𝐹)
= 𝑇𝑠 ×
𝑁
units
W
Hz
• Power integrated in a frequency bin of the DFT, which has resolution
𝑓𝑠 /𝑁, is:
𝑓𝑠
𝑿(𝒎𝑭) 𝟐
𝑆𝑥 𝑚𝐹 × =
𝑁
𝑵×𝑵
units W
56
Gruppo Misure
Elettriche
ed Elettroniche
𝑓𝑠 = 10 Hz
Example
𝑁
𝑁 = 16
𝑇𝑂 = 𝑓 = 1.6 s
𝑠
Resolution 𝐹 = 1/𝑇𝑂 = 0.625 Hz
Synchronous sampling of a signal at frequency 𝑓𝑥 = 3/𝑇𝑂 = 1.875 Hz
𝑦 𝑡 = 𝐴 cos 2𝜋𝑓𝑥 𝑡
Power is 𝐴2 /2 = 1/2 V 2
𝐴=1V
8 𝑗2𝜋𝑓 𝑡
𝑥
𝑒
16
8 −𝑗2𝜋𝑓 𝑡
𝑥
𝑒
16
Power is
DFT 3𝐹 2
𝑁2
11
+
DFT −3𝐹 2
𝑁2
=
8 2
16
+
8 2
16
1
1
1
= 4 + 4 = 2 V2
1𝑁
Density at 𝑓𝑥 is 4 𝐹 = 4 𝑓 = 0.4 V 2 /Hz , changes with 𝑁 and 𝑓𝑠 !
𝑠
58
Gruppo Misure
Elettriche
ed Elettroniche
Of course, thanks to the symmetry
property of the DFT of a real signal,
the power spectrum at the positive
ampiezze
3
frequencies is the same of negative
2
frequencies and, even though the
1
number of its components is
0
always N, just as in the case of
5
15
25
35
80
potenza
DFT, only N/2 components are
sufficient to describe the PSD of
the signal. Again, the component at
the folding frequency is visible only
60
40
20
when N is even.
0
5
15
25
35
59
Gruppo Misure
Elettriche
ed Elettroniche
Leakage and windowing problems
It is known that the sampling theorem ensures the perfect reconstruction of
band-limited signals (note: a band-limited sig. cannot be also time-limited) :
-
for an aperiodic signal, an infinite number of samples is required;
-
for a periodic signal, a finite number of samples is required, but with an
observation window which is a whole multiple of the signal period.
In any other case an inherent discontinuity on the sampled signal will be
introduced.
Because of the limited memory of the spectrum analyzer, there is an
inherent restriction of the observation interval, and therefore on the number
N of samples of the DFT. In DFT, it is assumed a “periodization” of the
signal in time with period N. Indeed, the FT of a 𝑇0 periodic signal has only
frequency components (Dirac deltas) at multiples of 1/𝑇0 .
60
Gruppo Misure
Elettriche
ed Elettroniche
This periodization, which is applied in both cases of
periodic and aperiodic signals, produces, in general, a discontinuity
a mpiezza
ampiezza
between the successive repetitions of the acquired signal.
discontinuità
tempo
tempo
finestra di osservazione
61
Gruppo Misure
Elettriche
ed Elettroniche
The result of this operation in the frequency domain is the emergence of
spectral components that are not actually present in the spectrum of the
starting signal, so that the final spectrum is a "smeared" version of the
original spectrum.
A [V]
3.5
3.5
A [V]
2.5
2.5
1.5
1.5
0.5
0
40
80
N
120
0.5
0
40
80
N
120
62
Gruppo Misure
Elettriche
ed Elettroniche
This can be understood by considering that using a finite sequence
corresponds to multiplying the original signal 𝑥𝑜 𝑛𝑇𝑠 by a
rectangular window 𝑤 𝑛𝑇𝑠 , which in frequency domain
corresponds to convolve with the transform of a rectangular
signal.
𝑥 𝑛𝑇𝑠 = 𝑥𝑜 𝑛𝑇𝑠 ∙ 𝑤(𝑛𝑇𝑠 ) ⇔ 𝑋(𝑓) = 𝑋𝑜 𝑓 ∗ 𝑊 𝑓
In general, this will cause:
• Truncation error, observed in time domain.
• Leakage (or spectral dispersion) observed in frequency domain
•A possible aliasing error, because truncation and leakage can
produce frequency components higher than folding frequency 𝑓𝑠 /2,
which will be folded into the base band. Indeed, because of
possible abrupt discontinuities between the successive repetitions
of the periodized signal, high frequency components may be
introduced.
63
Gruppo Misure
Elettriche
ed Elettroniche
To reduce these adverse effects, windows different from the
rectangular one can be used.
The aim is to attenuate the discontinuities introduced by the signal
truncation and periodization using windows with more suitable
weights 𝑤 𝑛𝑇𝑠 that show a more "gentle" trend at the extremes of the
observation interval.
These new weights smooth the signal near window borders.
The time behavior of the window will define the spectral
characteristics of the lobes of the corresponding Fourier Transform
and, consequently, the final effect on the reconstructed spectrum. All
this is explained by keeping in mind that windowing implies the
multiplication in time of the data record with a function and,
consequently, the convolution in the frequency domain of the signal
spectrum and the window spectrum.
64
Gruppo Misure
Elettriche
ed Elettroniche
There is no “perfect" window because each window makes a compromise
between two factors:
• Frequency resolution (width of the main lobe). It affects the accurate
estimation of the frequency of a pure tone.
• Spectral dispersion (amplitude of the side lobes). High dispersion means
that higher-power components can leak in frequency and hide smaller
components.
The width of the main lobe and the amplitude of the side lobes cannot be
minimized at the same time.
It is worth highlighting that only when the data record contains a whole
number of cycles there is no leakage and the rectangular window should
be used, however this is a condition that can not be perfectly realized in
practice.
65
Gruppo Misure
Elettriche
ed Elettroniche
Usefulness of windowing should be discussed in relation to the signal to be
analyzed and applications.
1)
Periodic signals (e.g. a single tone) can be measured without leakage
errors if the rectangular window contains an integer number of signal
cycles (a condition called synchronized sampling, which will be
discussed later). If not, windows choice matters.
2)
Deterministic aperiodic signals that extend outside the observation
window, are subjected to unrecoverable information loss, independently
on window choice.
3)
Deterministic aperiodic signals, which are entirely inside the window and
zero outside (such as transient response of a system): windowing may
be useful. In this case, signal is not bandlimited, hence in some
circumstances sampling may produce interference from spectral replicas,
which can be mitigated by proper widowing. Windowing can be also used
to reduce measurement noise contribution where the signal fades out.
4)
For random stationary signals, statistical properties of the entire signal
may be estimated inside an observation window: in this case window
choice matters.
66
Gruppo Misure
Elettriche
ed Elettroniche
Class of cosine windows
 2 ln 
w ( nTc ) =  ( − 1)l a l cos 

N


l =0
L
Rectangular
Hann
(Hanning)
Blackman
Cosine window of order L
Normalization condition:
σ𝐿𝑙=0 𝑎𝑙 = 1
Flat Top
Rectangular
Hann
Blackman
Sample index
Flat Top
Properties
𝑁
Odd derivatives, at the edges 𝑛 = ± 2 are null because the window is a sum of
cosines.
𝑁
Even derivatives of order 𝑗, at the edges 𝑛 = ± 2 , are given by
𝐿
𝑤
𝑗
±𝑁/2 = ෍ −1 𝑙 𝑙 𝑗 𝑎𝑙
𝑙=0
67
Gruppo Misure
Elettriche
ed Elettroniche
Spectrum (DTFT) of the
cosine window:
 sin ( ) L
al
l
W( f )=
−
1
(
)
  2 − l2
 ao l =0
Flat Top
Rectangular
Where 𝛿 = 𝑁𝑇𝑠 𝑓
Hann
(Hanning)
Blackman
Rectangular
Hanning
Blackman
Flat Top
The asymptotic frequency decay (spectral dispersion) depends on the
cancellation of the derivatives at the edges.
w (  N / 2 ) = w (t )  0 
t → N /2−
The decay is 1/f when the window
is not zero at the edges (the
derivative of order 𝑗 = 0 is not
zero)
68
Gruppo Misure
Elettriche
ed Elettroniche
𝑤 ±𝑁/2 = 𝑤 𝑡
=0
𝑤 ′′ ±𝑁/2 = 𝑤 ′′ 𝑡
≠0
𝑤 ±𝑁/2 = 𝑤 𝑡
=0
𝑡
→𝑁/2−
𝑡 →𝑁/2−
𝑡
→𝑁/2−
𝑤 ′′ ±𝑁/2 = 𝑤 ′′ 𝑡
𝑡
→𝑁/2−
⇒
The decay Is 1/𝑓 3 If the window is
zero at edges, but it’s 2-nd
derivative is not zero.
= 0 ⇒ frequency decay 1/𝑓 5
𝑤 𝐼𝑉 ±𝑁/2 = 𝑤 𝐼𝑉 𝑡 ≠ 0
𝑡 →𝑁/2−
69
Gruppo Misure
Elettriche
ed Elettroniche
The equivalent noise bandwidth of the window, 𝑬𝑵𝑩𝑾, is defined in terms of
DTFT, 𝑊(𝑓), of the sampled window or, equivalently, in terms of its DFT,
𝑊 𝑚𝐹 , or also in time domain (remember Parseval’s theorem):
𝑓𝑠
2
𝑊 2 0 ⋅ 𝐸𝑁𝐵𝑊 = න
𝑓
− 2𝑠
𝑁−1
𝑓𝑠
𝑊 𝑓 2 𝑑𝑓 = ෍ 𝑊 𝑚𝐹
𝑁
𝑁−1
2
𝑚=0
= 𝑓𝑠 × ෍ 𝑤 2 𝑛𝑇𝑠
𝑛=0
It is the bandwidth 𝐸𝑁𝐵𝑊 of a rectangular filter with fixed gain 𝑊(0) having the
same power of the window.
𝐸𝑁𝐵𝑊 can be calculates also in time domain, as
𝑁−1
𝐸𝑁𝐵𝑊 = 𝑓𝑠 × ෍
𝑛=0
2
𝑁−1
𝑤2
𝑛𝑇𝑠 / ෍ 𝑤 𝑛𝑇𝑠
𝑛=0
𝑁𝑃𝐺
= 𝑓𝑠 ×
𝑃𝑆𝐺 2
Δ
2
where we have defined Noise Power Gain 𝑁𝑃𝐺 = σ𝑁−1
𝑛=0 𝑤 𝑛𝑇𝒔
Δ
and Peak Signal Gain 𝑃𝑆𝐺 = σ𝑁−1
𝑖=0 𝑤 𝑛𝑇𝑐 = 𝑊(0).
For the rectangular window, 𝑬𝑵𝑩𝑾 = 𝒇𝒔 /𝑵 =frequency resolution.
Indeed, for any window, 𝐸𝑁𝐵𝑊 is also called frequency resolution of the window.
The normalized 𝐸𝑁𝐵𝑊 is defined, by comparison with a rectangular window, as
𝐸𝑁𝐵𝑊
.
𝑓𝑠 /𝑁
70
Gruppo Misure
Elettriche
ed Elettroniche
Starting from the previously reported expressions for the discrete
signal, its DFT and its PSD, obtained for the rectangular window
case
𝑁−1
Sampled signal:
1
𝑥 𝑛𝑇𝒔 = ෍ 𝑋 𝑚𝐹 ⋅ 𝑒 𝑗⋅2⋅𝜋⋅𝑛⋅𝑚⋅𝐹⋅𝑇𝒔
𝑁
𝑚=0
𝑁−1
DFT:
𝑋 𝑚𝐹 = ෍ 𝑥 𝑛𝑇𝒔 ⋅ 𝑒 −𝑗⋅2⋅𝜋⋅𝑛⋅𝑚⋅𝐹⋅𝑇𝒔
𝑛=0
PSD:
Power in a bin:
𝑋 𝑚𝐹
𝑆𝑥 𝑚𝐹 = 𝑇𝑠 ×
𝑁
𝑋 𝑚𝐹 2
𝑁×𝑁
2
units
W
Hz
units W
71
Gruppo Misure
Elettriche
ed Elettroniche
we can introduce equivalent expressions for the case a generic
window is used:
Sampled and windowed signal:
𝑥𝑤 𝑛𝑇𝒔 = 𝑥 𝑛𝑇𝒔 ⋅ 𝑤 𝑛𝑇𝒔
𝑁−1
DFT (convolution):
𝑋𝑤 𝑚𝐹 = ෍ 𝑥 𝑛𝑇𝒔 𝑤 𝑛𝑇𝒔 𝑒 −𝑗⋅2⋅𝜋⋅𝑛⋅𝑚⋅𝐹⋅𝑇𝒔 = 𝑋 𝑚𝐹 ∗ 𝑊 𝑚𝐹
𝑛=0
PSD:
𝑆𝑥𝑤
𝑋𝑤 𝑚𝐹
𝑚𝐹 = 𝑇𝑠 ×
𝑁𝑃𝐺
2
where NPG is the Noise Power Gain of the window:
Δ
2
𝑁𝑃𝐺 = σ𝑁−1
𝑛=0 𝑤 𝑛𝑇𝒔 , which for a rectangular window is equal to N.
Power in a bin:
𝑋𝑤 𝑚𝐹 2
𝑁𝑃𝐺 𝟐
72
Gruppo Misure
Elettriche
ed Elettroniche
Basically we can't give universal rules about the type of
window to be used in signal analysis; it will change from time to time and the
correct choice depends on a prior knowledge of the signal to be examined. It
can certainly be said that:
• The rectangular window gives maximum frequency resolution (narrower
main lobe but lateral lobes decaying more slowly) but amplitude estimates
have errors that can reach 36%.
• The flat-top window gives the most accurate amplitude estimates but its
frequency selectivity is very low (flat main lobe, but wider among all
windows and very small side lobes) ;
• The Hann window is the most used for its globally good properties (main
lobe larger than the rectangular window but lateral lobes decaying faster).
73
Gruppo Misure
Elettriche
ed Elettroniche
The estimation of spectral components
Let’s recall that the DFT has N outputs spaced apart by a range equal
to frequency resolution:
𝐹=
1
𝑓𝑠
=
𝑁𝑇𝑠 𝑁
Among the N output elements of the DFT, only the first N/2 will be
significant: they represent the continuous component 𝑋(0𝐹) and
components 𝑋(𝑖𝐹)|, with i=1:N/2-1.
1. Estimation of amplitudes
To obtain the correct value of the individual amplitudes, it is necessary
to divide the DFT by the number N of samples, and keep in mind that
for components other than continuous, it is necessary to consider both
the positive and negative components, or equivalently, multiply by 2 the
DFT at positive frequencies and ignore negative frequencies.
74
Gruppo Misure
Elettriche
ed Elettroniche
N
• For
a
rectangular
window
synchronous sampling, it is:
𝑋(0𝐹)
𝐴0 =
;
𝑁
𝑋(𝑘𝐹)
𝐴𝑘 = 2
𝑁
and
A3 N
k=1...N/2−1
It can be demonstrated by considering that component 𝐴𝑘 has power
𝐴2𝑘
2
, which should be equal to power in frequency domain in bins +𝑘𝐹
𝑋 𝑘𝐹 2
,
𝑁2
𝑋(𝑘𝐹)
and −𝑘𝐹, which is 2
hence 𝐴𝑘 = 2
.
𝑁
For windowed signals and synchronous sampling it is:
X ( 0F )
A0 =
;
PSG
X ( kF )
Ak = 2
PSG
k=1...N/2-1
where 𝑃𝑆𝐺 = σ𝑁−1
𝑖=0 𝑤 𝑛𝑇𝑐 = 𝑊(0) is the Peak Signal Gain , which is
N for a rectangular window.
75
• In the case of not synchronous
sampling the above formula results in
an error in estimating the amplitude
components that depends on the type
of the window and on the fractional bin
of spectral offset,
𝛿 = (𝑓 − 𝑘𝐹)/𝐹 ∈ −0.5,0.5
N
Amplitude error
()
The error is proportional to 𝑆𝐿 𝛿 and can be corrected as follows:
A0 =
X ( 0F )
SL ( ) PSG
;
Ak = 2
X ( kF )
SL ( ) PSG
k=1...N/2-1
where with 𝑆𝐿 𝛿 it has been indicated Scalloping Loss of the window.
For cosine windows, it is 𝑆𝐿 𝛿
=
𝛿⋅sin 𝜋𝛿
𝜋⋅𝑎0
σ𝐿𝑙=0 −1
𝑙
𝑎𝑙
𝛿 2 −𝑙 2
Since 𝛿 is, in general, unknown, an alternative that gives good estimations consists
in interpolating between adjacent spectral lines (interpolated DFT techniques).
76
2. Frequency estimation
Frequency estimation requires no special precaution except to multiply
the single output of the DFT by the frequency resolution F.
• In the case of synchronous sampling the generic component Ak is
located at frequency:
f = kF ;
k=0....N/2-1
• In the case of not synchronous sampling the above formula results
in an error 𝛿𝐹 in frequency estimation, therefore:
𝑓 = 𝑘 + 𝛿 𝐹;
k=0....N/2−1
77
3. Phase estimation
A cosine signal with frequency 𝑘𝐹 and phase 𝜑 is defined as
𝑥 𝑡 = A cos 2𝜋 𝑘𝐹 𝑡 + 𝜑 = 𝐴
Its DFT has only components 𝑋 𝑘𝐹 =
𝑒𝑖
𝑘𝐹𝑡+𝜑
𝐴𝑒 𝑖𝜑
𝑁
2
+ 𝑒 −𝑖
2
𝑘𝐹𝑡+𝜑
and 𝑋 −𝑘𝐹 =
𝐴𝑒 −𝑖𝜑
𝑁
.
2
When performing a DFT, 𝑋 𝑘𝐹 can be expressed, in general, as
𝑋 𝑘𝐹 = 𝑋𝑟𝑒 𝑘𝐹 + 𝑗𝑋𝑖𝑚 𝑘𝐹 = 𝑋 𝑘𝐹 𝑒 𝑗⋅∠𝑋
𝑘𝐹
By comparison:
𝐴𝑒 𝑖𝜑
𝑁
= 𝑋 𝑘𝐹 𝑒 𝑗⋅∠𝑋
2
𝑘𝐹
Hence, a cosine signal can be estimated as 𝐴 =
𝜑 = ∠𝑋 𝑘𝐹 = arg 𝑋 𝑘𝐹
2
𝑁
𝑋 𝑘𝐹
𝑋𝑖𝑚 𝑘𝐹
𝑎𝑟𝑐𝑡𝑔
,
𝑋𝑟𝑒 𝑘𝐹
=
𝑋𝑖𝑚 𝑘𝐹
𝑎𝑟𝑐𝑡𝑔
+ 𝜋,
𝑋𝑟𝑒 𝑘𝐹
and
𝑖𝑓 𝑋𝑟𝑒 𝑘𝐹 ≥ 0
𝑖𝑓 𝑋𝑟𝑒 𝑘𝐹 < 0
78
Instead, a sine signal with phase 𝜑, is defined as
By
𝜋
𝑥 𝑡 = A sin 2𝜋 𝑘𝐹 𝑡 + 𝜑 = A cos 2𝜋 𝑘𝐹 𝑡 + 𝜑 −
2
using the previous result on cosines, we
obtain
𝜋
2
𝜑 − = arg 𝑋 𝑘𝐹 , hence
𝜑 = 𝑎𝑟𝑔 𝑋 𝑘𝐹
𝜋
+
2
When sampling is not synchronous, 𝑓 = 𝑘 + 𝛿 𝐹,
−0.5 ≤ 𝛿 ≤ 0.5,
but frequency is known, phase can be approximated as
𝜑 ≅ arg 𝑋 𝑘𝐹
+ 𝜋δ, for a cosine signal
𝜑 ≅ arg 𝑋 𝑘𝐹
+ + 𝜋δ, for a sine signal
𝜋
2
Please note that the term 𝜋δ may be significant in the above formulas
but, unfortunately, it can not be calculated when frequency is not
accurately known.
79
Gruppo Misure
Elettriche
ed Elettroniche
Digital Spectral Analysis Summary
➢ At the heart of the digital spectrum analyzer is FFT processing; it is an
algorithm for calculating the DFT that reduces the number of numerical
operations without producing any loss of information.
➢ The FFT of a real signal is a complex function with even amplitude
symmetry and odd phase symmetry; only half outputs carry independent
information.
➢ The spectrum returned by the DFT will be exact only if the signal under
consideration is periodic with limited band; in any other case, discontinuities
will be introduced at the extremes and the signal will be periodized (with a
period equal to the number of samples); this operation produces a leakage
effect in the frequency domain.
80
Gruppo Misure
Elettriche
ed Elettroniche
➢ To reduce leakage, you can use appropriate windows to "smooth" the data
record at the extremes, thus eliminating the abrupt truncation; there is no
universal window but you will have to choose one according to the signal
and quantity of interest (amplitude or frequency).
81
Gruppo Misure
Elettriche
ed Elettroniche
Specifiche e considerazioni pratiche
Un analizzatore di spettro è completamente caratterizzato quando si
conoscono:
• il suo range di frequenza utile
• la sua risoluzione
• la sua distorsione
• il suo range dinamico
• la sua incertezza (sia in frequenza che in ampiezza)
• la sua sensibilità
Prima di passare a esaminare queste quantità è bene fare qualche
precisazione sulle unità di misura utilizzate da questo strumento.
82
Gruppo Misure
Elettriche
ed Elettroniche
• assi orizzontale e verticale
Il CRT dell’analizzatore di spettro è costituito da un reticolo costituito da 10
divisioni orizzontali e 8 (o 10) divisioni verticali.
L’asse orizzontale è calibrato direttamente in frequenza [Hz] ed essa aumenta
linearmente da sinistra a destra.
L’asse verticale è calibrato in volt o volt2/hertz e c‘è la possibilità di utilizzare
una scala lineare o logaritmica [dB]. Per segnali che si differenziano di poche
decine di dB si può utilizzare la scala lineare (si tenga presente che 20-30 dB di
differenza producono rapporti di tensione da 10 a circa 30), mentre per segnali
che si differenziano di molte decine di dB si rende necessario l’uso della scala
logaritmica (calibrata in dBV, dBmV, dBV, dBW, dBm, dBW). Infatti differenze di
70-100 dB corrispondono a rapporti di tensione da 3.000 a 100.000.
83
Gruppo Misure
Elettriche
ed Elettroniche
Il dBm è definito come:
𝑃|𝑑𝐵𝑚
𝑃
= 10 ⋅ 𝑙𝑜𝑔
1 mW
Il valore in volt corrispondente alla potenza espressa in dBm può essere
calcolato considerando una tensione di riferimento 𝑉𝑟𝑒𝑓 :
𝑃|𝑑𝐵𝑚
𝑉𝑟𝑚𝑠
= 20 ⋅ 𝑙𝑜𝑔
𝑉𝑟𝑒𝑓
dove Vrms è il valore efficace della tensione misurata e Vref è la tensione misurata
ai capi di una resistenza da 50 ohm (nel settore elettromagnetico) o 600 ohm
(nel settore audio) quando essa dissipa una potenza di 1 milliwatt.
𝑉𝑟𝑒𝑓 = 𝑃 ⋅ 𝑅 =
(1 ⋅ 10−3 ) ⋅ 50 = 0.2236 V
𝑉𝑟𝑒𝑓 = 𝑃 ⋅ 𝑅 =
(1 ⋅ 10−3 ) ⋅ 600 = 0.7746 V
Nel caso di misura espressa in dBmV, si usa il valore 𝑉𝑟𝑒𝑓 = 1 mV.
84
Gruppo Misure
Elettriche
ed Elettroniche
• range di frequenza
E' l'estensione della banda di frequenza nella quale lo strumento riesce ad
eseguire misure con l‘incertezza specificata;
per gli analizzatori di spettro analogici a super-eterodina il range di frequenza
va da pochi kilohertz (limite inferiore di banda) fino a diverse decine di
gigahertz (limite superiore).
gli analizzatori di spettro digitali coprono un intervallo di frequenza che va
dalla continua a qualche gigahertz.
Di recente realizzazione sono i cosiddetti analizzatori di spettro ibridi che
racchiudono i vantaggi dell’analizzatore analogico (bande ampie) e quelli
dell’analizzatore digitale (elevate risoluzioni): ad es. modelli di fascia alta
hanno banda di 1 GHz e limite superiore di frequenza di 50 GHz.
85
Gruppo Misure
Elettriche
ed Elettroniche
• risoluzione in frequenza
E' la capacità dello strumento di distinguere (risolvere) armoniche dello spettro del
segnale in esame che sono distinte ma più o meno prossime tra loro.
Analizzatore di spettro analogico: la risoluzione è in massima parte determinata dalla
"forma" della risposta in frequenza del filtro IF, ossia dalla sua ampiezza di banda di
risoluzione (RBW) e dalla sua selettività.
Per il principio stesso di
HIF ( f )
funzionamento di un
3dB
analizzatore di spettro a
0
f
super-eterodina, infatti,
se si analizza un
RBW
risposta del filtro IF
segnale costituito da
X( f )
poche e distinte
componenti, quello che
appare sullo schermo
0
f
spettro del segnale





 





spettro visualizzato
86
Gruppo Misure
Elettriche
ed Elettroniche
è la sovrapposizione di varie repliche della risposta in frequenza
del filtro IF disposte a cavallo delle singole componenti. Se due componenti hanno
ampiezza uguale o confrontabile, si verifica che la minima distanza in frequenza che
le rende distinguibili utilizzando un filtro IF con una definita RBW è proprio f=RBW.
X( f )
spettro del segnale
di ingresso
0
f
HIF ( f )
HIF ( f )
HIF ( f )
risposta filtro IF
0
f
0
f
0
f
visualizzazione
87
Gruppo Misure
Elettriche
ed Elettroniche
I problemi di risolvibilità di due armoniche sono però tanto più seri
quanto più l'ampiezza di un'armonica è ridotta in confronto a quella dell'armonica ad
essa più prossima. In questi casi, infatti, le armoniche più piccole possono
letteralmente scomparire sotto le code laterali delle repliche della risposta del filtro IF
dovute alle armoniche più grandi.
Semplicisticamente si potrebbe pensare che per raggiungere una qualsivoglia
risoluzione in frequenza sia sufficiente aumentare a piacere la selettività del filtro IF.
Tuttavia è necessario tenere conto che il filtro IF è pur sempre un dispositivo
dinamico, quindi che la sua uscita a un definito istante t0 dipende dagli stati che
l'ingresso e l'uscita hanno assunto per t < t0.
Questo fa si che l'uscita del filtro IF si porti a regime solo dopo un certo tempo
dall'applicazione di un fissato ingresso; questa "memoria" del filtro IF
(che può
essere quantificata mediante il tempo di salita, detta rise time) è, in prima
approssimazione, inversamente proporzionale alla RBW:
𝑇𝒓 ቚ
𝑛𝑠
≅
350
𝑅𝐵𝑊 |𝑀𝐻𝑧
88
Gruppo Misure
Elettriche
ed Elettroniche
E' allora necessario commisurare opportunamente la velocità di
sweep del VCO al valore della RBW utilizzata: tanto più piccola è la RBW utilizzata
(quindi maggiore è la risoluzione dell'analisi) tanto più tempo ci vorrà per
completare l'analisi in un fissato frequency span. Se non si aspetta abbastanza a
lungo, l'analizzatore visualizzerà una versione non perfetta dello spettro del
segnale; in questo caso infatti, il filtro non ha il tempo di rispondere completamente
e la sua risposta sarà distorta: le ampiezze visualizzate saranno più basse e le
frequenze più alte (ritardo del filtro).
velocità di sweep
corretta
velocità di sweep
eccessiva
89
Gruppo Misure
Elettriche
ed Elettroniche
Il firmware degli analizzatori di spettro normalmente imposta
automaticamente lo sweep time in funzione della RBW utilizzata ma lascia
comunque libero l'operatore di agire manualmente su questo parametro. In ogni
caso l'analisi eseguita in questo modo non è mai in "tempo reale".
Analizzatore di spettro digitale: la risoluzione in frequenza di un analizzatore di
spettro digitale coincide ovviamente con la risoluzione in frequenza della FFT da
esso implementata:
𝐹=
𝑓𝑠
1
=
𝑁 𝑁𝑇𝒔
Un'attenta analisi di questa espressione mette in evidenza che la risoluzione può
essere aumentata i) riducendo la frequenza di campionamento o ii) aumentando il
numero di campioni da elaborare. Entrambe queste operazioni possono essere
regolate in modo manuale sull’analizzatore e non sono naturalmente a costo zero.
90
Gruppo Misure
Elettriche
ed Elettroniche
Infatti:
• un aumento del numero di campioni N rallenta l’elaborazione FFT;
• una riduzione della frequenza di campionamento 𝑓𝑠 può comportare la
comparsa dell’aliasing.
91
Gruppo Misure
Elettriche
ed Elettroniche
• distortion
E' un indice dell'alterazione introdotta dallo strumento sullo spettro del segnale sotto esame.
E' generata dalle nonlinearità dei circuiti che il segnale attraversa.
Per l’analizzatore di spettro analogico lo stadio più critico a questo riguardo è il mixer, mentre
nell’analizzatore di spettro digitale
le non linearità sono introdotte dagli stadi di
precondizionamento analogici e dall'ADC .
Il modo più comune di dare le specifiche di distorsione è quello di quantificare le ampiezze
della seconda e della terza armonica spurie introdotte nello spettro ed è normalmente data in
dBc (decibel riferiti alla fondamentale).
Per distinguere le armoniche (e i prodotti di distorsione) del segnale da quelle introdotte dallo
strumento si può agire sui due stadi di attenuazione e guadagno. Incrementando
ugualmente sia l’attenuazione che il guadagno (ad es. di 10 dB), la fondamentale e tutte le
armoniche appartenenti al segnale in ingresso rimangono invariate, invece le armoniche
introdotte dal mixer si riducono (questo perché l’ampiezza della seconda armonica prodotta
dal mixer dipende dal quadrato dell’ampiezza della fondamentale, mentre quella della terza
armonica dipende dal cubo).
92
Gruppo Misure
Elettriche
ed Elettroniche
• Dynamic range (DR)
Rappresenta l’intervallo di sensibilità dello strumento, ossia la differenza in dB tra la
potenza della componente di segnale più grande e più piccola che lo strumento è in
grado di rilevare contemporaneamente. Le piccole componenti di segnale sono
mascherate dal tappeto di rumore e/o dalla distorsione introdotta dallo strumento,
pertanto il DR è la differenza tra la componente della fondamentale ed il livello più
grande tra noise floor e distorsione.
Quando la fondamentale è a
bassa potenza o è attenuata, il
DR dipende
dal noise
Amplificando
il
floor.
segnale,
le
distorsioni del secondo e terzo
ordine
introdotte
dal
mixer
superano il noise floor. Quindi è
possibile
ottimizzare
variando il guadagno.
il
DR
93
Gruppo Misure
Elettriche
ed Elettroniche
Per l’analizzatore digitale di spettro il range dinamico è limitato dalle
caratteristiche del convertitore A/D cui si aggiungono gli effetti negativi di rumore
e non linearità dell’oscilloscopio (strumento all-in-one).
Così ogni tecnica che sia in grado di ridurre il rumore di fondo permette di
incrementare il range dinamico; ad esempio un incremento del numero di
campioni per la FFT, ridurrà il noise floor che si spalmerà su un numero
maggiore di uscite FFT (mantenendo costante la potenza di rumore).
94
Gruppo Misure
Elettriche
ed Elettroniche
• incertezza di misura
Così come per un oscilloscopio l’incertezza di misura è specificata per le misure di
tempo e ampiezza, per un analizzatore di spettro l‘incertezza di misura deve essere
specificata sia per le misure di frequenza sia per quelle di ampiezza; in ambedue i
casi le specifiche sono date sia per misure assolute che per misure relative.
Le prime sono quelle dirette, eseguite con un singolo cursore e sono, ad esempio, le
misure di potenza di una portante RF, le misure di frequenza della stessa ecc.
Le
seconde
sono
quelle
indirette,
eseguite
utilizzando
due
cursori
contemporaneamente (misure di distorsione o di distanza di armoniche o subarmoniche dalla portante).
Un’attenta analisi delle diverse componenti di incertezza può portare a una riduzione
dell’incertezza complessiva dello strumento nelle misure relative (senza dover
ricorrere ad analizzatori di spettro con bande di errore minore e quindi più costosi)
perché in questo caso alcune componenti d’errore si elidono a vicenda.
95
Gruppo Misure
Elettriche
ed Elettroniche
• sensibilità
E' una misura della capacità dello strumento di rilevare piccoli segnali. Essa è
normalmente specificata in dBm e può assumere valori anche < -140 dBm, ossia
esistono strumenti in grado di rilevare segnali di potenza pari a 10-14 milliwatt!
La sensibilità è in massima parte limitata dal rumore generato dalla circuiteria
interna dell'analizzatore.
96
Gruppo Misure
Elettriche
ed Elettroniche
Measurement of distortion and noise
A common application of spectral analysis is the evaluation of performance in
terms of distortion and noise.
Ideal amplifiers, filters, signal generators, measuring instruments, sensors and
transducers, ADCs and DACs (neglecting intrinsic quantization), have an output 𝑦
which is proportional to its input 𝑥:
𝑦 =𝑘∙𝑥
and, in frequency domain:
𝑌(𝑓) = 𝑘 ∙ 𝑋(𝑓)
97
Gruppo Misure
Elettriche
ed Elettroniche
However real-life components have:
1) Offset 𝑂:
𝑦 =𝑘∙𝑥+𝑂
2) Linear distortion (for linear time-invariant dynamic systems):
𝑌 𝑓 =𝐻 𝑓 ∙𝑋 𝑓
𝑥 𝑡 = 𝐴𝑐𝑜𝑠 2𝜋𝑓𝑡 + 𝜙 → 𝑦 𝑡 = 𝐻 𝑓 𝐴 cos 2𝜋𝑓𝑡 + 𝜙 + ∡𝐻 𝑓
3) Harmonic distortion (which is a type of nonlinear distortion of nonlinear timeinvariant dynamic systems):
+∞
𝑥 𝑡 = 𝐴1 𝑐𝑜𝑠 2𝜋𝑓1 𝑡 + 𝜙1 → 𝑦 𝑡 = ෍ 𝐵𝑖 cos 2𝜋𝑚𝑓1 𝑡 + Φ𝑚
𝑚=0
Moreover, when the input contains two components at frequencies 𝑓1 and 𝑓2 , many
components at frequencies 𝑙 ∙ 𝑓1 + 𝑚 ∙ 𝑓2 appear (intermodulation distortion), with 𝑙
and 𝑚 integers.
98
Gruppo Misure
Elettriche
ed Elettroniche
4) For nonlinear time-varying systems, there are different analysis formulae,
according to the particular system and application. For an input sinusoid, the
output can be an amplitude and phase modulated output sinusoid with modulated
harmonics.
5) Interference: the output contains signals due to external disturbances, which
are not related to the input.
6) Noise: the output contains an unpredictable component (random process) 𝑛(𝑡)
which may be correlated or uncorrelated with the input. For example, for a noisy
nonlinear time-invariant system:
+∞
𝑥 𝑡 = 𝐴1 𝑐𝑜𝑠 2𝜋𝑓1 𝑡 + 𝜙1 → 𝑦 𝑡 = ෍ 𝐵𝑖 cos 2𝜋𝑚𝑓1 𝑡 + Φ𝑚 + 𝑛(𝑡)
𝑚=0
99
Gruppo Misure
Elettriche
ed Elettroniche
It is clear, then, that frequency analysis of a system output gives important
information on its characteristics.
In a typical characterization experiment, a system is stimulated by a pure tone
𝑥 𝑡 = 𝐴1 𝑐𝑜𝑠 2𝜋𝑓1 𝑡 + 𝜙1
and the output 𝑦 𝑡 is measured. We will assume that the system is nonlinear
time-invariant
and
noisy,
hence
the
following
output
is
expected
+∞
𝑦 𝑡 = ෍ 𝐵𝑖 cos 2𝜋𝑚𝑓1 𝑡 + Φ𝑚 + 𝑛(𝑡)
𝑚=0
Frequency analysis allows one to estimate the power of each component.
The fundamental, at frequency 𝑓1 (first harmonic), has power 𝑃1 =
The second harmonic, at frequency 2𝑓1 , has power 𝑃2 =
𝐵2
,
2
𝐵1
.
2
and so on: 𝑃𝑚 =
𝐵𝑚
.
2
100
Gruppo Misure
Elettriche
ed Elettroniche
Harmonics are considered up to a finite order 𝑀, which varies according to the
application (from 5 to hundreds), and express the nonlinear distortion of the
system. Their power is
𝑃𝐻 = 𝑃2 + 𝑃3 + ⋯ + 𝑃𝑀
The other components that differs from the 𝑀 harmonics (𝑓 ≠ 𝑓1 , 2𝑓1 , … , 𝑀𝑓1 )
constitute:
- noise if they are unpredictable (e.g. thermal noise and, under some
approximation, also quantization noise);
- non-harmonic distortion, or spurious components, if they are related to the input
or to the working of the system (e.g. a clock signal of a digital system);
- interference, if they can be related to external sources which makes them
distinguishable from random noise.
101
Gruppo Misure
Elettriche
ed Elettroniche
The total power of the three previously described components will be referred, for
simplicity, as noise power 𝑃𝑁 . The continuous component (frequency zero) is
generally excluded from 𝑃𝑁 computation.
Assuming that system output has been sampled synchronously (integer
number of cycles 𝑳) at frequency 𝑓𝑠 in a window of 𝑁 samples and that a DFT
(resolution 𝑓𝑠 /𝑁) has been performed, we have that the fundamental frequency
coincides exactly with a DFT bin of index 𝐿
𝑓𝑠
𝑓1 = 𝐿
𝑁
and harmonics are at DFT indexes 2𝐿, 3𝐿, … , 𝑀𝐿.
Hence 𝑃𝑁 is the sum of powers at DFT indexes different from 0, 𝐿, 2𝐿, … 𝑀𝐿.
102
Gruppo Misure
Elettriche
ed Elettroniche
𝑃1 , 𝑃𝐻 and 𝑃𝑁 are used to express the degree of ideality of the system.
Signal-to-Noise ratio is defined as
𝑆𝑁𝑅 =
𝑆𝑁𝑅𝑑𝐵
𝑃1
𝑃𝑁
𝑃1
= 10 log10
= 𝑃1,𝑑𝐵 − 𝑃𝑁,𝑑𝐵
𝑃𝑁
Total Harmonic Distortion is defined as
𝑇𝐻𝐷 = 𝑃𝐻 /𝑃1
Noise and Distortion is defined as
𝑁𝐴𝐷 = 𝑃𝐻 + 𝑃𝑁
A good system has high SNR, low THD, low NAD.
103
Gruppo Misure
Elettriche
ed Elettroniche
A synthetic figure of merit is the Signal to Noise and Distortion, which is found with
two different definitions:
Most common definition
LabVIEW’s
Distortion
Express VI)
𝑆𝐼𝑁𝐴𝐷 =
(used also in Definition used in standards for testing ADCs
Measurements and DACs (IEEE STD 1241-2010 , IEEE STD
1658-2011) and in MATLAB’s sinad()
function.
𝑃1 + 𝑁𝐴𝐷 𝑃1 + 𝑃𝐻 + 𝑃𝑁
=
𝑁𝐴𝐷
𝑃𝐻 + 𝑃𝑁
𝑆𝐼𝑁𝐴𝐷 =
𝑃1
𝑃1
=
𝑁𝐴𝐷 𝑃𝐻 + 𝑃𝑁
SINAD, NAD, THD and 𝑃1 can be related as follows
𝑆𝐼𝑁𝐴𝐷 =
1
𝑃𝐻 𝑃𝑁
+
𝑃1 𝑃1
+1=
𝑁𝐴𝐷 =
1
𝑇𝐻𝐷 +
𝑃1
𝑆𝐼𝑁𝐴𝐷 − 1
1
𝑆𝑁𝑅
+1
𝑆𝐼𝑁𝐴𝐷 =
1
𝑃𝐻 𝑃𝑁
+
𝑃1 𝑃1
𝑁𝐴𝐷 =
1
=
𝑇𝐻𝐷 +
1
𝑆𝑁𝑅
𝑃1
𝑆𝐼𝑁𝐴𝐷
104
Download