# 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?

Realize that the frequency sink simply does a forward FFT and windowing, if you don't set the window to rectangular; the window you're using has a response of ca -9.8dB at DC, so that's what you're seeing here. Use "FFT Window" none, and you'll see your perfect 0dB for a constant 1 input, and 40dB for a constant 100 input.
\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.