On Thu, Aug 28, 2014 at 10:46 AM, Jared Dulmage <[email protected]>
wrote:

> Tom,
>
> I just have a BPSK sim: random source -> map +/-1 -> char2float -> complex
> -> add <- noise source
>
> I mag^2 probe the inputs to the adder and SNR probe the output.
> Everything is complex.  The mag^2 blocks give me exactly what I expect from
> the char2float scale and the noise source variance.  The SNR probe is off
> by 3 dB for any set of input powers.  For example, if I set the noise power
> to 0 dB and the signal to 6 dB I get 9 dB SNR.   3 dB noise, 10 dB signal I
> get 10 dB SNR.  This seems consistent with the extra 2 x factor in the
> code.  Here's the expression from Pauluzzi/Beaulieu
>
> p = sqrt(2 * M2^2 - M4) / (M2 - sqrt(2 * M2^2 - M4))
>
> M2 = 2nd moment of input
> M4 = 4th moment of input
> p = Es/No estimate for complex signals
>
> Not sure how I'm getting it wrong, if I am.  I have gnuradio v3.7.4.
> Perhaps this was corrected in a more recent version?  Could you share your
> flowgraph so I could compare with mine?
>
> Thanks,
> Jared.
>


Ah, I've found the mistake in my tests. I was averaging the signals at the
wrong place. Threw together the flowgraph too quickly this morning.
(There's actually a funny story here, but I don't want to embarrass the
person; so I'll take on the embarrassment myself for not double checking
things myself.)

This identified that I was making similar mistakes with the other
estimators -- I would have forced them all to the same results and must
have based it on a bogus starting target. I'll check in corrections soon,
tomorrow hopefully. The skewness estimator is giving me trouble for
non-binary psk signals, though.

Tom





> [email protected] wrote: -----
> To: Jared Dulmage <[email protected]>
> From: Tom Rondeau
> Sent by: [email protected]
> Date: 08/28/2014 08:52AM
> Cc: GNURadio Discussion List <[email protected]>
> Subject: Re: [Discuss-gnuradio] m2m4 SNR estimator off by 3 dB
>
>
> On Thu, Aug 28, 2014 at 7:04 AM, Tom Rondeau <[email protected]> wrote:
>
>> On Wed, Aug 27, 2014 at 9:33 AM, Jared Dulmage <[email protected]>
>> wrote:
>>
>>> It appears that the MPSK m2m4 SNR estimator has an extra factor of 2.
>>>
>>> gnuradio/gr-digital/mpsk_snr_est.cc:169:175
>>> double
>>>     mpsk_snr_est_m2m4::snr()
>>>     {
>>>       double y1_2 = d_y1*d_y1;
>>>       return 10.0*log10(2.0*sqrt(2*y1_2 - d_y2) /
>>>             (d_y1 - sqrt(2*y1_2 - d_y2)));
>>>     }
>>>
>>> where d_y1 and d_y2 are the running 2nd and 4th moments of the input,
>>> respectively.
>>>
>>> The 2.0* is not present in the estimate expression from the reference
>>> (Pauluzzi and Beaulieu eq. 39).
>>>
>>> The 3 dB offset can also be seen by generating a signal (say random
>>> BPSK) with AWGN, measuring the signal and noise powers separately while
>>> estimating the SNR via the m2m4 on the sum.
>>>
>>> It's an easy fix, I just wanted to get verification and notify other
>>> users.
>>>
>>> Thanks,
>>> Jared.
>>>
>>
>> Hi Jared,
>>
>> I'd have to review the paper again, but I suspect you're right. I was
>> using this estimator just the other day and scratching my head about the
>> results. I was on a plane, though, and was really focused on something else.
>>
>> Thanks!
>>
>> Tom
>>
>
> Just tested this and it looks fine the way it is. Are you doing real or
> complex signals? The estimators are designed to work with complex numbers,
> so that might be the difference you're seeing. I just have a simple
> simulation that I can switch between BPSK and QPSK (both complex signals,
> though). I use the MPSK measurement block and calculate the power of the
> signal and noise separately and output that to a number sink. With the
> current method, I see the same SNRs on both paths.
>
> There is also the gr-digital/examples/snr_estimators.py example you can
> explore to compare them.
>
> Tom
>
>
>
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to