Chapter 10: Discrete Fourier Transform & Fast Fourier Transform

EE 422G Notes: Chapter 10 Instructor: Cheung Chapter 10: Discrete Fourier Transform & Fast Fourier Transform An assortment of “Fourier” analysis met...
0 downloads 2 Views 81KB Size
EE 422G Notes: Chapter 10

Instructor: Cheung

Chapter 10: Discrete Fourier Transform & Fast Fourier Transform An assortment of “Fourier” analysis methods: 1. Fourier Series – continuous-time periodic signals T t ω -4π/T -2π/T 0 2π/T 4π/T

Periodic signal, x(t)

Analysis : X k =

1 T

Synthesis : x ( t ) =



T 2

x (t )e

− T2



∑X

k = −∞

k

e

− jk

jk

2π t T

dt

2π t T

2. Fourier Transform – general continuous-time signals

t ω x(t) ∞

Analysis : X ( jω ) = ∫ x (t )e − jωt dt −∞



Synthesis : x(t ) = ∫ X ( jω )e jωt dω −∞

3. Discrete-time Fourier Transform – general discrete-time signals T t ω -2π/T

x(nT)

Analysis : X (e jωT ) =



∑ x(nT )e

0

2π/ T

− jnωT

n = −∞ ∞

Synthesis : x( nT ) = ∫ X (e jωT )e jnωT dω −∞

Page 10-1

EE 422G Notes: Chapter 10

Signals Continuous in t & Periodic Continuous in t Discrete in t Discrete in t & Periodic

Instructor: Cheung

Fourier Fourier Series Continuous-time Fourier Transform Discrete-time Fourier Transform Discrete Fourier Transform

Transform Characteristics Discrete in ω Continuous in ω Continuous in ω & Periodic Discrete in ω & Periodic

Now we introduce the fourth one, the Discrete Fourier Transform (DFT). N=4 t ω - 2π -

Periodic signal, x(nT)

N −1

Analysis : X k = ∑ x( nT )e

−j

2πk n N

6π 4

-

4π 4

-

2π 4

0

2π 4

4π 4

6π 4



, k = 0,1,.., N − 1

n =0

j 1 N −1 Synthesis : x (nT ) = ∑ X k e N k =0

2πk n N

, n = 0,1,..., N − 1

Why DFT? FOR “APPROXIMATING” DTFT OF A FINITE-DURATION SIGNAL In real-life computations, ALL SIGNALS ARE FINITE – the consequence is that you can apply periodic extension to create a periodic discrete-time signal: N=4

N=4 t

Finite-duration signal, x(nT)

t Periodic signal, x’(nT)

What is the relation between the DTFT of the finite duration signal x(nT) and the DFT of the periodic extended signal x’(nT)? DFT of x’(nT) are in fact FREQUENCY SAMPLES of the DTFT of x(nT) Page 10-2

EE 422G Notes: Chapter 10

Instructor: Cheung

Here is the definition of Discrete Fourier Transform (DFT) again: N −1

Analysis : X k = ∑ x (nT )e

−j

2πk n N

, k = 0,1,.., N − 1

n =0

1 Synthesis : x (nT ) = N

N −1

∑X k =0

k

e

j

2πk n N

, n = 0,1,..., N − 1

Compared with the analysis formula of the DTFT of a finite-duration x(n):

X (e

jωT

N −1

) = ∑ x (nT )e − jnωT n= 0

It is easy to see that Xk equals X(ejωT) evaluated at ω =

2π k T N

Question 1: What does it mean? Recall that X(ejωT) is periodic with period equal to the sampling frequency fs or 2π/T, thus Xk represents the k-th sample when sampling X(ejωT) with N samples per period. For example: if N=6, we have H(ejωT) X0 X1

X5

X2 X4 X3 -2π/T

0

ω 2π/ T

Question 2: Is there any loss in information (do we need something similar to the Nyquist theorem in Frequency domain)? No, as long as the number of samples per period is the same as or larger than the duration of the signal. Why? Xk is also the coefficient for the Discrete-time Fourier series of the periodic signal x’(nT). Page 10-3

EE 422G Notes: Chapter 10

Instructor: Cheung

Interpretation: Discrete-time Fourier series Recall the continuous-time Fourier Series for a periodic signal x(t) with period NT:

1 ~ Analysis : X k = NT



NT

0

x(t )e

− jk

2π t NT

dt





~ jk t Synthesis : x(t ) = ∑ X k e NT k = −∞

Now, we sample x(t) with sampling period T, the resulting discrete-time sequence x(nT) is also periodic with period = N: NT t

Periodic signal, x(t)

Now, we consider the continuous-time surrogate xs(t) of x(nT). ∞

x s (t ) = ∑n =0 x(nT )δ (t − nT ) This is also a periodic signal with period NT, so we compute its Fourier Series coefficient by integrating the product of one single period with exp(-j2πk/(NT)): 2πk ) −j t 1 NT N −1 NT ( ) ( − ) Xk = x nT δ t nT e dt ∑n =0 NT ∫0

1 = NT



N −1

