Re: Correlation Estimator block threshold settings in Absolute/Dynamic mode

2020-04-01 Thread Achilleas Anastasopoulos
There is definitely a weird logic with this block.
Let me explain:

Suppose your training sequence is c(t) with energy E=sum_t |c(t)|^2.
The training c(.) is exactly what the parameter "symbols" is in the
correlate block.
Suppose your signal is some scaled version of the training sequence eg,
y(t) = a c(t).
You would expect that the block correlates the incoming signal y(t) with
the given training c(t) and declares a peak when the correlation is above a
certain threshold, A.
ie, something like  sum^t y(s) c^*(s)  > A <==> a sum^t |c(s)|^2 > A <==>
sum^t |c(s)|^2 > A/a
Now since the full correlation, sum_s |c(s)|^2  equals E, you would expect
that the quantity A/a should scale with E (ie, it should be a fraction of
E), ie, A/a = fraction E <==> A = a fraction E.

This means that if one wants to build a correlator that works with an
arbitrary scaling "a" (suppose a genie gave you that at the Rx), the only
thing you should have to do is to
put as the parameter "threshold" in the block the quantity "a fraction".
This would make the whole system transparent: no matter what the scaling
is, your estimator would work exactly the same.

HOWEVER, as it turns out the "correct" scaling that works for this block is
to set  "threshold= a^2 fraction".
This is really weird and I do not see any intuition behind that type of
scaling...

Please see attached minimal working example and notice the squaring of
scaling inside the block that makes it transparent to scaling the input
signal.
However if you change this to anything else, the system breaks down (in the
sense that its behavior changes with scaling the input signal).

best
Achilleas


test.grc
Description: Binary data


Re: Correlation Estimator block threshold settings in Absolute/Dynamic mode

2020-04-01 Thread Christoph Mayer
How close to 1 did you use thresholds for the relative threshold method?
For the relative threshold method I use thresholds between 1-exp(-5)
.. 1-exp(-8).

Cheers.
Christoph

On Wed, Apr 1, 2020 at 5:58 PM Fabian Missbrenner
 wrote:
>
> Hi everyone,
>
> I am currently developing a wireless transceiver and try to get the
> transmission detection running at the receiving end. To help with
> detection and synchronization, a known word is prepended to every
> message. I now want to use the Correlation Estimator block to detect
> the presence of the known word on a noisy, bursty channel. The block
> computes the (magnitude squared of the) correlation of the incoming
> stream of complex baseband samples with the known word:
> https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/corr_est_cc_impl.cc#L219
>
> Attached you can find the Flowgraph I am using for testing purposes.
>
> With Threshold Method set to Absolute, once the correlation exceeds a
> user-defineable share of the auto-correlation peak of the known word
> (Threshold parameter: between 0 and 1),
> https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/corr_est_cc_impl.cc#L178,
> the known word is considered detected and a tag is added to the stream.
>
> Unfortunately, the block does not quite behave like expected. The
> threshold needs be set to a value that is off by a factor of 1000 in
> my case:
> cf. PDF attachment, slide 1.
> With a Threshold of 0.8/1000=800u, detection works reliably. But I
> don't understand where this factor of 1000 comes from.
>
> When using an AGC3 block before the Correlation Estimator (yes, I made
> sure to correlate against the normalized known word now), there is no
> correction by factor 1000 necessary anymore:
> cf. PDF attachment, slide 2.
> Here, with a threshold of 0.5, detection works reliably.
>
> With the Dynamic mode, the semantic of the Threshold parameter
> changes: Now it means a probability of false alarm:
> https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/corr_est_cc_impl.cc#L175.
> Unfortunately, regardless of configuring a Threshold close to 0 or
> close to 1, there are many false-positive detections:
> cf. PDF attachment, slides 3 and 4.
>
> I'm not quite sure if I am missing some important point about using
> the block or if the described oddities are bugs. Maybe you can help me
> out? I also saw a discussion about this block in a Github issue
> mentioning its lack of documentation:
> https://github.com/gnuradio/gnuradio/issues/1207#issuecomment-279573149
>
> Best regards
> Fabian Missbrenner



Re: Correlation Estimator block threshold settings in Absolute/Dynamic mode

2020-04-01 Thread Nick Foster
The magnitude of the correlation depends on the magnitude of your signal.
The AGC normalizes the signal amplitude before the correlator, so you see
expected behavior. The correlation estimator block expects the input to
have a normalized amplitude.

Nick

On Wed, Apr 1, 2020 at 8:58 AM Fabian Missbrenner <
fabian.missbren...@gmail.com> wrote:

> Hi everyone,
>
> I am currently developing a wireless transceiver and try to get the
> transmission detection running at the receiving end. To help with
> detection and synchronization, a known word is prepended to every
> message. I now want to use the Correlation Estimator block to detect
> the presence of the known word on a noisy, bursty channel. The block
> computes the (magnitude squared of the) correlation of the incoming
> stream of complex baseband samples with the known word:
>
> https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/corr_est_cc_impl.cc#L219
>
> Attached you can find the Flowgraph I am using for testing purposes.
>
> With Threshold Method set to Absolute, once the correlation exceeds a
> user-defineable share of the auto-correlation peak of the known word
> (Threshold parameter: between 0 and 1),
>
> https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/corr_est_cc_impl.cc#L178
> ,
> the known word is considered detected and a tag is added to the stream.
>
> Unfortunately, the block does not quite behave like expected. The
> threshold needs be set to a value that is off by a factor of 1000 in
> my case:
> cf. PDF attachment, slide 1.
> With a Threshold of 0.8/1000=800u, detection works reliably. But I
> don't understand where this factor of 1000 comes from.
>
> When using an AGC3 block before the Correlation Estimator (yes, I made
> sure to correlate against the normalized known word now), there is no
> correction by factor 1000 necessary anymore:
> cf. PDF attachment, slide 2.
> Here, with a threshold of 0.5, detection works reliably.
>
> With the Dynamic mode, the semantic of the Threshold parameter
> changes: Now it means a probability of false alarm:
>
> https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/corr_est_cc_impl.cc#L175
> .
> Unfortunately, regardless of configuring a Threshold close to 0 or
> close to 1, there are many false-positive detections:
> cf. PDF attachment, slides 3 and 4.
>
> I'm not quite sure if I am missing some important point about using
> the block or if the described oddities are bugs. Maybe you can help me
> out? I also saw a discussion about this block in a Github issue
> mentioning its lack of documentation:
> https://github.com/gnuradio/gnuradio/issues/1207#issuecomment-279573149
>
> Best regards
> Fabian Missbrenner
>


European GNU Radio Days: contribution submission

2020-04-01 Thread jean-michel.fri...@femto-st.fr
The initial deadline for contributing to the European GNU Radio Days conference
https://gnuradio-eu-20.sciencesconf.org/ is supposed to be today. 

In these uncertain times, some might be hesitant to spend time summarizing 
the result of their work: since no official guideline has been issued for 
events planned for end of June, we are still planning on holding the event 
*assuming* some contributions are provided. At worst, me might consider
virtualizing the conference, which we hope to avoid, but at least that might 
provide some framework in which to share results. Feel free to submit at
https://gnuradio-eu-20.sciencesconf.org/registration in case you have completed 
work to present (or let me know if you plan on doing so).

Best wishes, Jean-Michel