Está en la página 1de 24

La Transformada Rpida de Fourier

Cuando la funcin f(t) est dada por una lista de N valores f(t1), f(t2), ...f(tN) se dice ue est discretizada o muestreada, entonces la inte!ral ue define la Transformada de Fourier"
F() = f ( t )e jt dt

#e convierte en la sumatoria

F(n ) = f ( t k )e
k =1

n ( k 1) j 2N

, para 1 n N

($onde % es la frecuencia discreta) Llamada Transformada Discreta de Fourier

La Transformada Rpida de Fourier


La Transformada $iscreta de Fourier ($FT) re uiere el clculo de N funciones e&ponenciales para o'tener F(n), lo cual resulta un esfuer(o de clculo enorme para N !rande. #e )an desarrollado m*todos ue permiten a)orrar clculos + evaluar de manera rpida la Transformada discreta, a estos m*todos se les llama Transformada Rpida de Fourier (FFT)

La FFT + la #erie de Fourier


,odemos )acer uso de la FFT para calcular los coeficientes cn + c-n de la #erie comple.a de Fourier como si!ue" Ejemplo" #ea f(t) el tren de pulsos de anc)o p + periodo T. f(t)
1
p

...

-T

-T

/2

0 -p

/2

/2 p /2
T

T ...

La FFT + la #erie de Fourier


La versin muestreada f(%) de f(t) slo puede tomar un n/mero finito de puntos. Tomemos por e.emplo N012 puntos cuidando ue cu'ran el intervalo de 2 a T (con p01, T02)" 32 muestras de f(t), de 0 a T 1.5
1

f(k)
0.5 0

La FFT + la #erie de Fourier


,ara o'tener estas 12 muestras usando 3atla' se puede )acer lo si!uiente"
k=0:31 f=[(k<8)|(k>23)] Plot(k,f,o)

La FFT + la #erie de Fourier


Con los 12 puntos f(%) calculamos F(n) mediante la FFT, por e.emplo, en 3atla'"
F=fft(f)/N;

Con lo ue o'tenemos 12 valores comple.os de F(n). 4stos valores son los coeficientes de la serie comple.a ordenados como si!ue"
n 1 2 1 5 ... 16 17 18 19 ... 12

F(n) c2

c1

c2

c1 ... c1: c-16 c-1: c-15 ... c-1

La FFT + la #erie de Fourier


,odemos !raficar el espectro de amplitud reordenando previamente F(n) como si!ue
aux=F; F(1:16)=aux(17:32); F(17:32)=aux(1:16);

F(n) ueda"
n 1 ...
...

11

15

1:

16

17

18

19

...

12

F(n) c-16

c-1 c-2 c-1 c2 c1 t!"(a# (F))

c2

c1 ... c1:

; para !raficar el espectro de amplitud" <'teni*ndose"

La FFT + la #erie de Fourier


0.6
|F(n)|

Espectro de Amplitud |F(n)|


Para el tren de pulsos p=1, T=2

0.4

0.2

10

20

30

#i deseamos una escala )ori(ontal en unidades de frecuencia (rad=se!)"

La FFT + la #erie de Fourier


$0=2%&'/(; )=*16:1+; $=)%$0; ,t!"($,a# (F))
0.6 |F(w)|

Espectro de Amplitud |F(n)|


para el tren de pulsos, p=1,T=2

0.4

<'teniendo"
0.2

-50

50

La FFT + la #erie de Fourier


Tam'i*n podemos o'tener los coeficientes de la forma tri!onom*trica, recordando ue"

c n = (a n jb n ), c n = (a n + jb n )
1 2 1 2

,odemos o'tener

,ara el e.emplo se o'tiene" a202.:, an0'n02 (para n par), adems para n impar"
n 1 1 : 7 9 11 11 1:

a 0 = c 0 , a n = 2 Re(c n ), b = 2 Im(c n )

an 2.6156 -2.2262 2.1169 -2.2762 2.2:11 -2.2115 2.2192 -2.2262


bn -2.262: 2.262: 2.262: 2.262: -2.262: 2.262: -2.262: 2.262:

La FFT + la #erie de Fourier


Como el tren de pulsos es una funcin par, se espera'a ue 'n02> (el resultado o'tenido es errneo para 'n, pero el error disminu+e1para N !rande)"
a0
0.5

Coeficientes bn Coeficientes an
0

-0.5

10

20

30

La FFT + la #erie de Fourier


Tarea" ?sar el si!uiente cdi!o para !enerar 128 puntos de una funcin peridica con frecuencia fundamental 20122 (62 )ert() + dos armnicos impares en el intervalo @2,TA"
N=128; $0=120%&'; (=1/60; t=0:(/(N*1):(; f= ')($0%t)-0.2% ')(3%$0%t)-0.1% ')(11%$0%t);

?sando una funcin peridica diferente a la su'ra+ada" a) Braficar la funcin. ') <'tener + !raficar el espectro de amplitud de la seCal usando la funcin FFT

3edidores $i!itales
La FFT )a )ec)o posi'le el desarrollo de e uipo electrnico di!ital con la capacidad de clculo de espectros de frecuencia para seCales del mundo real, por e.emplo" 1) <sciloscopio di!ital Fu%e 121 ($ 18,600.00 M.N.) 2) <sc. di!ital Te%troni& TD#722, ($3,796 dls) 1) ,oEer ,latform ,,-5122

3edidores $i!itales
El Flu e 1!3 s"ope me#er

3edidores $i!itales
Te #ron$% T&'7!0( (os"$los"op$o d$)$#al)

