Vous êtes sur la page 1sur 29

# Convolution, Fourier Series, and

## the Fourier Transform

CS414 Spring 2007
Roger Cheng
(some slides courtesy of Brian Bailey)

Convolution
A mathematical

## operator which computes the

amount of overlap between two functions.
Can be thought of as a general moving
average
Discrete domain:
Continuous

domain:

Discrete domain

Basic steps
1.
2.
3.
4.
5.

## Flip (reverse) one of the digital functions.

Shift it along the time axis by one sample.
Multiply the corresponding values of the two digital functions.
Summate the products from step 3 to get one point of the
digital convolution.
Repeat steps 1-4 to obtain the digital convolution at all times
that the functions overlap.

Example

Convolution

## can describe the effect of an LTI

system on a signal
Assume we have an LTI system H, and its
impulse response h[n]
Then if the input signal is x[n], the output signal
is y[n] = x[n] * h[n]
x[n]

y[n] = x[n]*h[n]

Mathematics of Waves
Periodic

In

## order to manipulate physical world, we need

mathematical tools

Fourier Series

## Any reasonable function can be expressed as a

(infinite) linear combination of sines and cosines
F(t) = a0 + a1cos (t) + b1sin(t) +
a2cos (2t) + b2sin(2t) +
=

n 0

( an cos(nt ) bn sin( nt ))

Reasonable?
F(t)

must

## finite number of discontinuities within T

finite average within T
finite number of minima and maxima

Calculate Coefficients
F (t ) n 0 (an cos( nt ) bn sin( nt ))

a0

f (t )dt
0

2
ak
T

T
T

f (t ) cos(kt )dt
0

2
bk
T

f (t ) sin(kt )dt
0

Example
F(t)

1.0

Example
4
F (t ) sin t

Example
4
4
4
F (t ) sin t
sin 3t sin 5t

3
5

Example
What

if

T = .01s;

F (t )

4
4
4
sin t
sin 3t
sin 5t

3
5

T = .05s;

F (t )

4
4
4
sin t
sin 3t
sin 5t

3
5

T = 50s;

F (t )

4
4
4
sin t
sin 3t
sin 5t

3
5

Time

Frequency

F (t )

4
4
4
sin t
sin 3t sin 5t

3
5

## Allows efficient representation of a good approximation to

the original function

## Note that convolution in the time domain is equivalent to

multiplication in the frequency domain (and vice versa)

## When you are faced with a difficult convolution (or multiplication),

you can switch domains and do the complement operation

Fourier Family

Rarely
Must

## generates a series of numeric values

apply transform to a time window of values
N = number of sample points
x[ ] contains sample points

DFT Notation
ck[i]

## and sk [i] are the cosine and sine waves,

each N points in length

## refers to the frequency of the wave

usually between 0 and N/2

ck[i ] cos(2ki / N )
sk[i ] sin( 2ki / N )

Complex exponentials
Alternatively,
Eulers

## formula: eiw = cos(w) + i*sin(w)

Calculate DFT
Separate

sinusoids
N 1

Re X [ k ] x[i ] cos(2ki / N )
i 0

N 1

i 0

Complex

exponentials

Coefficients

Re X [ k ]
Im X [k ]
Re X [k ]
Im X [k ]
N /2
N /2

With

Re X [0]
Re X [0]
N

Re X [ N / 2]
Re X [ N / 2]
N

Corresponding

## points within the basis function

contribute to each input value

Result

## is exactly equal to original data (within

rounding error), ie IDFT(DFT(x[n])) = x[n]
N /2

N /2

k 0

k 0

DCT

## Sine wave + phase shift equals cosine wave

N coefficients of cosine basis functions
Most common is Type II
Used in JPEG and MPEG

## Nave method for DFT requires O(N2) operations

FFT uses divide and conquer to break up problem into many 2point DFTs (which are easy to compute)
2-point DFT: X[0] = x[0] + x[1]
X[1] = x[0] x[1]
log2N stages, O(N) operations per stage => O(N log N) total
operations
Ideally, want N to be a power of 2 or close to a power of 2

## 4-point FFT butterfly diagram

Fourier Transform
Definitions:

Can

## be difficult to compute =>

Often rely upon table of transforms

Delta function
Definition:

Often,

## the result of the Fourier Transform needs

to be expressed in terms of the delta function

There