You are on page 1of 11

Spectral Analysis A.J .

Wilkinson, UCT EEE3086F Signals and Systems II


208 Page 1May 18, 2009
EEE3086F
Signals and Systems II
2008
Andrew Wilkinson
andrew.wilkinson@uct.ac.za
http://www.ee.uct.ac.za/people/ajw.php
Department of Electrical Engineering
University of Cape Town
Spectral Analysis A.J .Wilkinson, UCT EEE3086F Signals and Systems II
208 Page 2May 18, 2009
2.5 Spectral Analysis
(estimating the PSD)
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 3May 18, 2009
Estimating the Power Spectral Density
For deterministic signals, we can derive the PSD from
How do we estimate from a finite duration observation
of f(t) ?
This would suggest that we Fourier transform a recording of
length T of the signal, and substitute to obtain an estimate:
(can be done using an FFT), i.e.
T
F
S
T
T
f
2
) (
lim ) (


=
) (
f
S
{ }
T
t f FFT
S
T
f
2
) (
) ( =

The ^
indicates
an estimate
) (t f
T
t
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 4May 18, 2009
If noise is present, this does not work so well, as we get a noisy
Fourier transform.
For such signals, PSD is defined as
where
E{} is the statistical expectation operator.
To estimate the PSD, the simplest method is
Take N recordings each of length T
For ith recording, compute an estimate
using the Fast Fourier Transform:
Average the N results

N
i
i f
S
N
S
1
) (
1
) (
{ }
T
t f FFT
S
i
i
2
) (
) ( =

T
F E
S
T
T
f
2
) (
lim ) (


=
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 5May 18, 2009
Spectral Estimation of Noisy signals
Note:
The waveform f(t) will typically contain a signal of interest
together with additive noise.
The result of FFTing a single segment of length T results in a
noisy estimate of .
Averaging N>10 say, gives better estimate of .
If a single finite length recording is available, then it must be
split up into N sections. Increasing N reduces the standard
deviation on the estimate, however reducing the time length T
degrades the frequency resolution (the ability to resolve
closely spaced frequency components in the displayed
spectrum) i.e. there is a tradeoff if the total recording time is
limited.
) (
f
S
) (
f
S
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 6May 18, 2009
Spectral Estimation
Noise Spectrum

) (

i
S
N
T
) (
1

S ) (
2

S ) (
3

S ) (
4

S
Periodic Component
) (
f
S

N recordings
each of length T

A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II


208 Page 7May 18, 2009
Spectral Estimation:
How do period components appear?
We observe finite duration T of signal
The truncated Signal can be modelled as
the product:
Fourier Transform the product
) (t f
) ( rect ) ( ) (
T
t
t f t f
T
=


2
1
)
2
( Sa ) (
2
1
) ( rect ) ( ) (
T
T F
T
t
F F
T
=

= F
T
Recall Fourier relationship
) ( ) (
2
1
) ( ) (

G F t g t f
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 8May 18, 2009
Spectral Estimation:
How do period components appear?
Consider a single periodic component
Substituting,
Thus in our estimated power spectrum periodic
components appear as functions.
) ( 2 ) (
0
0

= A
t j
Ae t f
[ ]

=
2
Sa
2
1
2
Sa ) ( 2 ) (
0
0
T
AT
T
T A F
T


( )
2
Sa
0
) ( F

A 2
( )
x
x
x Sa
sin

A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II


208 Page 9May 18, 2009
Spectral Analysis: Truncated Periodic Signal
) ( ) (
2
1
) ( ) (

G F t g t f
t j
Ae t f
0
) (

=
) ( rect g(t)
T
t
=
0
0
2/T
-2/T
) ( rect ) (
0
T
t
Ae t f
t j
T

=
AT
) ( F
0

) (
T
F

=
2
Sa
) (
T
T
G

A 2
0

T
Do graphical convolution with impulse
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 10May 18, 2009
Spectral Analysis: Truncated Periodic Signal
Power Spectrum
Note that the width of the main lobe is usually measured between the points
where the power density drops 3dB down from the peak. i.e. power drops to
half; (or magnitude drops to 0.707 * peak value magnitude).
In Hz, the main lobe width is
[ ]
)
2
(
) (
) (
0
2 2
2
T
TSa A
T
F
S
T
f

22/T
sec] / [
2
rad
T

] [
1
Hz
T
f
T A
2
2
2
T A
Half power
(3dB down)
T

) (
T
F
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 11May 18, 2009
Frequency Resolution
Frequency Resolution refers to the ability to distinguish
two closely spaced sinusoidal components.
Resolution is defined as the 3dB width of the main lobe.
Need observation window to resolve
two sinusoids separated by Hz in frequency
f
T

1
>

f
) (
1
~ Hz
T
f
=>
T

A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II


208 Page 12May 18, 2009
Sidelobe Reduction using Windowing
The sidelobes of a Sa( ) function are undesirably high, and may be
mistaken for lower level harmonic components.
Sidelobes may be significantly reduced by applying a technique
known as windowing.
Before doing the FFT, the time recording is multiplied by a special
window function w(t) which tapers the recording gracefully to
zero at the start and end.
This multiplication in the time domain is equivalent to a
convolution in the frequency domain with
has much lower sidelobes than a Sa() function, at the
expense of some main lobe broadening. Windowing is almost
always done in practice when carrying out spectral analysis.
) ( W
) ( W
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 13May 18, 2009
Sidelobe Reduction using Windowing
Consider the following graphical illustration.
) ( rect
T
t
0
2/T
-2/T

0

Lower
sidelobes
Broader
mainlobe
Tapered
window
Multiply recording by w(t) before doing FFT

Truncation modelled by multiplication


with a rect function.
t
t
Fourier Transform
has Lower sidelobes
Unwanted
sidelobes
) ( rect ) ( ) (
T
t
t f t f
T
=
) ( w ) ( ) ( t t f t f
T
=
) (t w
) ( W
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 14May 18, 2009
With and Without Windowing

) (
1
~ Hz
T
f
=>
T

With windowing
applied, before
doing FFT

=>
Lower sidelobes (less interference with adjacent components)
Slightly broader
mainlobe
{ } ) ( w ) ( t t f F
{ } ) / ( rect ) ( T t t f F
Without windowing
High sidelobes interfere with adjacent components,
making visual interpretation more difficult.
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 15May 18, 2009
Modern digital oscilloscopes (such as those used for the
laboratory experiments in this course) have the facility to
display a Fourier Transform of a waveform.
These instruments will usually allow the user to specify
(1) the length T of the recording to be FFTd
(this determines the frequency resolution)
(2) the type of window function applied
(this changes the appearance of the spectrum, and the
sidelobe levels. The default is usually fine.
The magnitude may be displayed in decibels if desired
(this allows both large and small components to be
observed)
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 16May 18, 2009
Example 1: spectral estimation
The PSD of some signal is estimated by averaging
several recordings, each of duration T.
The result obtained is shown below:
From
1. Determine frequency of the periodic components.
2. Estimate the time length T of the observations.
3. Estimate the amplitude of the periodic components
{ }

=
N
i
i
T
t f FFT
1
2
) (
25
55
75
65
40
0.5
0
) (


f
S
) (


f
S
1.0
Width
0.025
rad/s
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 17May 18, 2009
Solution
1. There are two components,
2. A sinusoidal component appears as
in the estimated spectrum.
From the spectrum, width of peaks 0.025 rad/s.
Thus 0.025 = 2/T => T = 2 /0.025 = 250 s.
t j
Ae
0

[ ]
)
2
(
0
2 2
T
TSa A

rad/s 6 . 0
1
rad/s 2 . 1
2

T A
2
2
2
T A
T

Width is measured at
half peak power level
(3dB down)
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 18May 18, 2009
Solution
3. Amplitude A of complex component ?
Since the noise and periodic components are uncorrelated, the PSD of the
noise and the PSD of the sinusoids will add. (a property of uncorrelated
signals).
Peak level of component 40 above the noise PSD.
|A|
2
T=40 => |A|=(40/250)
1/2
=0.4
Recall
So the amplitude C of the real sinusoidal signal is C = 2|A|=0.8
t j j t j j
e e
C
e e
C
t C
0 0
2 2
) cos(
0


+ =
t j
Ae
0

j
e
C
A
2
=
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 19May 18, 2009
Example 2: spectral estimation
You are required to analyse the frequency spectrum of a
patients heart beat from a recording of the sound
waveform.
Specify how long the recording needs to be in order to
achieve a frequency resolution of 0.1 Hz.
SOLUTION:
A recording of T = 1/0.1 = 10 seconds is the minimum
required length. The mainlobe of a periodic component
will be approximately 1/T = 0.1 Hz wide.
For accurate spectral estimation, several recordings of
such length should be made and used to estimate the
PSD.
A.J .Wilkinson, UCT Spectral Analysis EEE3086F Signals and Systems II
208 Page 20May 18, 2009
Agilent E4408B-BAS ESA-L Basic Spectrum Analyzer
9 kHz to 26.5 GHz
Cost (2007):
US$25,627
Spectral Analysis A.J .Wilkinson, UCT EEE3086F Signals and Systems II
208 Page 21May 18, 2009
EEE3086F
Signals and Systems II
End of handout

You might also like