2 spectral estimation(1)

20
Let’s go back to this problem: ) ( t x ) ( ] [ s nT x n x s s T F 1 MAX T MAX S N T F We take N samples of a sinusoid (or a complex exponential) and we want to estimate its amplitude and frequency by the FFT. What do we get? Estimate the Frequency Spectrum n 0 1 N ? 0 F F

Upload: elamaranvlsi

Post on 30-Apr-2017

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2 Spectral Estimation(1)

Let’s go back to this problem:

)(tx )(][ snTxnx

ss TF 1

MAXT

MAX SN T F

We take N samples of a sinusoid (or a complex exponential) and we want to estimate its amplitude and frequency by the FFT.

What do we get?

Estimate the Frequency Spectrum

n0 1N

?0 FF

Page 2: 2 Spectral Estimation(1)

Take the FFT …

)(][ snTxnx

n0 1N

FFT

][kX

k0 1N

0k0kN

Best Estimates based on FFT:

HzNFkFFrad

Nk ss

00000 22

Frequency:

Amplitude:NkX

A][

2|| 0

][ 0kX

How good is this estimate?

Page 3: 2 Spectral Estimation(1)

… again recall what we did…

1,...,0,][ 0 NnAenx nj

Take a complex exponential of finite length:

then its DFT looks like this

1,...,0,][][ 20

NkWAnxDFTkXN

kN

2/sin

2/sin)( NWN

where we define

This is important to understand how good the spectral estimate is.

Page 4: 2 Spectral Estimation(1)

See the plot of WN /N 2/sin

2/sin1)(

NNN

WN

-3 -2 -1 0 1 2 30

0.5

1

1.532N

Main Lobe

Side Lobes

N/2N/2

Page 5: 2 Spectral Estimation(1)

See the plot of WN /N in dB’s

32N

-3 -2 -1 0 1 2 3-100

-50

0Main Lobe

Side Lobes

N/2N/2

dB

)(log20)( 10 NdBN WW

Page 6: 2 Spectral Estimation(1)

… and zoom around the main lobe

-0.2 -0.1 0 0.1 0.2-60

-40

-20

0

N=64 N=256 N=1024

Page 7: 2 Spectral Estimation(1)

Main Lobe

The width of the Main Lobe decreases as the data length N increases

dB0

N4

Page 8: 2 Spectral Estimation(1)

Side Lobes

Sidelobes are artifacts which don’t belong to the signal. As the data length N increases,

• the height of the sidelobes stays the same;

• the height of the first sidelobe is 13dB’s below the maximum

dB13

Page 9: 2 Spectral Estimation(1)

Effect on Frequency Resolution

Why all this is important?

1. It has an effect on the frequency resolution. Suppose you have a signal with two frequencies

1,...,0,][ 2121 NneAeAnx njnj

and you take the DFT . See the mainlobes: ][][ nxDFTkX

1 2

N 4

21

1 2

N 4

21

you can resolve them (2 peaks)

you cannot resolve them (1 peak)

Page 10: 2 Spectral Estimation(1)

Example

Consider the signal 127,...,0,0.20.3][ 2.01.0 neenx njnj

982.01284

21

0 20 40 60 80 100 120-20

0

20

40

60

k

][kX

dB

Page 11: 2 Spectral Estimation(1)

… zoom in

Consider the signal 127,...,0,0.20.3][ 2.01.0 neenx njnj

0 5 10 15 200

20

40

60

2 4k

0982.0128221 1963.0

128242

Page 12: 2 Spectral Estimation(1)

Another Example

Consider the signal 127,...,0,0.20.3][ 15.01.0 neenx njnj

k0 20 40 60 80 100 120-20

0

20

40

60 982.01284

21 ][kX

dB

Only One Peak: Cannot Resolve the two frequencies!!!

Page 13: 2 Spectral Estimation(1)

… take more data points …

… of the same signal 256,...,0,0.20.3][ 15.01.0 neenx njnj

0 50 100 150 200 2500

20

40

60491.0

2564

21

][kX

dB

kTwo Peaks: Can Resolve the two frequencies.

Page 14: 2 Spectral Estimation(1)

… zoom in

Consider the signal

k0982.0

256241 1473.0

256262

256,...,0,0.20.3][ 15.01.0 neenx njnj

0 5 10 15 20 2510

20

30

40

50

60

64

Page 15: 2 Spectral Estimation(1)

Now the Sidelobes

Consider the signal 255,...,0,0.2][ 3.0 nenx nj

][kX

dB

k0 50 100 150 200 2500

20

40

60

These are all sidelobes!!!

Page 16: 2 Spectral Estimation(1)

… add a low power component

Consider the signal 255,...,0,01.00.2][ 4.03.0 neenx njnj

0 50 100 150 200 2500

20

40

60][kX

dB

kBecause of sidelobes, cannot see the low power frequency component.

Page 17: 2 Spectral Estimation(1)

Why we have sidelobes?

There reason why there are high frequency artifacts (ie sidelobes) is because there is a sharp transition at the edges of the time interval.

Remember that the signal is just one period of a periodic signal:

n0 1N

][nx

One Period

Discontinuity!!!

Discontinuity!!!

Page 18: 2 Spectral Estimation(1)

Remedy: use a “window”

A remedy is to smooth a signal to “zero” at the edges by multiplying with a window

][nx

][nw

][nxw

0 50 100 150 200 250-4

-2

0

2

4

0 50 100 150 200 250-2

-1

0

1

2

0 50 100 150 200 2500

0.2

0.4

0.6

0.8

1

data

hamming window

windowed data

Page 19: 2 Spectral Estimation(1)

Use Hamming Window

0 50 100 150 200 250-40

-20

0

20

40

60

Take the FFT of the “windowed data”:

dB

k

Page 20: 2 Spectral Estimation(1)

Use Hamming Window… zoom in

10 20 30 40 50

-20

0

20

40

12 17

dB

krad2945.0

2562121

rad4172.02562172

Estimate two frequencies