Тёмный

FFT in excel for spectral analysis 

Mike Holden
Подписаться 903
Просмотров 127 тыс.
50% 1

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.

Опубликовано:

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 121   
@ayugmaacharya95
@ayugmaacharya95 4 года назад
How would I get the amplitude of the dominant frequencies using Excel?
@meholden
@meholden 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.
@ayugmaacharya4487
@ayugmaacharya4487 3 года назад
Thank you!
@lcfrod
@lcfrod 3 года назад
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. 3 года назад
I’ve been banging my head against a wall looking for an explanation like this. Thank you, sooo much!
@HyperspacePirate
@HyperspacePirate 3 года назад
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
@denebvegaaltair1146
@denebvegaaltair1146 2 года назад
I see that 99% of your viewers were helped by this under such pressuring homework circumstances that they forgot to leave a like.
@_ryu__jin_
@_ryu__jin_ 3 года назад
thanks a lot, this gave me a hand with my assignment. you're such a good explainer!
@juanjoseguevaraortiz8384
@juanjoseguevaraortiz8384 2 года назад
this was a wonderful video, very streamlined and to the point. Thank you :D
@PATRIK67KALLBACK
@PATRIK67KALLBACK 3 года назад
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.
@yutingzhang3093
@yutingzhang3093 4 года назад
Thank you! The explanation is very clear and this is really helpful
@joaopaulodias1537
@joaopaulodias1537 3 года назад
excellent video! congratulations on didactics. thank you for the explanation, it helped a lot.
@anaslahrichi
@anaslahrichi Год назад
Thank you sir ! This was extremely helpful for my Phd research.
@luhputriadnyani2375
@luhputriadnyani2375 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 2 года назад
Follow the directions given in your warning message.
@GuillaumeRambaud
@GuillaumeRambaud 6 месяцев назад
I love you ! your VOD just save my life !!! THX THX THX
@alit8528
@alit8528 3 года назад
Finally, I could understand this...thanks a lot
@deakzoltan2714
@deakzoltan2714 2 года назад
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.
@edwardmallon4646
@edwardmallon4646 3 года назад
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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-0VzX-3erjPI.html
@mefirst5427
@mefirst5427 3 года назад
I don't need to do this at work or as hobby, but I still watched and tried it on my own, LOL
@kaluvanhariharan4256
@kaluvanhariharan4256 2 года назад
Excellent and clever idea to use Excel...
@lishangkuan7620
@lishangkuan7620 Год назад
Wonderful lecture, thank you so much!!!
@Elroe2012
@Elroe2012 2 года назад
Thanks a lot. I get your video interesting and important.
@honeybadgerphysics1408
@honeybadgerphysics1408 3 года назад
thanks, this helped me work on the program in scilab
@hoaxuan7074
@hoaxuan7074 3 года назад
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.
@darwintolentino3425
@darwintolentino3425 3 года назад
oh i see that this is same to the question in one of the comments. saw the answer. thanks!
@alokverma9410
@alokverma9410 3 года назад
superb explanation
@kaantuncyildiz2937
@kaantuncyildiz2937 2 года назад
thank you very much, very much appreciated work
@petzhang3019
@petzhang3019 Год назад
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)?
@huseyinsimsek5818
@huseyinsimsek5818 3 года назад
Harika anlatım çok teşekkür ederim. (Thank you, sooo much)
@mariarrtaus1864
@mariarrtaus1864 3 года назад
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.
@MrPabloguida
@MrPabloguida Год назад
You could get the habit to move aside the cursor of the mouse when typing in. Seeing things really help. Good video though.
@dominicafonso
@dominicafonso 2 года назад
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).
@arya8431
@arya8431 Год назад
hello sir, sorry I'm new in FFT analysis, what is y axis unit? I knew that x axis is Hertz
@joshcannon6704
@joshcannon6704 3 месяца назад
Great video
@E4E
@E4E 2 года назад
This is great, thanks.
@fdecesaro
@fdecesaro 14 дней назад
Professor Holden, I just viewed FFT in Excel for spectral analysis and really enjoyed it. I'm hoping you'll be able to help me with one problem. I use it on an Excel file with a 60 Hz wave with a significant 5th harmonic. The data was sampled at 100 kHz. One cycle of 60 Hz was displayed. I want to perform an FFT, but of course, there are 1,064 rows of data. The time domain plot shows a 1.2 A peak and a -1.2 A peak. The frequency domain plot shows a peak of 465 at 0 and 135 at 293 Hz. I have to be doing something incorrect. The sampling rate is more than needed for looking at 300 Hz. There should be no aliasing. Is there some guidance you can provide me?
@meholden
@meholden 14 дней назад
A large value at 0 Hz is probably a DC bias, where your average value in the time domain is not zero. Does your signal have that? I think of 0 Hz as a constant in the fourier series
@hasiokowe
@hasiokowe 6 месяцев назад
Works great. Thanks
@darwintolentino3425
@darwintolentino3425 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 2 года назад
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.
@nnb3111
@nnb3111 Год назад
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 Год назад
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.
@xs6819
@xs6819 2 года назад
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 2 года назад
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 Год назад
I tried the number of data 32 but still can not
@reapingshadow2866
@reapingshadow2866 2 года назад
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.
@KATARILOKESHBME
@KATARILOKESHBME 3 года назад
Hi Thanks for explanation How to get phase vs frequency plot??
@zaidhadi854
@zaidhadi854 3 года назад
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 3 года назад
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).
@sx1354
@sx1354 3 года назад
Could you explain why the amplitude of the waveform is 1 but the magnitude of 1Hz FFT is 15?
@meholden
@meholden 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.
@sx1354
@sx1354 3 года назад
@@meholden Many thanks! It is very helpful.
@kairostimeYT
@kairostimeYT 3 года назад
@@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)
@LittleGnawer
@LittleGnawer 2 года назад
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 2 года назад
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
@张毅搏
@张毅搏 11 месяцев назад
Is the frequency for FFT's or function's?
@tsikan8h
@tsikan8h 3 года назад
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 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.
@amr.a-m8350
@amr.a-m8350 3 года назад
Thank you. I hope to take these data and implying on Matlab, please
@didierleprince6106
@didierleprince6106 2 года назад
A huge Merci (:
@rafaelbenitez7662
@rafaelbenitez7662 3 года назад
Dios lo bendiga amigo, gracias por este video
@professorholden3104
@professorholden3104 3 года назад
de nada!
@thaliaximenes5850
@thaliaximenes5850 3 года назад
Thank you Mike
@yibzo
@yibzo Год назад
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 Год назад
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
@PokiEdu
@PokiEdu 2 года назад
what is the unit of FFT magnitude (mG) which is calculated in your video ?
@meholden
@meholden 2 года назад
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 2 года назад
@@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 2 года назад
@@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 2 года назад
@@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 ( ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-UjM2XU_h5Ew.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 Год назад
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 Год назад
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 Год назад
@@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 Год назад
@@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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-hBPFmusk4kk.html) and frequency content (ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-exikMatsrj4.html) or probably a lot of other videos for background info
@ornorrason8152
@ornorrason8152 3 года назад
very clear thank you
@chumani1861
@chumani1861 2 года назад
How can I get a natural frequency from the FFT graph?
@A164-z5j
@A164-z5j 2 года назад
Awesome!
@Tonewheelsmile
@Tonewheelsmile 3 года назад
Great!!! Thanks a lot!
@ChristianNeff
@ChristianNeff 4 года назад
Dr. Holden! Hope you're doing well! 😁
@meholden
@meholden 4 года назад
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 ru-vid.com/show-UCbG1D1rUPGunA8YSFuOFcVg ) in case you want to relive Instrumentation and Measurement systems haha.
@bodireddigarimythilireddy1459
@bodireddigarimythilireddy1459 3 года назад
Y we are getting -05,-1,-1.5,. In the wave
@drury2d8
@drury2d8 3 года назад
Prof, how can I get a power spectral density plot for this function?
@semihkalma
@semihkalma 3 года назад
thank you sir!!
@hakikihamidi6529
@hakikihamidi6529 3 года назад
how the scatter graph looks same like your
@neilbohar8212
@neilbohar8212 3 года назад
can u do inverse fft of some frequency response
@Elroe2012
@Elroe2012 2 года назад
Thanks a lot
@raulyong3058
@raulyong3058 3 года назад
Nice video, thanks What happen for example if i have 1000 data, not 1024 for example?
@meholden
@meholden 3 года назад
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 2 года назад
@@meholden Will the fake 24 data points of value "0" significantly affect the FFT results? I may need to test an example
@budakgombak8065
@budakgombak8065 2 года назад
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 2 года назад
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 2 года назад
@@meholden hi mike. i follow example in video which is 32 number of points but still got same warning with budak
@MrSummitville
@MrSummitville 2 года назад
@@luhputriadnyani2375 You did *NOT* select 32 input values
@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 Год назад
I don't understand your question, can you be more specific?
@ronaldungguldonboscopribad5021
@@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
@@meholden I cant understand how to use Fourier Transform just by see a Sinusoidal Waveform. I dont understand how to calculate it.
@ronaldungguldonboscopribad5021
@@meholden If I can, I wanna show my sin wave
@meholden
@meholden Год назад
@@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.
@fenrizlokeson3844
@fenrizlokeson3844 2 года назад
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 2 года назад
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 2 года назад
@@meholden Thank you very much for your prompt reply. I will check my calculations again. 👍
@sayeman9577
@sayeman9577 Год назад
Thanks!
@Morimea
@Morimea 3 года назад
thank you
@jonathanward7216
@jonathanward7216 3 года назад
At 7:00, how did you dual select two columns of data?
@meholden
@meholden 3 года назад
Select the first column, then hold down control and select the second.
@danstraker5066
@danstraker5066 3 года назад
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 3 года назад
*2kHz
@meholden
@meholden 3 года назад
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 2 года назад
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) ).
@mmoore9954
@mmoore9954 8 месяцев назад
5:30
@franciscomiranda3239
@franciscomiranda3239 3 года назад
Source excel data??
@meholden
@meholden 3 года назад
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!
@Ruhgtfo
@Ruhgtfo 3 года назад
5:15 xD
@LL-ue3ek
@LL-ue3ek Год назад
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.
@weiguo5342
@weiguo5342 2 года назад
Could you explain why the Amplitude of FFT ist not 1(because cos)?
@meholden
@meholden 2 года назад
See the pinned comment
@joshuam8863
@joshuam8863 4 года назад
thank you kindly
Далее
НЕ БУДИТЕ КОТЯТ#cat
00:21
Просмотров 638 тыс.
HA-HA-HA-HA 👫 #countryhumans
00:15
Просмотров 3,5 млн
Matlab - Power Spectral Analysis
8:03
Просмотров 29 тыс.
The Discrete Fourier Transform (DFT)
17:36
Просмотров 344 тыс.
Excel FFT
8:25
Просмотров 28 тыс.
The Fast Fourier Transform (FFT)
8:46
Просмотров 351 тыс.
FFT basic concepts
7:27
Просмотров 354 тыс.
НЕ БУДИТЕ КОТЯТ#cat
00:21
Просмотров 638 тыс.