OK, yes, I think this is a bug. In https://github.com/gnuradio/gnuradio/blob/master/gr-qtgui/lib/freq_sink_c_impl.cc#L553 The data is converted using the fft() function and averaged after that. But the fft() function already converts the transformed data into the logarithmic scale in https://github.com/gnuradio/gnuradio/blob/master/gr-qtgui/lib/freq_sink_c_impl.cc#L359 Averaging after the conversion to dB will yield wrong values, as log(a+b) != log(a) + log(b).
Fabian Am 30.06.21 um 15:29 schrieb Ali G. Dezfuli: > > > ---------- Forwarded message --------- > From: *Ali G. Dezfuli* <[email protected] <mailto:[email protected]>> > Date: Wed, Jun 30, 2021 at 4:56 PM > Subject: Re: spectrum analyzer problem > To: Fabian Schwartau <[email protected] <mailto:[email protected]>> > > > thanks a lot, Fabian, > > I asked about the mapper itself and not pulse shaping (RRC). After some > tests, I finally get to the problem of the spectrum analyzer (QT GUI > Freq. Sink). > I attached the grc photo to make my problem clearer. > About the version, I really really like to be up-to-date but that's the > matter of the OOT delay to move to the latest versions of GR and I > really need them as well.😀 > > On Wed, Jun 30, 2021 at 2:29 PM Fabian Schwartau <[email protected] > <mailto:[email protected]>> wrote: > > Hi Ali, > you should provide an example flow graph. > And I think I heard several times on this list, that you should not use > version 3.7 any more, as it is fairly old and not maintained any more. > Nevertheless, I hacked together a small flowgraph, where I cannot > reproduce your problem. I generate a QPSK constellation, the output RMS > value is 1 (which makes the peak values slightly larger than 1!) and the > 1000 point FFT with a rectangular window shows -30 dB. When you generate > a constellation with 2 samples per symbol and make the symbol values to > have a value of 1, you will probably get 3 dB less than expected, as the > intermediate samples have less power than 1. > Attached is the flowgraph and the results. > > Best regards, > Fabian > > Am 30.06.21 um 11:19 schrieb Ali G. Dezfuli: > > Hi all, > > > > I wonder if this is a bug or what: > > I just make a QPSK constellation on the unit circle with quite random > > data and > > look at the spectrum by "QT GUI Frequency Sink" block in GRC. > > With these parameters: > >    FFT size = 1000 > >    Window type = None OR Rectangular > > I should see a flat line as the spectrum with -30 dB (= -30 dBW) but > > surprisingly it > > shows -33 dB !!! > > I use GNU Radio Companion 3.7.13.4 and ubuntu 16.04. > > Would be grateful if you could help me in this matter. > > > > regards, > > Ali >
