[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Question on threshold mathematics in correlate_and_sy

From: Andy Walls
Subject: [Discuss-gnuradio] Question on threshold mathematics in correlate_and_sync block
Date: Wed, 31 Dec 2014 14:00:43 -0500


Can someone give me a brief clue about the threshold testing in the
correlate_and_sync block?

In the constructor:

      for(size_t i=0; i < d_symbols.size(); i++)
        corr += abs(d_symbols[i]*conj(d_symbols[i]));
      d_thresh = 0.9*corr*corr;

corr looks like the value (at offset 0) of the discrete autocorrelation
of the matched filter.

d_thresh looks like 90% of the value of the autocorrelation of the
matched filter squared.

So far this makes sense to me. 

Then in the work function (corr is a totally different array variable

      // Calculate the correlation with the known symbol
      d_filter->filter(noutput_items, in, corr);

      // Find the magnitude squared of the correlation
      std::vector<float> corr_mag(noutput_items);
      volk_32fc_magnitude_squared_32f(&corr_mag[0], corr, noutput_items);

      int i = d_sps;
      while(i < noutput_items) {
        if((corr_mag[i] - corr_mag[i-d_sps]) > d_thresh) {

This "if" test confuses me slightly.  We check to see if the value of
the output of the matched filtering has crossed the threshold relative
to one symbol previous?  Why not just check relative to 0?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]