n =0

x( nT )e

−j

2πk n N

If we define X k = NTXˆ k , then it coincides with the analysis formula of DFT: N −1

X k = ∑ x( nT )e

−j

2πk n N

n =0

Page 10-4

EE 422G Notes: Chapter 10

Instructor: Cheung

Plugging it back to the Fourier Series synthesis formula, we have

1 x s (t ) = N



∑X

k =−∞

k

e

j

2πk t NT

1 ⇒ x( nT ) = N



∑X

k = −∞

k

e

j

2πk n N

This is almost the same as the synthesis formula for DFT:

1 x (nT ) = N

N −1

∑X k =0

k

e

j

2πk n N

, n = 0,1,..., N − 1

Unlike continuous-time Fourier series which needs infinitely many harmonics, the discrete-time needs only N of them. The reason is that the discrete-time exponentials are themselves periodic in N as well:  2π (k + N )   2πk   2πk exp j n  = exp  j n + j 2πn  = exp  j N    N   N

 n 

Let’s consider the case when N=4. The real part: Real(exp ( j 2π4k n )) = cos( 2π4k n ) : k=0: cos(0n) = u(n)

0

n

k=1: cos(πn/2)

0

n

k=2: cos(πn)

0

n

k=3: cos(3πn/2)

0

n

k=4: cos(2πn) = u(n) 0

n

Page 10-5

EE 422G Notes: Chapter 10

Instructor: Cheung

The imaginary part : Im(exp ( j 2π4k n )) = sin ( 2π4k n ) k=0: sin(0n) = u(n) n

0 k=1: sin(πn/2)

n

0 k=2: sin(πn)

n

0

k=3: sin(3πn/2) n

0

k=4: sin(2πn) = u(n)

n

0

2πk  n  has four distinct sequences before it starts repeating:  4   2π 0   2π  π   2π 2   2π 3   3π  exp n  = u(n), exp n  = exp n, exp n  = exp(πn), exp n  = exp n   4   4  2   4   4  2 

As you can see, exp

DFT Theorem states that ANY periodic sequence x(n) with period = 4 can be written as a linear summation of these four sequences – the coefficients are the DFT of x(n): π   3π x ( n ) = X 0 u( n ) + X 1 exp  n  + X 2 exp (πn ) + X 3 exp  2   2

 n 

Page 10-6

EE 422G Notes: Chapter 10

Instructor: Cheung

Example: 4

1

k

n N −1

X 0 = ∑ x( nT )e

−j

2π 0 n 4

= 1+1+1+1 = 4

n =0

N −1

X 1 = ∑ x( nT )e

−j

2π 1 n 4

=e

−j

2π 0 4

+e

−j

2π 1 4

+e

−j

2π 2 4

+e

−j

2π 3 4

= 1 − j −1+ j = 0

n= 0

N −1

X 2 = ∑ x ( nT )e

−j

2π 2 n 4

−j

2π 3 n 4

=e

−j

4π 0 4

+e

−j

4π 1 4

+e

−j

4π 2 4

+e

−j

4π 3 4

= 1−1+1−1 = 0

n =0

N −1

X 3 = ∑ x (nT )e

=e

−j

6π 0 4

+e

−j

6π 1 4

+e

−j

6π 2 4

+e

−j

6π 3 4

= 1+ j −1 − j = 0

n =0

Properties of the DFT 1. Linearity:

Ax (n ) + By ( n ) ↔ AX ( k ) + BX ( k )

2. Time Shift:

x ( n − m ) ↔ X ( k )e − j 2πkm / N = X ( k )WN k − m 3. Frequency Shift: x(n)e j 2πmn / N ↔ X (k − m)

4. Parseval’s Theorem N −1

∑ | x(n) | n=0

5. Circular convolution

2

=N

−1

N −1

∑ | X (k ) |

2

k =0

x( n) ⊗ y ( n) ↔ X ( k )Y (k )

Page 10-7

EE 422G Notes: Chapter 10

Instructor: Cheung

4

1 x(nT)

Xk

n

k

4

1 y(nT)

Yk

n

k

16

4 XkYk

n

k

But convolving x(n) and y(n) should result in

x(nT) * y(nT) n

You may recall that convolving two finite sequences of length N will result in a sequence of length 2N-1. Thus, it is OBVIOUSLY WRONG TO EXPECT THAT MULTIPLYING THEIR N-POINT DFT’S WILL GIVE THE RIGHT ANSWER. When multiplying the two N-point DFT, an operation called circular convolution occurs which is equivalent to computing a N-point summation on the periodic extensions of the two original sequences:

x(kT) 0 y(-kT) 0 4 N-pt IDFT(XkYk)

n 0

Page 10-8

EE 422G Notes: Chapter 10

Instructor: Cheung

So what should you do in to order to compute x(n)*y(n) in the frequency domain? Answer: Zero-pad the original signal to 2N-1 and take a 2N-1 DFT

x(kT) 0 y(-kT) 0

x(kT) 0 y(T-kT) 0

(2N-1)-pt IDFT(XkYk) n 0

Page 10-9