Saturday, November 30, 2013

Re: [Discuss-gnuradio] quadrature_demod losing weak signals

On Sat, Nov 30, 2013 at 10:55 AM, Kevin Reid <kpreid@switchb.org> wrote:
> On Nov 30, 2013, at 2:09, Alexandru Csete <oz9aec@gmail.com> wrote:
>> On Sat, Nov 30, 2013 at 2:50 AM, Kevin Reid <kpreid@switchb.org> wrote:
>>>
>>> If the amplitude of the input to quadrature_demod_cf is less than about 10^(-2.23), then the output samples are zero instead of the demodulated signal.
>>
>> I tried your grc file and the scope sink shows a perfect sinewave
>> here.
>
> Just checking, since I didn't mention it before: the default value of the slider is the level well above where it fails. Does it fail for you if you turn it down?

Yes, same behavior if I turn it down; not unexpected giving what you
found below.

>> So maybe it is a voilk issue or the gr::fast_atan2f on your
>> parchitecture. Mine was using avx_64_mmx_orc
>
> Thank you, I should have mentioned my volk configuration. fast_atan2f doesn't appear to have any volk dependency...
>
> ...but I think I've spotted the problem. In fast_atan2f, we have this recently-introduced (Nov 6) code, where the epsilon used to be a comparison with zero:
>
> /* don't divide by zero! */
> if((y_abs < 1.5E-5) && (x_abs < 1.5E-5))
> return 0.0;
>
> Since the preceding multiply_conjugate should square the magnitude, this choice of epsilon accounts for the threshold I found empirically.
>
> Given this, I'm going to file an issue requesting that this epsilon be reduced. (The only alternative that comes to mind is to place an AGC block before the demodulator, which seems unlikely to be better from a numerical perspective).
>
> --
> Kevin Reid <http://switchb.org/kpreid/>

Agreed. This threshold should be reduced. Can you experiment with that
threshold to see if there's any lower limit that might be problematic
(my default threshold, for some reason, is 1e-20; would want to make
sure that doesn't cause something else in the math to blow up).

Tom

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment