0
$\begingroup$

I'm trying to match the amplitudes of a signal before performing DFT and after. So, let's consider a 64-point sine signal with amplitude of $1$:

enter image description here

The DFT of such a signal will give us the amplitude (corresponding to the original signal frequency) equal to $32$, which comes from the DFT formula:

$$X[k]=\sum_{n=0}^{N-1} x[n] \Big(\cos\left(\tfrac{2\pi k}{N}n\right)-j\sin\left(\tfrac{2\pi k}{N}n\right) \Big)$$

Since the signal is a sine, the cosine part under the DFT can be omitted (because multiplication of sine and cosine with the same argument is always zero). Therefore, the DFT (at signal frequency) of the signal can be calculated as the sum of all the points of the original signal multiplied by the basis sine function with the same frequency (supposing that the frequency of the original signal matches with the DFT basis function), which is:

enter image description here

Finally, the numerical result of DFT for our signal (at its frequency) is the result of multiplication of the mean value of the original signal multiplied by the basis function (here it is $0.5$, see Figure above, which is EXACTLY HALF the amplitude of our original signal) and the number of points in the signal ($64$): $$0.5\cdot64=32$$

To unambiguously match this amplitude after DFT and before (which is the original signal), we need to divide the result amplitude by the number of points in the original signal and by a factor of $2$ (because exactly half the amplitude of the original signal was gradually incremented by the number of points in the original signal).

Is it just pure math and nothing else? In some books I saw the explanation with the bandwidth, but it wasn't clear and straightforward for me.

$\endgroup$
4
  • $\begingroup$ I'm not sure what you're asking... is it pure math? hmmm... sure? and nothing else? hmmm... like what? your statement is correct that if you want to get back the amplitude you scale by the number of FFT points $N$ since the DFT formula sums over $N$... I don't see anything else in your question... $\endgroup$
    – Jdip
    Aug 17, 2022 at 14:44
  • $\begingroup$ @Jdip, here I found explanation with bandwidth and in my question I'd like to know, is it just scaling factor or there is something underlying explanation, that's why I'm asking about it $\endgroup$
    – Curious
    Aug 17, 2022 at 15:01
  • 1
    $\begingroup$ Like @Marcus Muller said in his answer, I don't think bandwidth has anything to do with a simple scaling factor... I think in this case you're trying to find a difficult explanation for something quite simple ;) $\endgroup$
    – Jdip
    Aug 17, 2022 at 15:26
  • $\begingroup$ @Jdip, unfortunately, I often do so(( anyway, thank you for your answers!) $\endgroup$
    – Curious
    Aug 17, 2022 at 15:30

1 Answer 1

1
$\begingroup$

how would scaling in any way affect bandwidth? It's just a constant factor, and the DFT is a linear operation. I think this answers the question.

Not what I'd call "pure math", but to be certain, nothing but a factor to be chosen to serve a goal like energy conservation or ease of computation.

$\endgroup$
4
  • $\begingroup$ here it is explained by introducing bandwidth between bins. $\endgroup$
    – Curious
    Aug 17, 2022 at 14:34
  • $\begingroup$ don't see how this relates? They do mention bandwidth, but it's only to motivate keeping the energy per unit bandwidth constant. See my first sentence. $\endgroup$ Aug 17, 2022 at 14:39
  • $\begingroup$ it intuitively looks more or less clear (taking N/2 samples and "distributing" them uniformly), but without math it looks incomplete for me. $\endgroup$
    – Curious
    Aug 17, 2022 at 14:59
  • 2
    $\begingroup$ again, bandwidth has nothing to do with scaling – a signal multiplied with a factor still has the same bandwidth. Here's really where this consideration ends. $\endgroup$ Aug 17, 2022 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.