# Simple Correlator Input Requirements

**URL:** <https://www.ruby-forum.com/t/simple-correlator-input-requirements/226990>\
**Category:** GNU Radio\
**Created:** [February 27, 2013, 10:18pm UTC](https://www.ruby-forum.com/t/simple-correlator-input-requirements/226990 "2013-02-27T22:18:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![douglas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a6a055/32.png) [@douglas](https://www.ruby-forum.com/u/douglas)\
**Post date:** [February 27, 2013, 10:18pm UTC](https://www.ruby-forum.com/t/simple-correlator-input-requirements/226990/1 "2013-02-27T22:18:17Z")

</div>

I believe the GRC “Simple Correlator” is the inverse of the “Simple  
Framer,” yet it takes float inputs. What is the proper format of the  
input data? I see that the code does some slicing on the input, so I  
expect the floats to be positive and negative float values representing  
ones or zeros respectively.

Asked another way, what is wrong with the simple flowgraph below?

File Source (byte) -\>  
Simple Framer (Payload Size = 6) -\>  
Throttle -\>  
Packed to Unpacked (Byte,1 bit per Chunk, MSB) - This block  
causes the bits to be represented as serial bytes. -\>  
Char to Float (scale 1) -\>  
Add Const (float, -0.5) This removes the DC bias to  
facilitate slicing. -\>  
Simple Correlator (Payload Byte Size = 6) -\>  
File Sink (byte).

No data comes out of the Simple Correlator, but using GUI sinks, I see  
that all the other blocks work.

There is mention on the Internet that the Simple Correlator requires 8x  
oversampling. Is that true? I only need correlation at the bit level,  
not at the symbol timing. Is the Simple Correlator the wrong block to  
undo the Simple Framer?

-Thanks

---

<div class="post-metadata">

**Author:** ![douglas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a6a055/32.png) [@douglas](https://www.ruby-forum.com/u/douglas)\
**Post date:** [February 27, 2013, 11:43pm UTC](https://www.ruby-forum.com/t/simple-correlator-input-requirements/226990/2 "2013-02-27T23:43:05Z")

</div>

On Wed, Feb 27, 2013 at 3:56 PM, Douglas E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ```
> Throttle ->
> 
> ```
> 
> There is mention on the Internet that the Simple Correlator requires 8x  
> oversampling. Is that true? I only need correlation at the bit level, not  
> at the symbol timing. Is the Simple Correlator the wrong block to undo the  
> Simple Framer?
> 
> -Thanks

Yes, it’s true that you need to oversample by 8 for this block. I’m  
pretty sure it was a block that was written quickly for a very  
specific purpose and was never updated after that.

For how to use it, I, just this week in fact, created QA for this  
block, so you can use that as an example of how it works with the  
simple\_framer. Note also that I moved the block into gr-digital and  
made what I think was a bug fix to the code itself, so you’ll want to  
use that one when referencing the QA.

(I didn’t ‘fix’ the bug in the block found in gnuradio-core because it  
was possibly not a bug and a misuse on my part; I didn’t want to  
affect anyone using the old version that might have it working for  
them.)

My suggestion would be to take this block and reimplement it where it  
doesn’t do the 8x oversampling. Or maybe just add the number of sps as  
a parameter that can be used in the algorithm for doing the  
correlation.

Tom
