# FFT plot in GNU Radio

i got similar question as in FFT scaling in GNU Radio and quite not clear about the answer given so far. I understood that the FFT plot is a relative value in which we have to use measurement instrument to get the actual value.

But, without the measurement instrument, in general, what value will be shown on the plot if the given input is for example complex cosine waveform with amplitude 1?

I've tried the following flowgraph: signal_source - throttle - qt_frequency_sink

and vary the cosine waveform amplitude from 0 to 100. other than amplitude, all blocks use default setting. I expect to get 0dB when the amplitude is 1, but the plot shows ~ -10dB instead,and ~32dB when amplitude is 100 (i'm not sure if this value make sense). SO, how actually the frequency sink calculates these value?

\begin{align} Y[f] &= \sum_{k=0}^{N_{DFT}-1} y[k] e^{j2\pi f \frac kN},\\ \text{for }f&=0\text{, it follows that } e^{j2\pi 0 \frac kN}\equiv 1,\text{ so}\\ Y[0] &= \sum_{k=0}^{N_{DFT}-1} y[k] &y\text{ being constant}\\ &= N_{DFT}\cdot y[0] \end{align}
Because it's handy for visualization, GR's approach to scaling of these values is to divide them by the DFT length $N_{DFT}$; otherwise, the same constant signal would have more power in a longer DFT.