You are on page 1of 10

10/22/2015

Digital Signal Processing

10/22/2015 1

Spectral analysis of nonstationary signals

• Nonstationary signals are signals whose statistics vary with time,


(e.g., speech, radar, and sonar signals).

• example:
• the chirp signal 𝑥 𝑛 = 𝐴𝑐𝑜𝑠 𝜔𝑜 𝑛2 , its instantaneous frequency is
2𝜔𝑜 𝑛 is a function of time.

• The ordinary DFT analysis


is not appropriate to
analyze this signal

10/22/2015 2

1
10/22/2015

The Short-Time Fourier Transform (STFT)

• Analyze short-time segments of the signal by multiplying the signal with a


moving window 𝑤[𝑛].

• For example, The chirp signal


is segmented into four segments

• Window selection ?

10/22/2015 3

The Short-Time Fourier Transform (STFT)

For practical implementations, we sample the frequency axis.

10/22/2015 4

2
10/22/2015

• The spectrogram of the chirp signal


2
• The spectrogram is defined as 𝑋𝑆𝑇𝐹𝑇 𝜔, 𝑛

linear chirp logarithmic chirp

10/22/2015 5

The Discrete Cosine Transform


• The DFT assumes a periodic sequence with period 𝑁. Unless the sequence
has circular symmetry, this introduces abrupt changes in the time domain
which leads to poor energy packing properties of the DFT. This is due to
the introduction of high frequency components as a result of this abrupt
time jumps.

• In order to overcome this abrupt change in time, we perform symmetrical


periodic extensions to the original sequence

• There are 16 ways to symmetrically extend a sequence depending on


“even/odd” symmetry and “whole-sample/ half-sample” symmetry
10/22/2015 6

3
10/22/2015

The Discrete Cosine Transform

DCT-I DCT-II

DCT-III DCT-IV

10/22/2015 7

The Discrete Cosine Transform

DCT-VI
DCT-V

DCT-VII DCT-VIII

10/22/2015 8

4
10/22/2015

• DCT-II is the most popular due to its good energy packing properties and
its adoption in many standards (e.g., JPEG, MPEG, and H.261)

• The remaining eight anti-symmetric extensions lead to the discrete sine


transform (DST).

• Recall that from the symmetry properties of the DFT:


“the DFT of a real and even sequence is real and even”.
Then we expect the DCT of a real sequence is also real.

10/22/2015 9

The Discrete Cosine Transform (DCT-II)


• Forward DCT

10/22/2015 10

5
10/22/2015

• Inverse DCT

10/22/2015 11

• DCT-II computation

𝒔(𝒏) 2 N  DFT W2kN/ 2 𝑫𝑪𝑻(𝒙 𝒏 )

𝒙(𝒏) 2 N  DFT W2kN/ 2 2(.) 𝑫𝑪𝑻(𝒙 𝒏 )

10/22/2015 12

6
10/22/2015

DCT as an orthogonal transform

10/22/2015 13

example
• DCT-II bases of size 8

x=

3.5784 2.7694 -1.3499 3.0349 0.7254 -


0.0631 0.7147 -0.2050

>> y=dct(x)

y=

3.2545 2.5774 0.7583 1.3620 1.7899


0.8780 -2.3362 -1.8693

>> x_hat=idct(y)

x_hat =

3.5784 2.7694 -1.3499 3.0349 0.7254 -


0.0631 0.7147 -0.2050

10/22/2015 14

7
10/22/2015

Energy compaction property of the DCT

• Since the DCT is an orthogonal transform, then the Parseval’s theorem


applies

• But, the DCT tends to pack the energy, in low frequency coefficients, more
efficiently than the DFT.

• The reason for this is that the DCT transform approximates the Karhunen-
Loeve transform (KLT) for first order Markov signals.

• The reconstruction error for the DCT coefficients

10/22/2015 15

Energy packing property for the DCT


Find the number of DCT and DFT coefficients that contains 99% of the energy for the
signal?

• for DCT: N=3 coefficients


• For DFT: N=7 coefficients

10/22/2015 16

8
10/22/2015

Energy packing property for the DCT

The DCT has better energy packing property than the DFT.

10/22/2015 17

Application to JPEG image compression standard

10/22/2015 18

9
10/22/2015

Original Image
• Example
JPEG compression
with different
quality factors

Quality=80
10/22/2015 Quality=40 Quality=10 19

10

You might also like