You are on page 1of 7

Implementation of Fourier Transform using MATLAB

Mobile Communication Laboratory


Tel : 940 8677, E11-501 , jpkim@ee.knu.ac.kr

How to implement a integral of general function


x (t ) ! t  4
1 x(t )dt ! t  4dt ! t 2  4t ! 288 4 4 2 4
20 20 20

20

4

x(t )dt $

x(n(t ) * (t ! 156 * 2 ! 312


n ! 2

10

If (t ! 0.01 ,

20

4

x(t )dt $ 288.12

sum_x = 0; for k = 1:length(t) sum_x = sum_x + x(k); End sum_x = sum_x * dt


Http://mimocom.knu.ac.kr 2

How to implement the Fourier Transform


M ( f ) ! m(t )e  j 2Tft dt ,
g g

fN e f e f N

M ( f  N ) ! m(t )e  j 2Tf N t dt
g

M ( f  N 1 ) ! m(t )e  j 2Tf N 1t dt


g

M ( f 1 ) ! m(t )e  j 2Tf 1t dt


g

M ( f 0 ) ! m(t )e  j 2Tf 0t dt
g

M ( f1 ) ! m(t )e  j 2Tf1t dt
g

M ( f N ) ! m(t )e  j 2Tf N t dt
g

M(f ) !

M ( fN )

M ( f N 1 )

M ( f 1 )

M ( f0 )

M ( f1 )

M ( fN )

Http://mimocom.knu.ac.kr

How to implement the Fourier Transform


M(f ) !
m( t  N ) m(tN 1 )

M ( f N )

M ( f N 1 )

m(t1 )

M ( f 1 )

M ( f0 )

M ( f1 )

M ( fN )

m(t1 )

m(t0 )

m(t N )

e  j 2Tf  N t N e  j 2Tf  N 1t N e  j 2Tf  N t N 1e  j 2Tf  N 1t N 1

e  j 2Tf 1t N e  j 2Tf 0t N e  j 2Tf1t N e  j 2Tf 1t N 1e  j 2Tf 0t N 1 e  j 2Tf1t N 1

e  j 2Tf N t N e  j 2Tf N t N 1

*
Http://mimocom.knu.ac.kr

e  j 2Tf  N t1 e  j 2Tf  N 1t1

e  j 2Tf 1t1 e  j 2Tf 0t1

e  j 2Tf1t1

e  j 2Tf N t1

e  j 2Tf  N t0 e  j 2Tf N 1t0 e  j 2Tf  N t1 e  j 2Tf  N 1t1

e  j 2Tf 1t0 e  j 2Tf 0t0 e  j 2Tf 1t1 e  j 2Tf 0t1

e  j 2Tf1t0 e  j 2Tf1t1

e  j 2Tf N t0 e  j 2Tf N t1

e  j 2Tf  N t N e  j 2Tf  N 1t N

e  j 2Tf 1t N e  j 2Tf0t N

e  j 2Tf1t N

e  j 2Tf N t N

How to implement the Fourier Transform


for k = 1:length(f) for kk = 1:length(t) X(k) = X(k) + x(kk).*exp(-j*2*pi*f(k)*t(kk)); end X(k) = X(k) * dt; End X = x * exp(-j*2*pi*t'*f)*dt;

Http://mimocom.knu.ac.kr

Example DSB-AM
Double-sideband (DSB) AM Message Signal m(t)

sin c(100t ) 0 e| t |e t0 m(t ) ! otherwise 0


c(t ) ! cos(2Tf c t ) Carrier: t0 = 0.1 and 0.4 [sec] ts = 0.0001 [sec] fc = 250 [Hz] Determine and plot the spectra of m(t) and u(t) Demodulate the sampled DSB-AM signal u(t)
Http://mimocom.knu.ac.kr 6

Example Frequency Modulation


Frequency Modulation (FM) Message Signal m(t)

0 e t t0 / 3 1 m(t ) !  2 t0 / 3 e t 2t0 / 3 0 otherwise


Carrier: c(t ) ! cos(2Tf c t ) t0 = 0.15 [sec] ts = 0.0001 [sec] fc = 200 [Hz] kf = 50 Determine and plot the spectra of m(t) and u(t)
Http://mimocom.knu.ac.kr 7

You might also like