Scaling the output of Discrete Fourier Transform

Click For Summary
SUMMARY

The discussion focuses on scaling the output of the Discrete Fourier Transform (DFT) to accurately represent frequencies corresponding to the output values. The user employs Mathematica for DFT on 100 evenly spaced samples of Sin[x] over the interval [0, 3π]. It is established that the spacing of the DFT bins in frequency is determined by the formula fs / N, where fs is the sampling frequency and N is the DFT size. The user seeks clarity on how to plot DFT values such that peaks correspond to the correct resonant frequencies in the original signal.

PREREQUISITES
  • Understanding of Discrete Fourier Transform (DFT)
  • Familiarity with sampling theory and Nyquist theorem
  • Knowledge of Mathematica for performing DFT
  • Basic concepts of Riemann summation
NEXT STEPS
  • Learn how to calculate the sampling frequency (fs) for your data set
  • Explore the relationship between DFT output and frequency bins
  • Study the implementation of Riemann summation in Fourier analysis
  • Investigate methods for visualizing DFT results in Mathematica
USEFUL FOR

Researchers, data analysts, and engineers working with signal processing and Fourier analysis, particularly those using Mathematica for DFT computations.

wil3
Messages
177
Reaction score
1
I have a feeling this question has a very simple answer, yet I cannot find it anywhere online.

Let's say that I have a data set that represents and evenly-spaced sample of a function, taken uniformly over the interval (a,b) \qquad a,b \in \mathbb{Z}

I perform a discrete Fourier transform to map this function within the frequency domain. In the computer program I am using, I get a list of values, but not the frequencies at which they occur. What is the appropriate interval to scale these values over, such that the position along the horizontal axis will give me the correct frequency of the mode. I would like to be able to read off resonant modes from peaks on the graph.

For example, let's say I use Mathematica to do a DFT on 100 evenly spaced samples of Sin[x] over the range [0, 3\pi]. My output will be just a list of values, but I will not know where those values out to occur (ie, I need to know how the bounds of the domain of the input function transform)

Thanks for any help.
 
Last edited:
Physics news on Phys.org
first of all, think of the DFT as a mapping of one discrete and periodic function (so it is fully described by N numbers, if N is the period) in the "time" domain to another periodic and discrete function (that also has period N, so it is fully described by N numbers) in the "frequency" domain.

so, when you use the DFT to perform a Fourier Transform analysis, you are doing two approximations. first you are limiting the support for your input function to a finite time (or distance/space or whatever is the independent variable). then you are sampling. if you do this with the Fourier integral, first set the integral limits to finite values (but large enough to include the whole input function, or enough of it), then sample it which is like using a Riemann summation to represent your integral. then you will see the scaling constants come out when you see that the Riemann sum is the same as your DFT sum, but for those scaling constants.

anyway, if your sampling frequency is fs and the DFT size is N, then the spacing, in frequency, of the DFT bins is fs / N. doing this Riemann summation thing will show that.
 
Thank you very much for your reply. I understand that the DFT is a discrete approximation, but I do not understand what the "bins" represent. For example, if I transform a sine wave sampled 100 times over the interval [0,5], I will get a list of values. What is the correct domain that these values occur over?

I'll reiterate: I'd like to be able to plot my output DFT values in such a way that if I see a peak, and then look at the explanatory axis, I will see the resonant mode (a frequency) at which said peak occurs in the original signal. The program I use gives me the values(responses) of the DFT, but not the locations at which they occur. So if I see a peak in the output, I'll go "hey cool, there' a peak at 40, so there's clearly a 40 hz sinusoid in the signal"

I'll try to do the Reimann sum out and see if I understand it better.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 8 ·
Replies
8
Views
3K