Advanced Digital Signal Processingnaydin/AdP/lectures/PDF/AdP_08.pdf · Advanced Digital Signal...

5
1 Prof. Nizamettin AYDIN [email protected] http://www.yildiz.edu.tr/~naydin Advanced Digital Signal Processing 1 Time-Frequency Analysis 2 Time-Frequency Analysis – Fourier Transform – Window functions – Window sizes – Overlap ratio 3 Stationary/nonstationary signals In real world most signals are highly non- stationary and sometimes last only for a short time. Signal analysis methods which assume that the signal is stationary are not appropriate. Therefore time-frequency analysis of such signals is necessary. 4 Some nonstationary signals 20 40 60 80 100 120 140 -1 -0.5 0 0.5 1 Time (ms) 20 40 60 80 100 120 140 -1 -0.5 0 0.5 1 Time (ms) 20 40 60 80 100 120 140 -1 -0.5 0 0.5 1 Time (ms) 20 40 60 80 100 120 140 -1 -0.5 0 0.5 1 Time (ms) Forward (red) and reverse (blue) flow components are shown (after Hilbert transform process) 5 Time-Frequency Analysis... The time representation is usually the first description of a signal s(t) obtained by a receiver recording variations with time. The frequency representation, which is obtained by the well known Fourier transform (FT), highlights the existence of periodicity, and is also a useful way to describe a signal. 6

Transcript of Advanced Digital Signal Processingnaydin/AdP/lectures/PDF/AdP_08.pdf · Advanced Digital Signal...

Page 1: Advanced Digital Signal Processingnaydin/AdP/lectures/PDF/AdP_08.pdf · Advanced Digital Signal Processing 1 Time-Frequency Analysis 2 • Time-Frequency Analysis – Fourier Transform

1

Prof. Nizamettin AYDIN

[email protected]

http://www.yildiz.edu.tr/~naydin

Advanced Digital Signal Processing

1

Time-Frequency Analysis

2

• Time-Frequency Analysis

– Fourier Transform

– Window functions

– Window sizes

– Overlap ratio

3

Stationary/nonstationary signals

• In real world most signals are highly non-stationary and sometimes last only for a short time.

• Signal analysis methods which assume that the signal is stationary are not appropriate.

• Therefore time-frequency analysis of such signals is necessary.

4

Some nonstationary signals

20 40 60 80 100 120 140-1

-0.5

0

0.5

1

Time (ms)

20 40 60 80 100 120 140

-1

-0.5

0

0.5

1

Time (ms)

20 40 60 80 100 120 140-1

-0.5

0

0.5

1

Time (ms)

20 40 60 80 100 120 140

-1

-0.5

0

0.5

1

Time (ms)

Forward (red) and reverse (blue) flow components are shown (after Hilbert transform process)

5

Time-Frequency Analysis...

• The time representation is usually the first description of a signal s(t) obtained by a receiver recording variations with time.

• The frequency representation, which is obtained by the well known Fourier transform (FT), highlights the existence of periodicity,

• and is also a useful way to describe a signal.

6

Page 2: Advanced Digital Signal Processingnaydin/AdP/lectures/PDF/AdP_08.pdf · Advanced Digital Signal Processing 1 Time-Frequency Analysis 2 • Time-Frequency Analysis – Fourier Transform

2

Time-Frequency Analysis...

• The relationship between frequency and time representations of a signal can be defined as

∫∫+∞

∞−

+∞

∞−

