FFT in excel for spectral analysis

Sdílet
Vložit
  • čas přidán 17. 09. 2020
  • new version of the fft for excel. Some more details and talking compared to an older video on this channel. Plot of frequency content or spectral analysis.
  • Věda a technologie

Komentáře • 119

  • @ayugmaacharya95
    @ayugmaacharya95 Před 3 lety +11

    How would I get the amplitude of the dominant frequencies using Excel?

    • @meholden
      @meholden  Před 3 lety +18

      You can convert the amplitude in the FFT to the amplitude of the sine wave by multiplying by 2/N. Here N is 32 so find the peak amplitude and divide by 16 which gives the original amplitude of 1, at least close enough for an approximate analysis like the FFT.

    • @ayugmaacharya4487
      @ayugmaacharya4487 Před 3 lety +1

      Thank you!

  • @lcfrod
    @lcfrod Před 2 lety +13

    Clearer than this is impossible. Not by the Excel, but this is the kind of explanation I was looking for. Thank you so much.

  • @NickAbbot.
    @NickAbbot. Před 3 lety +6

    I’ve been banging my head against a wall looking for an explanation like this. Thank you, sooo much!

  • @denebvegaaltair1146
    @denebvegaaltair1146 Před 2 lety +1

    I see that 99% of your viewers were helped by this under such pressuring homework circumstances that they forgot to leave a like.

  • @PATRIK67KALLBACK
    @PATRIK67KALLBACK Před 3 lety +1

    Great video, thank you! The reason I have been frustrated is that tutorials describe in details the fft part but not the rest as you did.

  • @juanjoseguevaraortiz8384
    @juanjoseguevaraortiz8384 Před 2 lety +1

    this was a wonderful video, very streamlined and to the point. Thank you :D

  • @_ryu__jin_
    @_ryu__jin_ Před 3 lety +3

    thanks a lot, this gave me a hand with my assignment. you're such a good explainer!

  • @yutingzhang3093
    @yutingzhang3093 Před 3 lety +3

    Thank you! The explanation is very clear and this is really helpful

  • @joaopaulodias1537
    @joaopaulodias1537 Před 3 lety +1

    excellent video! congratulations on didactics. thank you for the explanation, it helped a lot.

  • @HyperspacePirate
    @HyperspacePirate Před 2 lety +1

    Your video was really helpful, thanks. This will allow me to figure out frequency levels from noise picked up on my oscilloscope without buying a spectrum analyzer

  • @alit8528
    @alit8528 Před 3 lety +1

    Finally, I could understand this...thanks a lot

  • @kaluvanhariharan4256
    @kaluvanhariharan4256 Před 2 lety

    Excellent and clever idea to use Excel...

  • @user-kn4vx7ci3c
    @user-kn4vx7ci3c Před 4 měsíci

    I love you ! your VOD just save my life !!! THX THX THX

  • @anaslahrichi
    @anaslahrichi Před 11 měsíci

    Thank you sir ! This was extremely helpful for my Phd research.

  • @lishangkuan7620
    @lishangkuan7620 Před rokem

    Wonderful lecture, thank you so much!!!

  • @alokverma9410
    @alokverma9410 Před 3 lety +1

    superb explanation

  • @honeybadgerphysics1408

    thanks, this helped me work on the program in scilab

  • @darwintolentino3425
    @darwintolentino3425 Před 3 lety +1

    oh i see that this is same to the question in one of the comments. saw the answer. thanks!

  • @hoaxuan7074
    @hoaxuan7074 Před 3 lety

    The fast Hadamard transform is easy. The out of place algorithm is super easy: Go through the data pairwise and put the sum sequentially in the lower part of the next array (column) and the difference in the upper half sequentially. Repeat log2(n) times. You can check because it is self-inverse apart from a scaling constant. It is in many ways like an FFT take away the multiplies.

  • @huseyinsimsek5818
    @huseyinsimsek5818 Před 3 lety

    Harika anlatım çok teşekkür ederim. (Thank you, sooo much)

  • @kaantuncyildiz2937
    @kaantuncyildiz2937 Před 2 lety

    thank you very much, very much appreciated work

  • @Elroe2012
    @Elroe2012 Před 2 lety

    Thanks a lot. I get your video interesting and important.

  • @hasiokowe
    @hasiokowe Před 4 měsíci

    Works great. Thanks

  • @E4E
    @E4E Před 2 lety

    This is great, thanks.

  • @joshcannon6704
    @joshcannon6704 Před 29 dny

    Great video

  • @edwardmallon4646
    @edwardmallon4646 Před 3 lety +5

    There is one aspect of the FFT tool that I found surprising: The key to getting better resolution from the Fourier when you are limited to a fixed number of data points (as is the case in Excel) is to decrease the sample frequency and thus increase the overall sampling time. (While also being careful not to let your sampling frequency fall below the Nyquist limit.) We have produced a video that demonstrates that optimization when using Excel's Fourier transform to derive a tidal frequency spectrum: czcams.com/video/0VzX-3erjPI/video.html

  • @deakzoltan2714
    @deakzoltan2714 Před rokem +1

    Many have asked, why not only the frequency 1 Hz is present in the spectrum, and the answer were also given. Nevertheless just an addition for easier understanding: The time steps were selected to be 0.1s and the number of samples were 32. So, that means, you will have 3 complete cycles of the cosign function by the 30th sample, and than you have 2 more samples (or points) which actually mess up a little bit the nice complete function. So, when you repeat the data set - that is you continue the sequence with he first sample -, you actually have a "glitch" and the transition will not be smooth. This is why additional frequencies appear (the function whose spectrum was calculated here is actually not a pure cosign function in time domain). If you want a smooth match between the start and the end of the period, the sampling frequency needs to be matched with the number of samples. In this case for example 8Hz instead of 10Hz (time step 0.125s instead of 0.1s), than it will really be a cosign function, and there will be only one value at 1Hz in the spectrum, all other frequencies will be zero.

  • @drury2d8
    @drury2d8 Před 3 lety

    Prof, how can I get a power spectral density plot for this function?

  • @Tonewheelsmile
    @Tonewheelsmile Před 3 lety

    Great!!! Thanks a lot!

  • @ornorrason8152
    @ornorrason8152 Před 3 lety

    very clear thank you

  • @dominicafonso
    @dominicafonso Před 2 lety +1

    should deltaf have been calculated with 1/(N-1)xdt rather than 1/nxdt? In your example, Nxdt = 3.2s but you only have data for 3.1s. I ask because I have seen a recommendation elsewhere to use f = k(total time).

  • @neilbohar8212
    @neilbohar8212 Před 3 lety

    can u do inverse fft of some frequency response

  • @thaliaximenes5850
    @thaliaximenes5850 Před 3 lety

    Thank you Mike

  • @joshuam8863
    @joshuam8863 Před 3 lety

    thank you kindly

  • @chumani1861
    @chumani1861 Před 2 lety

    How can I get a natural frequency from the FFT graph?

  • @reapingshadow2866
    @reapingshadow2866 Před 2 lety

    How to get the phase of the signal in excel? I have tried FFT on an example sinusoidal in excel, FFT gives back correctly the frequency and the amplitude, but the phase doesn't seem right for me. I've just used =IMARGUMENT("FFT result at the desired frequency" ) but it didn't give back the correct value.

  • @luhputriadnyani2375
    @luhputriadnyani2375 Před 2 lety +2

    anyone here got the notification after run Fourier analysis? I got warning, "Fourier analysis - the number of input values must be a power of 2. For example: 2,4,8,16,32,64,128.."

    • @MrSummitville
      @MrSummitville Před 2 lety +1

      Follow the directions given in your warning message.

  • @mefirst5427
    @mefirst5427 Před 2 lety

    I don't need to do this at work or as hobby, but I still watched and tried it on my own, LOL

  • @user-pb1lq9vl5g
    @user-pb1lq9vl5g Před 2 lety

    Awesome!

  • @semihkalma
    @semihkalma Před 3 lety

    thank you sir!!

  • @darwintolentino3425
    @darwintolentino3425 Před 3 lety +3

    hi, thanks for the video. how do you normalize the FFT amplitude in excel? Shouldn't the FFT amplitude match or be close to the original signal, which is +/-1 I think? thanks.

    • @jonashellsborn7648
      @jonashellsborn7648 Před 2 lety

      No the FFT amplitude is how common that specific frequency is. If you have much silence/weak signal, then FFT item 0, = 0Hz, i.e. DC, will have highest amplitude.

  • @didierleprince6106
    @didierleprince6106 Před 2 lety +1

    A huge Merci (:

  • @KATARILOKESHBME
    @KATARILOKESHBME Před 3 lety

    Hi Thanks for explanation
    How to get phase vs frequency plot??

  • @Morimea
    @Morimea Před 3 lety

    thank you

  • @Elroe2012
    @Elroe2012 Před 2 lety

    Thanks a lot

  • @zaidhadi854
    @zaidhadi854 Před 2 lety +1

    thanks! great explanation. but when I put the input and output range and press ok, a message pops that says "the number of input values must be a power of 2". why is that? and how to solve this? knowing that I have an arbitrary set of data (amplitude, time) collected from an Ansys simulation.

    • @professorholden3104
      @professorholden3104 Před 2 lety +1

      The FFT algorithm requires that the number of samples be a power of 2 (16, 32, 64, etc.). If you don't have the correct number of samples, you can pad the data or delete some data, or use a different algorithm (FFT is a fast solution of the Discrete Fourier Transform or DFT, there are other algorithms).

  • @sayeman9577
    @sayeman9577 Před 10 měsíci

    Thanks!

  • @mariarrtaus1864
    @mariarrtaus1864 Před 3 lety +1

    Hallo Sir.
    Sorry to interrupt. I just watched the tutorial and this tutorial is very helpful.
    Do you have a tutorial on tidal data analysis using the FFT method in Matlab.

  • @petzhang3019
    @petzhang3019 Před rokem

    Thanks for sharing the great video, Prof. After watch it, that also made me thinking deeper to an another question. At 1:15 You made the g(t)= Cos(wt)=[2*pi*f*t], and the f=1Hz. That's the main reason that your FFT at frequency domain is peak at 1Hz 7:35, right?
    The reason that we do this analysis is to learn what frequency component we have in the waveform. If you use f=1Hz at the beginning of the analysis, that made the analysis simple. In a more complicated situation, say that the fundamental frequency is 10MHz but there is harmonics there, how should I perform the analysis using g(t)?

  • @jonathanward7216
    @jonathanward7216 Před 3 lety

    At 7:00, how did you dual select two columns of data?

    • @meholden
      @meholden  Před 3 lety +2

      Select the first column, then hold down control and select the second.

  • @hakikihamidi6529
    @hakikihamidi6529 Před 3 lety

    how the scatter graph looks same like your

  • @fenrizlokeson3844
    @fenrizlokeson3844 Před 2 lety

    Thank you for this video. But i have a question. I´ve created 20 Hz sinus wave. Based on my SI = 1 ms the resulting Nyquist frequency is 500 Hz. so there is no aliasing below this. I made the FFT over 2048 samples and spectrum shows a frequency of about 13 Hz??? I don´t know why....do you have an idea? Many thanks in advance

    • @meholden
      @meholden  Před 2 lety

      The peak shows up at 13 Hz? I'd look for an error of pi/2 in your math as 20/(pi/2) is about 13. Not sure otherwise without looking at the calculations.

    • @fenrizlokeson3844
      @fenrizlokeson3844 Před 2 lety +1

      @@meholden Thank you very much for your prompt reply. I will check my calculations again. 👍

  • @tsikan8h
    @tsikan8h Před 3 lety +1

    Great video!for rookies like me, it has been very helpful. I have though a question, same as SX. Why is the magnitude x100?in the papers that I have found, the magnitude doesn't change. Have they done some modification?

    • @meholden
      @meholden  Před 3 lety +3

      You can convert the amplitude in the FFT to the amplitude of the sine wave by multiplying by 2/N. Here N is 32 so find the peak amplitude and divide by 16 which gives the original amplitude of 1, at least close enough for an approximate analysis like the FFT.

  • @rafaelbenitez7662
    @rafaelbenitez7662 Před 3 lety

    Dios lo bendiga amigo, gracias por este video

  • @ChristianNeff
    @ChristianNeff Před 3 lety

    Dr. Holden! Hope you're doing well! 😁

    • @meholden
      @meholden  Před 3 lety

      Hi Christian! I'm well, I hope you are too. Teaching online this year so making lots of videos! I started another channel (@Professor Holden czcams.com/channels/bG1D1rUPGunA8YSFuOFcVg.html ) in case you want to relive Instrumentation and Measurement systems haha.

  • @amr.a-m8350
    @amr.a-m8350 Před 3 lety

    Thank you. I hope to take these data and implying on Matlab, please

  • @xs6819
    @xs6819 Před 2 lety +1

    When I try to use the fourier analysis on my percentage data it gives me the "The number of input values must be a power of two for example 2,4,8, 16... some of my data is odd number ie' 7%. 3 % ... Can this still be used on my percentage data or not?

    • @meholden
      @meholden  Před 2 lety +1

      It's the number of samples that must be a power of two, the samples can be any value. In this video the number of samples (I call it N) is 32. If I misunderstood the question please follow up and thanks for watching!

    • @dwiharyani1470
      @dwiharyani1470 Před rokem

      I tried the number of data 32 but still can not

  • @user-pv5ih3sc7y
    @user-pv5ih3sc7y Před 9 měsíci

    Is the frequency for FFT's or function's?

  • @nnb3111
    @nnb3111 Před rokem +1

    Hello, thank you so much for the demonstration. I just can't understand why the FFT must be used with a sampling number at power 2. Can someone explain me this please ? :)

    • @meholden
      @meholden  Před rokem

      Sorry I can't explain the math behind that. But there are DFT algorithms that do not require this, they are just more computationally intensive. The Fast part of FFT requires the power of 2 sample size as I understand it.

  • @yibzo
    @yibzo Před rokem

    Hi! Thanks for sharing this video. It is easy to understand. I wonder what if my data points are not in power 2. Now, I just add more 0 until the data points are power 2. But what about the frequency calculation. Should I use N only for my real data points (not include 0 data point)?

    • @meholden
      @meholden  Před rokem

      The FFT requires a power of 2 for the sample size, but there are other DFT algorithms that do not, they are just not as efficient computationally but this may not matter depending on your application. If you pad with 0 to get N points for the FFT keep using the N with the zeros I think

  • @sx1354
    @sx1354 Před 3 lety +2

    Could you explain why the amplitude of the waveform is 1 but the magnitude of 1Hz FFT is 15?

    • @meholden
      @meholden  Před 3 lety +2

      You can convert the amplitude in the FFT to the amplitude of the sine wave by multiplying by 2/N. Here N is 32 so find the peak amplitude and divide by 16 which gives the original amplitude of 1, at least close enough for an approximate analysis like the FFT.

    • @sx1354
      @sx1354 Před 3 lety

      @@meholden Many thanks! It is very helpful.

    • @kairostimeYT
      @kairostimeYT Před 3 lety

      @@sx1354 Well, fourier transform of cosine should blast off to infinity at a point but FFT works on a finite length, sampled sequence which reduces magnitude to a finite but large number. 2/N probably is a normalizing factor (idk if this really is the case though)

  • @PokiEdu
    @PokiEdu Před 2 lety

    what is the unit of FFT magnitude (mG) which is calculated in your video ?

    • @meholden
      @meholden  Před 2 lety

      See the pinned question, I should have included it in the video but maybe next time! You can convert the amplitude in the FFT to the amplitude of the sine wave by multiplying by 2/N, so the units by default are the same as your input function but with a factor of N/2 scaling them.

    • @PokiEdu
      @PokiEdu Před 2 lety

      @@meholden no, i mean the true units. Is it use volt for the units? Is it yes, maybe you know how to change the unit to joule/Hz?

    • @meholden
      @meholden  Před 2 lety +1

      @@PokiEdu After you fix the scaling by multiplying by 2/N , the units are the same as your time-domain samples. If you measure volts then volts, if you measured acceleration then acceleration, whatever the units are in the original data will stay with the FFT magnitude. Is your data in joules? If so then you get an amplitude of joules at each frequency (in Hz).

    • @PokiEdu
      @PokiEdu Před 2 lety

      @@meholden aahh i see, thanks so much for the explanation, im still confused what is the difference between power spectral density (PSD) and FFT spectral analysis in your video ? are they same for some reason ? because i found the difference equation in imabs calculation section in your video compare to this video ( czcams.com/video/UjM2XU_h5Ew/video.html ) which have the equation for PSD is " PSD = abs (FFT)*^2/Ns " ,, im so thankfully for your kind to explain about this prof, thanks

  • @leesweets4110
    @leesweets4110 Před rokem

    Im kind of confused by a practical application that doesnt involve Hz. I have, for example, midday temperature data for every day throughout a 365 day year. My sampling frequency is 1/365, correct? My FFT must be done on a dataset that has a power of 2 samples, so I pick 256. Presumably I can model the entire year with this truncated dataset, though?! Of the coefficients that are generated, the 129th is the last before it repeats in reverse. What frequencies are represented? And how does the sampling theorem limit my results? And why am I getting a coefficient at the 0 Hz value that is orders of magnitude larger than the average of the dataset?

    • @meholden
      @meholden  Před rokem +1

      The 0 Hz coefficient is the constant value (0 Hz signal is DC or constant), and as pinned below, convert the amplitude in the FFT to the amplitude of the sine wave by multiplying by 2/N. If you have a daily sample your sampling frequency is 1 sample per day, or 365 samples per year, or 1/(3600*24) samples per second (Hz). The period is 1/365 years per sample. The sampling theorem says that you must sample at a rate of at least 2x the highest frequency you are interested in results about, so at once a day you could predict weekly things but not daily using an FFT.

    • @leesweets4110
      @leesweets4110 Před rokem

      @@meholden But if Im sampling once a day then my resolution should be half a day, according to what you jsut said. Yes? Twice the highest frequency Im interested in resolving.
      Is N the number of samples put to the FFT, not the overall dataset. Shouldnt the period have something to do with the 2^n subsample, and not the size of the actual dataset?
      I guess my confusion is in the scaling. I dont know what frequencies my coefficients correspond to. And I didnt know how to scale the coefficients down; thanks for that.
      Im using a 256 subsample. This is then 256/365th of a year, and each sample represents 1 day. Do I get a resolution of 2 days in my results or 1/2 day?

    • @meholden
      @meholden  Před rokem

      @@leesweets4110 if you want to know about daily events you need to sample at least 2x a day to avoid aliasing, and for practical purposes it will be better at 20x a day. You can see my other channel's pandemic shutdown lecture videos (sampling theorem: czcams.com/video/hBPFmusk4kk/video.html) and frequency content (czcams.com/video/exikMatsrj4/video.html) or probably a lot of other videos for background info

  • @bodireddigarimythilireddy1459

    Y we are getting -05,-1,-1.5,. In the wave

  • @arya8431
    @arya8431 Před rokem

    hello sir, sorry I'm new in FFT analysis, what is y axis unit? I knew that x axis is Hertz

  • @MrPabloguida
    @MrPabloguida Před 10 měsíci

    You could get the habit to move aside the cursor of the mouse when typing in. Seeing things really help. Good video though.

  • @weiguo5342
    @weiguo5342 Před rokem

    Could you explain why the Amplitude of FFT ist not 1(because cos)?

  • @ronaldungguldonboscopribad5021

    I wanna ask something, if you dont mind, can you help me to analize a sin wave with a distortion, I just confused how to analize, what data I can produce from a sine waveform, this all regarding my thesis for master degree, maybe you can help me pls

    • @meholden
      @meholden  Před rokem

      I don't understand your question, can you be more specific?

    • @ronaldungguldonboscopribad5021
      @ronaldungguldonboscopribad5021 Před rokem

      @@meholden So I have a sin wave voltage and has a distortion because of load changeover from source A to source B, then now I wanna analize this sin wave with fourier tranform.

    • @ronaldungguldonboscopribad5021
      @ronaldungguldonboscopribad5021 Před rokem

      @@meholden I cant understand how to use Fourier Transform just by see a Sinusoidal Waveform. I dont understand how to calculate it.

    • @ronaldungguldonboscopribad5021
      @ronaldungguldonboscopribad5021 Před rokem

      @@meholden If I can, I wanna show my sin wave

    • @meholden
      @meholden  Před rokem

      @@ronaldungguldonboscopribad5021 What information are you looking to find from the FFT analysis? Have you tried the FFT on your data? Did it work? I don't know if you are asking for help doing the transform or analyzing the results or something else entirely.

  • @raulyong3058
    @raulyong3058 Před 3 lety

    Nice video, thanks What happen for example if i have 1000 data, not 1024 for example?

    • @meholden
      @meholden  Před 3 lety +1

      The FFT needs the power of two. Some programs would add 24 zeros to your 1000 data points to make it work, some will switch to the slower DFT algorithm, some will flag the problem and make you fix it. Thanks for watching!

    • @MrSummitville
      @MrSummitville Před 2 lety

      @@meholden Will the fake 24 data points of value "0" significantly affect the FFT results? I may need to test an example

  • @budakgombak8065
    @budakgombak8065 Před 2 lety

    I have done exactly the same as you did. But it appeared there "The number of input must be a power of 2". Please assist. Really appreciate.

    • @meholden
      @meholden  Před 2 lety

      The FFT algorithm (as opposed to the DFT) requires the number of points be 2^n where n is an integer. So 16, 32, 256, etc.

    • @luhputriadnyani2375
      @luhputriadnyani2375 Před 2 lety +1

      @@meholden hi mike. i follow example in video which is 32 number of points but still got same warning with budak

    • @MrSummitville
      @MrSummitville Před 2 lety

      @@luhputriadnyani2375 You did *NOT* select 32 input values

  • @danstraker5066
    @danstraker5066 Před 3 lety

    I had sound pressure (Pa) data sampled at a rate of 2Hz. I followed these steps and got a nice graph of magnitude against Hz. However when trying to convert the y axis magnitude to dB, It would not work correctly. I tried multiple equations into he magnitude to try make the correct graphs. Using slight variations of 20log10(magnitude). However my graphs would always give negative values. When I used the ABS function to give the the values in positive, the graph became basically unreadable. Any help would be greatly appreciated

    • @danstraker5066
      @danstraker5066 Před 3 lety

      *2kHz

    • @meholden
      @meholden  Před 3 lety

      If your magnitudes are between 0 and 1 then they would convert to negative dB, so maybe you're doing it correctly? I don't know much about how sound converts to dB as a loudness measurement, but in filters etc. negative dB just means attenuation rather than amplification.

    • @jonashellsborn7648
      @jonashellsborn7648 Před 2 lety

      Magnitude is not in the unit you measure. In silence 0Hz dominates and silence would have lots of decibels or Pa. I think you divide Magnitude by N to get Pa. But would you really calculate the decibel per individual frequency? You often, at least at low frequencies, do bandpass filtering, and calculate Equivalent value for each say octave. Sum all the pascals during a 30s period, divide by 15 (30s/2Hz) , and that mean value in Pa is to be made into the Equivalent dB value, using formulas you find on the net (20*log10(Pa) ).

  • @LittleGnawer
    @LittleGnawer Před 2 lety

    Result was a surprise. A simple, undamped cosine should produce a single peak at 1 Hz and zero at all other frequencies. Simplest sanity check fails.

    • @meholden
      @meholden  Před 2 lety +1

      This is a discrete calculation. There is no data calculated for 1 Hz so the peak must be spread into the closest points in the transformation (0.9375 Hz gets the most amplitude, which does pass the sanity check I believe). Thanks for watching and feel free to follow up if you have questions

  • @mmoore9954
    @mmoore9954 Před 5 měsíci

    5:30

  • @Ruhgtfo
    @Ruhgtfo Před 3 lety

    5:15 xD

  • @franciscomiranda3239
    @franciscomiranda3239 Před 3 lety

    Source excel data??

    • @meholden
      @meholden  Před 3 lety

      If you follow the video you can create it yourself, the video starts with a blank file. I don't have the source anymore sorry!

  • @LL-ue3ek
    @LL-ue3ek Před rokem

    couldn't stand it when your cursor is always in the way! blocking the view of what's being done, it's frustrating when struggling to see what's behind the cursor! good video but please pay attention to that in your next video.