3edidores $i!itales
*nal$+ador de po#en"$a ((,-300 4s un e uipo especiali(ado en monitoreo de la calidad de la ener!Fa" permite medicin de 5 seCales simultneas (para sistemas trifsicos)

Fast Fourier Transform (FFT), I


DFT appears to be an O(N2) process. Danielson and Lanczos; DFT of length N can be re ritten as the sum of t o DFT of length N!2.
H k = e 2ijk / N h j
j =0 N 1

= =

N / 2 1 j =0

e e
j =0

2i ( 2 j ) k / N

h2 j +

N / 2 1 j =0

e
2ik / N

2 i ( 2 j +1) k / N

h2 j +1 h2 k +1

N / 2 1

2ijk /( N / 2 )

h2 j + e

N / 2 1 k =0

2 ijk /( N / 2 )

1 1 = H k0 + e 2ik / N H k = H k0 + W k H k , (W e 2i / N ) "e can do the same reduction of Hk0 to the transform of its N!# e$en% numbered input data and N!# odd%numbered data. For N & 2', e can continue appl(ing the reduction until e subdi$ide the data into the transforms of length ). For e$er( pattern of log2N number of *+s and )+s, there is one%point transformation that is ,ust one of the input number hn

1001...001 Hk = hn

for some n

Fast Fourier Transform (FFT), II


For -&.
H k = W jk h j = h0 + W k h1 + W 2 k h2 + W !k h! + W k h + W " k h" + W # k h# + W 7 k h7
j =0 7

= ( h0 + W 2 k h2 + W k h + W # k h# ) + W k (h1 + W 2 k h! + W k h" + W # k h7 ) = ( h0 + W k h ) + W 2 k (h2 + W k h# ) + W k [(h1 + W k h" ) + W 2 k (h! + W k h7 )] = ( h0 ) + W k ( h ) + W 2 k [h2 + W k (h# )] + W k [(h1 ) + W k (h" ) + W 2 k [h! + W k (h7 )]]

/ince WN!2 & %), Hk* and Hk) ha$e period N!2,
1 H k = H k0 + W k H k , 1 H k + N/ 2 = H k0 W k H k

for k = 0,1,..., N / 2 1

Diagrammaticall( (butterfl(),
H k0
1 Hk

1 H k0 + W k H k

1 H k0 W k H k

(k = 0,1,..., N / 2 1)

There are -!2 butterflies for this stage of the FFT, and each butterfl( re0uires one multiplication

Fast Fourier Transform (FFT), III


/o far,
0 H0 0 1 H0 +W 0H0 = H0 1 H10 + W 1 H1 = H1 0 1 H2 +W 2H2 = H2 0 1 H! + W !H! = H! 0 1 H0 W 0Hk =H 1 H10 W 1 H1 = H" 0 1 H2 W 2H2 = H# 1 H !0 W ! H ! = H7

H10
0 H2

H !0
1 H0 1 H1 1 H2 1 H!

The splitting of 1H23 into t o half%size DFTs can be repeated on H2* and H2) themsel$es,
H k0 = H k00 + W 2 k H k01 ,
1 10 11 Hk = Hk + W 2k H k ,

H k0+ N/ = H k00 W 2 k H k01


1 10 2k 11 Hk Hk for k = 0,1,..., N / 1 + N/ = H k W

Fast Fourier Transform (FFT), III


/o far,
00 H0 00 01 0 H0 +W 0H0 = H0 0 1 H0 +W 0H0 = H0 1 H10 + W 1 H1 = H1 0 1 H2 +W 2H2 = H2 0 1 H! + W !H! = H! 0 1 H0 W 0H0 =H 1 H10 W 1 H1 = H" 0 1 H2 W 2H2 = H# 1 H !0 W ! H ! = H7

H100
01 H0

H100 + W 2 H101 = H10


00 01 0 H0 W 0H0 = H2

H101
10 H0 10 H1 11 H0 11 H1

H100 W 2 H101 = H !0
10 11 1 H0 +W 0H0 = H0 10 11 1 H1 + W 2 H1 = H1 10 11 1 H0 W 0H0 = H2 10 11 1 H1 W 2 H1 = H!

$ 1H2**3 is the N!#%point DFT of 1h*, h#,4, h-%#3, $ 1H2*)3 is the N!#%point DFT of 1h2, h5,4, h-%23, $ 1H2)*3 is the N!#%point DFT of 1h), h6,4, h-%73, $ 1H2))3 is the N!#%point DFT of 1h7, h8,4, h-%)3, $ -ote that there is a re$ersal of the last t o digits in the binar( e9pansions of the indices j in 1h,3.

Fast Fourier Transform (FFT), I:

Fast Fourier Transform (FFT), :


If e continue ith this process of hal$ing the order of the DFT/, then after R&log2N stages, e reach here e are performing N one%point DFTs.
$ ;ne%point DFT of the number h, is ,ust the identit( h, h, $ /ince the re$ersal of the order of the bits ill continue, all bits in the binar( e9pansion of , ill be arranged in re$erse order. $ Therefore, to begin the FFT, one must first rearrange 1h,3 so it is listed in bit re$erse order.

For each of the log2N stages, there are N!2 multiplications, hence there are (N!2)log2N multiplications needed for FFT.
$ <uch less time than the (N%))2 multiplications needed for a direct DFT calculation. $ "hen -&)*2#, FFT&6)2* multiplication, DFT&),*#5,62= sa$ings b( a factor of almost 2**.

Fast Fourier Transform (FFT), :I

También podría gustarte