The FFT Algorithm - Simple Step by Step

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 พ.ย. 2024

ความคิดเห็น • 102

  • @PereMersenne
    @PereMersenne 7 ปีที่แล้ว +163

    I spent part of a semester in college learning this, back in the 1980's. It cost me ~$500 in 1985 $s. Now it's free on the Internet, and presented much more clearly.
    Thanks.

    • @coltennabers634
      @coltennabers634 5 ปีที่แล้ว +17

      you should see what it cost today in college.....

    • @davidgoodwin16
      @davidgoodwin16 2 ปีที่แล้ว

      Its also hard to find good teachers - with things like this topic, skipping even a single step is like a broken chain, and I think a lot of professors find it hard to remember this, or simply don't care. Simon presents the most solid explanation of the FFT I have found, not missing or skipping any critical information.

    • @xtr3m385
      @xtr3m385 2 ปีที่แล้ว +2

      welcome to the _future..._

  • @stuf2201
    @stuf2201 5 ปีที่แล้ว +13

    This is such an amazing straightforward explanation when combined with your video on the DFT. This was impenetrable to me when I got my engineering undergraduate. I was just grateful at the time I didn't have to fully understand it to use it.
    I hope at some point you consider teaching undergraduates. Even if you aren't an academic some of my best classes were taught by people from industry that wanted to make sure we got something useful.

  • @davidgoodwin16
    @davidgoodwin16 2 ปีที่แล้ว +2

    By far the best explanation of exactly how the FFT algorithm works that I have been able to find on the net. I recreated your code in c#, and compared to some common FFT libraries - got the exact same results. Great work.

  • @FuryOnStage
    @FuryOnStage 7 ปีที่แล้ว +9

    This is the best explanation of FFT on youtube. Thank you.

  • @noneuno2296
    @noneuno2296 7 ปีที่แล้ว +5

    Instructors who may be reading: I absolutely hate it when you skip steps and make mistakes when I, the student, am trying to learn from following your "easy" explanation, step-by-step. It irks me so. You don't impress me; rather, you just frustrate and piss me, the student, off. I shouldn't have to find your mistakes; it's not my job to find your mistakes while twisting my brain in knots which shouldn't exist. You shouldn't be making mistakes. If you're making mistakes, then don't, in all your "brilliance," skip steps. (...seems a no-brainer to me.) But what's nice is I can finally say this to an instructor after so many years and not interrupt class to do it. :-)

    • @noneuno2296
      @noneuno2296 7 ปีที่แล้ว +2

      And if you make mistakes intentionally, just to see if I'm following you, and I learn this, then you really piss me off. (...assuming it matters.) Educational costs are high, and students can't afford to have instructors who make mistakes because they want to appear brilliant and skip steps.

  • @BritishBeachcomber
    @BritishBeachcomber 2 ปีที่แล้ว +4

    I first used FFT as a R&D engineer in 1979. It took a microprocessor and a load of custom electronics. Recently did it on an Arduino. Awesome progress.

  • @Devishhike
    @Devishhike ปีที่แล้ว

    Finally... One of the hundreds who showed what should I do with the output of FFT. Till now this was implicit.

  • @Berneer
    @Berneer 7 ปีที่แล้ว +49

    I have swept almost the entire TH-cam offering on FFT and I agree that this is the most accessible and concrete treatment with the best presentation. I love fresh colour-coded method of teaching. Can you say what software you used to make this?
    Yes at 6:42 it is a tiny error in the 2nd term of F1 but it multiplies by zero and doesn't change
    the final answer. So the F1 equation should be:
    F1 = 0 + -1(0) + (-j)[1+(-1)(-1)] = -2j
    I believe the rest of the video is error-free. Great work! For an even better understanding I encourage viewers to split the summations one more time to have 8 summations, remembering that exp(x)*exp(y) = exp(x+y), and then it really becomes obvious how elegant Simon Xu's way of organizing terms really is. Then the pattern becomes obvious and you could technically split as many times as you want, confidently, to have 16 terms or 32 terms without having to do all the math but instead by following the pattern.
    Simon, "I'll be watching your career with much interest young man".... quote from Senator Palpatine :)

  • @erickr199
    @erickr199 3 ปีที่แล้ว +1

    Thanks i literally transcribed the entire video into notes, very helpful

  • @PeterLuong
    @PeterLuong 7 ปีที่แล้ว

    This is by far the best explanation of the FFT I had ever seen.

  • @hubertyat3056
    @hubertyat3056 ปีที่แล้ว

    very nice and straight forward explanation

  • @distribrain
    @distribrain 4 ปีที่แล้ว +1

    Quite good presentation. Clear Explanation.
    Just mention that 5:56 the 4th summation should use x3 rather than x4. (x0 x2 x1 x3)

  • @satyajeetkumarjha1482
    @satyajeetkumarjha1482 2 ปีที่แล้ว

    a lot better than many other videos out there.

  •  5 ปีที่แล้ว +2

    This is the greatest explanation of FFT ever! I hope that my knowledge and skills will allow me to pass my image processing test tomorrow😅

  • @bokunochannel84207
    @bokunochannel84207 3 ปีที่แล้ว

    wow, dude you just solve my problem.
    i'm literally looking for this for 3days and i found the answer at minute 21

  • @nin10dorox
    @nin10dorox 5 ปีที่แล้ว +1

    I've been trying to understand this algorithm for a long time, and this video made it click!

  • @sanyikacsatornacskalyaerde6605
    @sanyikacsatornacskalyaerde6605 3 ปีที่แล้ว +1

    You have great videos. You should continue making videos!!! Thank youu!

  • @yackawaytube
    @yackawaytube ปีที่แล้ว

    I finally understood FFT

  • @MST339
    @MST339 5 หลายเดือนก่อน

    @7:20 the phase-shift (exponential) index shall be doubled for F_2^o, and quadrupled for F_3^o.

  • @shanwei1038
    @shanwei1038 8 ปีที่แล้ว +1

    Really helps for a newbie of fourier Transform.

  • @floretion
    @floretion 4 ปีที่แล้ว

    Awesome - great job describing this!

  • @SimonXu
    @SimonXu  7 ปีที่แล้ว +15

    Sorry all, I just noticed all the comments in my email when I checked this account today.. Based upon your comments I think I probably have several errors in my video. Hopefully I can create a new video that fixes all these errors in the future. I created this video as a resume filler when I was job hunting, had no idea it would be viewed so many times.

    • @wojtekpilwinski
      @wojtekpilwinski 7 ปีที่แล้ว +2

      Yes your video is realy great, I watched tens of similar, but only your helped me to understand, especially DFT video, because here the true is that there are a lot of mistakes that made me crazy, I but after watch it ten times I catch the errors and I think I got the idea of FFT. But still I have some question like:
      1) Shoul we always devide our array until we get sums of one sample ("m" goes from 0 to 0)? I wonder because there is Nyquest (??? somebody like that) idea that there should be sampling rate 2x highest frequency we want to measure. I think I understand that Nyquest idea, but I'm not how it corresponds with deviding array to just one sample? I think it would be great if you make video FFT with 8 sample rate example like in DFT video, 8 sample rate would make it much more clear I think
      2) "Windowing" - it's not about this videao exactly but it's about FFT also. I understand exactly what "windowing" makes, but I have big problem to understand how to make Inversion FFT from that windowed FFT transfered data. When I try to plot inverted data I recive some strange results. Maybe you could also create video about that case?
      Again thanks for that videos and thanks in advance for any new if you create.

    • @eyezlee1142
      @eyezlee1142 4 ปีที่แล้ว +1

      apparently it never happens

  • @yingninghe4077
    @yingninghe4077 5 ปีที่แล้ว

    thank you. I've been trying to learn FFT . your video is very helpful!

    • @KarthikReddy-tkr
      @KarthikReddy-tkr 4 ปีที่แล้ว

      What is the use and application of FFT?
      Could you reply me please

    • @gerdsfargen6687
      @gerdsfargen6687 2 ปีที่แล้ว

      @@KarthikReddy-tkr tings

  • @eightfivezerobraxton5509
    @eightfivezerobraxton5509 5 ปีที่แล้ว

    Best video on FFT

  • @Paul-fz5tq
    @Paul-fz5tq 5 ปีที่แล้ว +2

    It is one of the best. Why do you stop your work? What can you say about Z transform?

  • @ShizzleMyChizzle
    @ShizzleMyChizzle 5 ปีที่แล้ว +1

    O my god, you are brilliant!

  • @chrisstanford3652
    @chrisstanford3652 2 ปีที่แล้ว

    🤗🤗 very easy to follow

  • @shaflyhamzah3848
    @shaflyhamzah3848 4 ปีที่แล้ว

    Thanks, Nice explanation!

  • @liangwang3098
    @liangwang3098 5 ปีที่แล้ว +2

    谢谢老哥,讲的太清楚了

  • @comprehensivelunch
    @comprehensivelunch 8 ปีที่แล้ว +16

    Hi,
    I'm writing a paper on the Fourier Transform, and one of the sections focuses on the FFT. One part of this video, however, confuses me. At 6:04, you establish that F0 = x0+x2+x1+x3 = 0 + 1 + 0 + -1. It appears that you've rearranged the x values in between the second and third parts of this equation, going from x0+x2+x1+x3 to x0+x1+x2+x3 (I'm assuming that x0=0, x1=1, x2=0, and x3=-1). Using the first ordering, it seems that Fe0 should equal 0 + 0 (x0+x2) and Fo0 should equal 1 + -1 (x1 + x3). This affects the even and odd sums, thereby affecting the results of F3 and F4. Am I missing a step here? Do Fe0 really equal x0+x1 (1) and Fo0 really equal x2+x3 (0 + -1)?

  • @AriKath
    @AriKath ปีที่แล้ว

    Wonderful

  • @samuelmuhigirwa6715
    @samuelmuhigirwa6715 5 ปีที่แล้ว

    your videos are beautiful! thank you so much!

  • @NicolasSchmidMusic
    @NicolasSchmidMusic 3 ปีที่แล้ว

    Thank you so much!

  • @lynneli8630
    @lynneli8630 4 ปีที่แล้ว

    at 6:11, since it is not ordered as 0+0+1+(-1), the split of F_even and F_odd group is wrong

  • @stefanocarniel4015
    @stefanocarniel4015 2 ปีที่แล้ว

    There Is an error computing F1: the second term of the sum should be -1(0). It does not affect the final value because this product is 0, but for the sake of correctnes

  • @AladdinPersson
    @AladdinPersson 4 ปีที่แล้ว

    Hey buddy great video, what program did you use to make the vid?

  • @derrickkwon2232
    @derrickkwon2232 11 หลายเดือนก่อน

    I think some missing in 5:57 x4 should be the x3.

  • @lynneli8630
    @lynneli8630 4 ปีที่แล้ว

    at 6:56, the coefficient of x_2 should be -1 instead of 1. So F_1 = -j

  • @howtovideos5143
    @howtovideos5143 7 ปีที่แล้ว +7

    in 6:42 I get -1 no 1 as you show in the video why?
    N=4, K=1, so e^(-j4pik/N) = 1? I get -1

    • @yasefmeruane7297
      @yasefmeruane7297 7 ปีที่แล้ว +1

      yes, you are right, its -1, it didnt affect the result because it was multiplied by 0 but nice find

  • @giphe
    @giphe 10 หลายเดือนก่อน

    Legend.

  • @murrrkeskin
    @murrrkeskin 6 ปีที่แล้ว

    Thank you for the video, it is very helpful. Can you make a video about inverse FFT?

  • @alvansanchez5667
    @alvansanchez5667 2 ปีที่แล้ว

    you are the best, I do not understand nothing, but I pretty sure taht you're a fucking genious. God bless you

  • @Red-ft9sb
    @Red-ft9sb 5 ปีที่แล้ว +1

    The statement "If we add a multiple of 2pi to the operand of cos (3:54) you end up with simply the 2pi functions with the 2pi multiple." Please elaborate. How can it be canceled? Apology if I sounded stupid but I just couldn't figure out how it gets removed. Maybe because it's a neglible value?. I don't know

    • @maddiesmith2131
      @maddiesmith2131 4 ปีที่แล้ว +2

      The cosine wave is periodic, repeating every 2pi. So adding a 2pi value simply obtains the same result as before adding 2pi.

  • @KTheXIII
    @KTheXIII 2 ปีที่แล้ว

    Thanks

  • @rahulsingh7508
    @rahulsingh7508 4 ปีที่แล้ว

    Why the first value after applying FFT on a one-dimensional array is always the greatest value?

  • @ОрландоОрсо
    @ОрландоОрсо 4 ปีที่แล้ว

    Thanks!

  • @jameshopkins3541
    @jameshopkins3541 6 หลายเดือนก่อน

    WHICH IS THE ORIGINAL SEQUENCE?

  • @giviarabidze2287
    @giviarabidze2287 5 ปีที่แล้ว +3

    Damn everything looks so fine unless you go into details :( Not even sure are they really mistakes or do I make mistakes myself. For example how e(-j4pk/N) = 1 in one case and it equals -1 in the other, when k=1 and N=4. Doesn't it make cos(p)-jsin(p) = -1 in both cases?

    • @marvinzhou3766
      @marvinzhou3766 5 ปีที่แล้ว

      I saw that too, I think it should be -1.

    • @KarthikReddy-tkr
      @KarthikReddy-tkr 4 ปีที่แล้ว

      What's the use and application of FFT?

  • @bahaaghammraoui1304
    @bahaaghammraoui1304 4 ปีที่แล้ว

    Thank you, 100/100

  • @prismadynamicsllc3014
    @prismadynamicsllc3014 8 ปีที่แล้ว +1

    Quick question, in the video the index k and n are going from 0 to # of samples. Should it be going from 0 to number of samples minus 1?

    • @SimonXu
      @SimonXu  8 ปีที่แล้ว +1

      +Prisma Dynamics LLC Yes you are correct, sorry for the mistake

  • @alfietankokleong
    @alfietankokleong 8 ปีที่แล้ว

    Such a wonderful video! Could you explain the part @ 5:58 , F0 = 0 + 1 + 0 - 1. All exponents = 1, how is X3 = -1. How is X0 and X3 = 0? If X0 is 0, why is X2 not = 0. Thanks alot in advance

    • @alfietankokleong
      @alfietankokleong 8 ปีที่แล้ว

      Hi, ignore my question, of course I understand now that you are simply applying the coefficients of 0, pi/4,pi/2 and pi of the first term. But therefore referring to 5:51, the content should be X0 = 0, X2 = 0.707, X1 = 0, X3 = -1?

    • @murrrkeskin
      @murrrkeskin 6 ปีที่แล้ว

      @@alfietankokleong they are just the data samples which are taken from the sine wave. watch again by starting at 5:00

  • @leadersupreme3112
    @leadersupreme3112 8 ปีที่แล้ว +5

    Another Quick question, in the video 20000*log2 20000 = 285754 operations, it's not 28600?

    • @skywaysecurities
      @skywaysecurities 6 ปีที่แล้ว

      rounded to 28600

    • @louismorge7099
      @louismorge7099 5 ปีที่แล้ว +1

      @@skywaysecurities Yes but rounded is 286000 not 28600 because log2(20000) ~ 14 not 1.4

    • @eduardomurphyperez717
      @eduardomurphyperez717 2 ปีที่แล้ว

      Thanks, I was confused about it, hope OP can correct it.

  • @salovafidi8913
    @salovafidi8913 3 ปีที่แล้ว

    while i calculating like normal DFT why do i get F1 = 0+0j not -2j?

  • @kinnarikateja5064
    @kinnarikateja5064 5 ปีที่แล้ว +1

    Hello how x2 = 1, if you take 4 samples, x0=0, x1=1, x2=0 and x3 = -1, isn't it...at 6: 09 u splited even n odds but u considered x0 n x1 as odd. N other as even.. How? Plz correct me n guide

    • @cherma11
      @cherma11 ปีที่แล้ว +1

      Good catch you found an error there. F(0)_even = 0, F(1)_even = 0; F(0)_odd = 0, F(1) _odd= 2. Note even is always zero because of the sample. The -1 Sample flips sign on F(1) because of green 4*pi term. Note to leave out the 2*pi term on f(1)_odd when calculating the odd_sum.

  • @dimas425
    @dimas425 8 ปีที่แล้ว

    thank you .

  • @swagmuffin411gaming8
    @swagmuffin411gaming8 ปีที่แล้ว

    Gonna watch 30 more times then hopefully I will get it lol

  • @brookshartsock4950
    @brookshartsock4950 2 ปีที่แล้ว

    Remember guys, FFT's > NFT's

  • @MajedW2334
    @MajedW2334 7 ปีที่แล้ว +1

    thanx aloooooooooooooooot..

  • @itsViPar
    @itsViPar 4 ปีที่แล้ว

    Can someone show me how he split them in two with more detail

  • @TheRizzTV
    @TheRizzTV 8 ปีที่แล้ว +2

    if you have the c++ code, is it possible that you would put it up in the description or something so it's possible to download? :)

  • @pavelkonovalov8931
    @pavelkonovalov8931 5 ปีที่แล้ว

    God bless you

  • @pratamaramadhan9769
    @pratamaramadhan9769 5 ปีที่แล้ว

    Cool

  • @EhsanHabib
    @EhsanHabib 8 ปีที่แล้ว

    what do you mean by "bin"?

    • @sanferrera
      @sanferrera 8 ปีที่แล้ว

      a repository. A place where you put all the results from the different frequencies.

    • @sticky4loop227
      @sticky4loop227 7 ปีที่แล้ว +1

      #unibrow ;D

    • @gerdsfargen6687
      @gerdsfargen6687 2 ปีที่แล้ว

      @@sticky4loop227 bin laden

  • @shamsundarkulkarni5146
    @shamsundarkulkarni5146 8 ปีที่แล้ว

    good ideo

  • @davidchen3128
    @davidchen3128 4 ปีที่แล้ว +1

    F3 should have been F3 = j (-2j )= 2

  • @othmanelhoufi2506
    @othmanelhoufi2506 4 ปีที่แล้ว

    Example of SVGs path drawing using Fourier Transform : othmanelhoufi.github.io/fourier

  • @nathangerwig6637
    @nathangerwig6637 6 ปีที่แล้ว

    No sound

  • @JosephFrye-g8t
    @JosephFrye-g8t 2 หลายเดือนก่อน

    Miller Ronald Williams Barbara Lopez Patricia

  • @junkmail4613
    @junkmail4613 6 ปีที่แล้ว +10

    Really wish you'd have raised the volume to where we could hear it. No. P.S. NOT LOUD ENOUGH!!! P.P.S. Can't hear it!!!

    • @AccuphaseMan
      @AccuphaseMan 5 ปีที่แล้ว +2

      I really wish you got yourself an external dac/amp SO YOU COULD JUST TURN IT UP lmao

    • @gerdsfargen6687
      @gerdsfargen6687 2 ปีที่แล้ว +1

      @@AccuphaseMan he need hearing aid lol

    • @necroowl3953
      @necroowl3953 ปีที่แล้ว

      Broski can't even hear the captions

  • @JosephLewis-i7h
    @JosephLewis-i7h หลายเดือนก่อน

    Lewis Susan Thompson Charles Robinson Jason

  • @borisgotov9838
    @borisgotov9838 7 ปีที่แล้ว +4

    this is no so simple :(

  • @jameshopkins3541
    @jameshopkins3541 6 หลายเดือนก่อน

    ¿???¿??????????????????
    P,ease explain something WHAT ARE YOU DOING???????

  • @christopherjoseph651
    @christopherjoseph651 3 ปีที่แล้ว

    I was about to thank you for using C++, then you had to go and mention python! WHY WOULD YOU USE A SUPER SLOW VIRTUAL LANGUAGE FOR AN ALGORITHM THAT IS SUPPOSED TO BE FAST!