Already a qualifying Patreon member? Refresh to access this content.
7 thoughts on “What is The Discrete Fourier Transform (DFT)?”
Your presentation is just like all the others. It, in my opinion, is all wrong. It is based on sampling with impulse functions. All the math comes out squeaky clean and leaves the reader with a false feeling of knowing what is going on. The Big problem is no one EVER shows the relationship between sampling with in impulse function and sampling in the real world with analog to digital converters. All this “perfect” math falls apart and the the equations you illustrate and the real world are completely different.
While you are of course correct that there is no such thing as a perfect impulse function in the real world and that A2Ds can’t sample with such a function, I disagree with your claim that “ALL this perfect maths falls apart.” That would suggest the whole theory is a waste of time, which is most definitely not the case. Yes, it is an approximation, but one that is quite adequate in a vast number of everyday applications.
Whenever we move from the “squeaky clean” world of theoretical mathematics into the far noisier and imperfect world in which we all live, we are always forced to make approximations.
An impulse function cannot be generated exactly in the real world (there will always be a rise and fall time), however, it can be approximated.
You have to make sure, that you are sampling the signal often enough and that your A2D converter’s acquisition time is much much shorter than the rate at which the signal itself is changing.
Yes, for certain applications, you have to take into consideration all sorts of imperfections of the sampling process and in such applications you may need to modify the theory. Such cases are beyond the scope of this article.
I, for one, as an electronics engineer for the last 20 years, have successfully used the equations described in the post in plenty of real-world practical situations (sound-related applications and impedance sensing applications to name but two) where the theory described in the post most definitely holds.
Having said that, you may need to window the signal before performing the DFT as I describe in the next post in the series.
What I am trying to do in the blog and in the course is to introduce people who have never understood how Fourier works to the concepts of the transform and show how they can be applied in some everyday applications. This is who the course is aimed at.
I leave the more advanced explanations to those who are more qualified than I to discuss them, and whose target audience requires a more in-depth explanation.
Hi,
I want to send my kind appreciates for your these terrific studies to you.
They are incredibly useful and also clean and clear.
I just want to ask a question.
I am studying Earthquake Engineering.
For example, I have a earthquake data and it contains 3988 number of values. It means that length of earhtquake is 39.88 seconds and this data was sampled each 0.01seconds (3988*0.01=39.88sn)
If ı want to apply discrete fourier transform to obtain frequency content of this data, how many sample ı have to use ?
I have 3988 values so can ı use N=3988 datas ?
If I use 2048 samples, how can ı catch whole values in data because ı have 3988 sample in time-history? Some datas in earthquake will be missed ?
Thank you very much for your contribution to engineering
To answer your question, you could apply the DFT to all 3988 samples in your signal. Notice that I say you can use the DFT. If you wanted to use the FFT, you would indeed need to break the signal up into 2 or more blocks. Each block would require N to be a power of two for the FFT to work. In such a case, you would need to add a number of zero value samples to the end of your signal to ensure that N in the final block is still a power of 2. You would also need to use a window function before breaking it into blocks. See my next post in this series for an explanation of window functions.
I would suggest, that if your whole data set is only 3988 samples long, you use the DFT as today’s computers are perfectly capable performing even a DFT in a reasonable time on such a dataset. Also Window functions have to distort the signal slightly to work which affects the result you get in the frequency-domain.
Dear Mark,
Thank you for your reply.
Thanks to you, that point on Fourier Transforms are done for me.
If you prepare for signals and filtering system, me and all engineers will be happy.
Best regards
Dear Mark,
Thanks for the beautiful explanation.
I couldn’t understand the expression between N,n, and R; same way i couldn’t understand expression between N,k,R; can you explain with some numerical example? like if i have sampling rate as 100 (i.e R), and if I have total samples of 500 (i.e N), and if I want to know to the actual time for my last point . ie 500th point (i.e n=500), if i plug in expression for actual time t=n*R/N; I am getting time as 100, it should be 5 sec no?
You’re most welcome, and thanks for bringing my attention to an error in my post. The frequency expression is correct, but there was an error in the time expression.
The time expression should read t=n/R which, in your example, would indeed give 500/100 = 5s. I have now corrected the expression in the post. Thanks.
Regarding the frequency expression, again, going by your example, the 500th frequency tested by the DFT at a sampling rate of 100Hz has to be 100Hz, as the DFT cannot measure frequencies higher than the sampling rate. So that expression is correct.
Hope this helps and thanks once again for helping to improve the post.
Would you like to learn about how the Fourier Series became the Fourier Transform, how the DFT and FFT work and what Windowing is? Please help me to devote more time to filming the rest of the video course by supporting me on Patreon.
Receive updates on the continuing production of the course, get notified when there is a new post or video and be the first to know when the full course goes live.
Your presentation is just like all the others. It, in my opinion, is all wrong. It is based on sampling with impulse functions. All the math comes out squeaky clean and leaves the reader with a false feeling of knowing what is going on. The Big problem is no one EVER shows the relationship between sampling with in impulse function and sampling in the real world with analog to digital converters. All this “perfect” math falls apart and the the equations you illustrate and the real world are completely different.
While you are of course correct that there is no such thing as a perfect impulse function in the real world and that A2Ds can’t sample with such a function, I disagree with your claim that “ALL this perfect maths falls apart.” That would suggest the whole theory is a waste of time, which is most definitely not the case. Yes, it is an approximation, but one that is quite adequate in a vast number of everyday applications.
Whenever we move from the “squeaky clean” world of theoretical mathematics into the far noisier and imperfect world in which we all live, we are always forced to make approximations.
An impulse function cannot be generated exactly in the real world (there will always be a rise and fall time), however, it can be approximated.
You have to make sure, that you are sampling the signal often enough and that your A2D converter’s acquisition time is much much shorter than the rate at which the signal itself is changing.
Yes, for certain applications, you have to take into consideration all sorts of imperfections of the sampling process and in such applications you may need to modify the theory. Such cases are beyond the scope of this article.
I, for one, as an electronics engineer for the last 20 years, have successfully used the equations described in the post in plenty of real-world practical situations (sound-related applications and impedance sensing applications to name but two) where the theory described in the post most definitely holds.
Having said that, you may need to window the signal before performing the DFT as I describe in the next post in the series.
What I am trying to do in the blog and in the course is to introduce people who have never understood how Fourier works to the concepts of the transform and show how they can be applied in some everyday applications. This is who the course is aimed at.
I leave the more advanced explanations to those who are more qualified than I to discuss them, and whose target audience requires a more in-depth explanation.
Hi,
I want to send my kind appreciates for your these terrific studies to you.
They are incredibly useful and also clean and clear.
I just want to ask a question.
I am studying Earthquake Engineering.
For example, I have a earthquake data and it contains 3988 number of values. It means that length of earhtquake is 39.88 seconds and this data was sampled each 0.01seconds (3988*0.01=39.88sn)
If ı want to apply discrete fourier transform to obtain frequency content of this data, how many sample ı have to use ?
I have 3988 values so can ı use N=3988 datas ?
If I use 2048 samples, how can ı catch whole values in data because ı have 3988 sample in time-history? Some datas in earthquake will be missed ?
Thank you very much for your contribution to engineering
Thank you for your kind words.
To answer your question, you could apply the DFT to all 3988 samples in your signal. Notice that I say you can use the DFT. If you wanted to use the FFT, you would indeed need to break the signal up into 2 or more blocks. Each block would require N to be a power of two for the FFT to work. In such a case, you would need to add a number of zero value samples to the end of your signal to ensure that N in the final block is still a power of 2. You would also need to use a window function before breaking it into blocks. See my next post in this series for an explanation of window functions.
I would suggest, that if your whole data set is only 3988 samples long, you use the DFT as today’s computers are perfectly capable performing even a DFT in a reasonable time on such a dataset. Also Window functions have to distort the signal slightly to work which affects the result you get in the frequency-domain.
Dear Mark,
Thank you for your reply.
Thanks to you, that point on Fourier Transforms are done for me.
If you prepare for signals and filtering system, me and all engineers will be happy.
Best regards
Dear Mark,
Thanks for the beautiful explanation.
I couldn’t understand the expression between N,n, and R; same way i couldn’t understand expression between N,k,R; can you explain with some numerical example? like if i have sampling rate as 100 (i.e R), and if I have total samples of 500 (i.e N), and if I want to know to the actual time for my last point . ie 500th point (i.e n=500), if i plug in expression for actual time t=n*R/N; I am getting time as 100, it should be 5 sec no?
You’re most welcome, and thanks for bringing my attention to an error in my post. The frequency expression is correct, but there was an error in the time expression.
The time expression should read t=n/R which, in your example, would indeed give 500/100 = 5s. I have now corrected the expression in the post. Thanks.
Regarding the frequency expression, again, going by your example, the 500th frequency tested by the DFT at a sampling rate of 100Hz has to be 100Hz, as the DFT cannot measure frequencies higher than the sampling rate. So that expression is correct.
Hope this helps and thanks once again for helping to improve the post.