− == ωωω ωω deStsdtetsS tjtj )()(,)()(

no frequency information

500 1000 1500 2000-1

-0.5

0

0.5

200 400 600 800 1000

0.2

0.4

0.6

0.8

Frequency axisTime axis

no time information

7

Time-Frequency Analysis

A joint time-frequency representation is necessary to observe evolution of the signal both in time and frequency.

1. Linear methods (Windowed Fourier Transform (WFT), and Wavelet Transform (WT))

• Decomposes a signal into time-frequency atoms.• Computationally efficient• Time-frequency resolution trade-off2. Bilinear (quadratic) methods (Wigner-Ville distribution)• Based upon estimating an instantaneous energy distribution

using a bilinear operation on the signal.• Computationally intense• Arbitrarily high resolution in time-and frequency• Cross term interference

8

Harmonic

9

Fourier Analysis

freq

time

• Basis functions are smooth, analytic• Solutions to natural differential equations• Assumes signal is stationary

∫+∞

∞−

−= dtetstF tjs

ωω )(),(

10

Windowed Fourier Transform...

• g(t): short time analysis window localised around t=0 and ω=0

• Also called Short-Time Fourier Transform

∫+∞

∞−

−∗ −= dtetgtstF tjs

ωτω )()(),(

11

...Windowed Fourier Transform...

• Windows of fixed size but varying shape• Fixed size implies fixed time and frequency resolution• Useful for analysis of narrowband processes

freq

time

12

Page 3: Advanced Digital Signal Processingnaydin/AdP/lectures/PDF/AdP_08.pdf · Advanced Digital Signal Processing 1 Time-Frequency Analysis 2 • Time-Frequency Analysis – Fourier Transform

3

...Windowed Fourier Transform...

for each Frequency

for each Time

Coefficient (F,T) = Signal × window (F,T)

end

end

∫all time

Coefficient

Time

Frequency

13

...Windowed Fourier Transform...

• Segmenting a long signal into smaller sections with 128 point and 512 point Hanning window (criticaly sampled).

200 400 600 800 1000 1200 1400 1600 1800 2000-1

-0.5

0

0.5

200 400 600 800 1000 1200 1400 1600 1800 2000

-0.5

0

0.5

200 400 600 800 1000 1200 1400 1600 1800 2000

-0.5

0

0.5

Number of samples

14

...Windowed Fourier Transform

• Three important WFT parameters for analysis of a particular signal need to be determined:

– Window type,

– Window size,

– Required overlap ratio

15

Window type...

• The FT makes an implicit assumption that the signal within the measured time is repetitive.

• Most real signals will have discontinuities at the ends of the measured time, and

• when the FFT assumes the signal repeats, it will also assume discontinuities that are not there.

16

Window type...

• Discontinuities can be eliminated by multiplying the signal with a window function.

17

...Window type

• Some window types and corresponding power spectra

0 50 1000

0.5

1

Rec

tang

le

-0.5 0 0.5-80

-60

-40

-20

0

dB

0 50 1000

0.5

1

Bar

tlett

-0.5 0 0.5-80

-60

-40

-20

0

dB

0 50 1000

0.5

1

Han

ning

0 0.5-80

-40

-20

0

dB

0 50 1000

0.5

1

Ham

min

g

-0.5 0 0.5-80

-60

-40

-20

dB

0 50 1000

0.5

1

Bla

ckm

an

-0.5 0 0.5-80

-60

-40

-20

0

dB

0 50 1000

0.5

1

Samples

Gau

ssia

n

-0.5 0 0.5-80

-60

-40

-20

0

Normalised frequency

dB

Samples Normalised frequency

18

Page 4: Advanced Digital Signal Processingnaydin/AdP/lectures/PDF/AdP_08.pdf · Advanced Digital Signal Processing 1 Time-Frequency Analysis 2 • Time-Frequency Analysis – Fourier Transform

4

Window size...

• In a FFT process, there is a well known trade-off between frequency resolution (∆ω) and time resolution (∆t), which can be expressed as

• where W is window length and ωs is sampling frequency.

• To use the WFT, one has to make a trade-off between time-resolution and frequency resolution.

W

Wt s

s

ωωω

=∆=∆ ,

19

...Window size

• If no overlap is employed, processing NS length data by using W length analysis window will result in a time-frequency distribution having a dimension that almost equals to the dimension of the original signal space (critically sampled WFT).

• The actual dimension of the time-frequency distribution is

• The best combination of ∆t and ∆f depends on the signal being processed and best time-frequency resolution trade-off needs to be determined empirically.

[ ]1+×= WW

NM S

20

Window overlap ratio...

An example of possible embolic signal at the edges of two consecutive frames and related 3d spectrum without a window and with a Hannig window function

• A short duration signal may be lost when a windowing function is used prior to the FFT.

• In this case an overlap ratio to some degree must be employed.

• In overlapped WFT, the data frames of length W are processed sequentially by sliding the window ‘W-OL’ times at each processing stage, where OL is the number of overlapped samples.

• Consequently, overlapping FFT windows produces higher dimensional WFTs.

• In an overlapped WFT process, the dimension of the resultant time-frequency distribution is

[ ]1+×−−= W

OW

ONM

L

LS

21

...Window overlap ratio...

• The overlapping process introduces a predictable time shift on the actual location of a transient event on the time-frequency plane of the FFT.

• The duration of the time shift depends on the overlap ratio used, while the direction of the time shift is dictated by the way that the data are arranged prior to the FFT.

• Duration of the time shift can be estimated as ‘(number of overlapped samples/2)×sampling time’.

• The time shift can be adjusted by adding zeros equally at both ends of the original data array. In this case the dimension of the overlapped WFT is

[ ]1+×−

= WOW

NM

L

S

22

...Window overlap ratio

• Segmenting a long signal into smaller sections with 512 point Hanning window (different overlap strategies).

200 400 600 800 1000 1200 1400 1600 1800 2000-1

-0.5

0

0.5

Number o samples

23

20 40 60 80 100 120 140-1

0

1

Fre

quen

cy(H

z)

0 20 40 60 80 100 120 1400

500

1000

1500

Fre

quen

cy(H

z)

0 20 40 60 80 100 120 1400

500

1000

1500

Fre

quen

cy(H

z)

0 20 40 60 80 100 120 1400

500

1000

1500

Fre

quen

cy(H

z)

0 20 40 60 80 100 120 1400

500

1000

1500

Fre

quen

cy(H

z)

0 20 40 60 80 100 120 1400

500

1000

1500

Time (ms)

Fre

quen

cy(H

z)

0 20 40 60 80 100 120 1400

500

1000

1500

0 20 40 60 80 100 120 140

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time (ms)

Nor

mal

ise

d IP

0 200 400 600 800 1000 1200 1400 1600

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Frequency(Hz)

Nor

mal

ise

d en

ergy

TFDs with 16, 32, 64 ,128, 256, 512 points windowing

Normalised IP and energy with 16(black), 32(red), 64(green), 128(blue), 256(magenta), 512(cyan) points windowing

24

Page 5: Advanced Digital Signal Processingnaydin/AdP/lectures/PDF/AdP_08.pdf · Advanced Digital Signal Processing 1 Time-Frequency Analysis 2 • Time-Frequency Analysis – Fourier Transform

5

• TFDs with 16, 32, 64 ,128, 256, 256, 512 points Hanning windowing

20 40 60 80 100 120 140

-0.5

0

0.5

1

Fre

quen

cy(H

z)0 20 40 60 80 100 120 140

0

500

1000

1500

Fre

que

ncy(

Hz)

0 20 40 60 80 100 120 1400

500

1000

1500

Fre

quen

cy(H

z)

0 20 40 60 80 100 120 1400

500

1000

1500

Fre

quen

cy(H

z)

0 20 40 60 80 100 120 1400

500

1000

1500

Fre

que

ncy(

Hz)

0 20 40 60 80 100 120 1400

500

1000

1500

Time (ms)

Fre

quen

cy(H

z)

0 20 40 60 80 100 120 1400

500

1000

1500

25

0 20 40 60 80 100 120 140

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time (ms)

Nor

mal

ised

IP

Normalised IP with 16(black), 32(red), 64(green), 128(blue), 256(magenta), 512(cyan) point windowing

26

0 200 400 600 800 1000 1200 1400 1600

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Frequency(Hz)

Nor

mal

ised

ene

rgy

Normalised energy with 16(black), 32(red), 64(green), 128(blue), 256(magenta), 512(cyan) point windowing

27

Sonogram

28

Sonogram

• Fast Fourier Transform

• Spectrum

• + frequencies• forward flow

• - frequencies

• reverse flow

29 30