[Top][All Lists]

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

[Discuss-gnuradio] Suggestion to change comment in pn_correlator(was Re:

From: Albert Chun-Chieh Huang
Subject: [Discuss-gnuradio] Suggestion to change comment in pn_correlator(was Re: Direct Sequence Spread Spectrum Question.)
Date: Fri, 07 Dec 2012 12:13:24 +0800
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.2 (darwin)

Gerald Baier <address@hidden> writes:

> On 03.12.2012 02:58, Ahmed Zaheer wrote:
[stuff deleted]
>> Do I have to use the PN Correlator block in some other manner? Or I
>> should use some other blocks after PN Correlator block to retrieve
>> the original data?
> I think your next problem are the following lines in the PN
> correlator, where d_pn is the current chip of the PN sequence and
> d_len the sequence's period:
>  67   for (int i = 0; i < noutput_items; i++) {
>  68     sum = 0.0;
>  69
>  70     for (int j = 0; j < d_len; j++) {
>  71       if (j != 0)                           // retard PN generator
> one sample per period
>  72         d_pn = 2.0*d_reference->next_bit()-1.0; // no conditionals
>  73       sum += *in++ * d_pn;
>  74     }
>  75
>  76     *out++ = sum*gr_complex(1.0/d_len, 0.0);
>  77   }
> Basically after one complete period (line 70), the correlator keeps
> the old state of the PN generator's shift register, hereby
> retarding/changing the phase of the PN sequence (line 71). What you
> want do to, is to always correlate with the same phase, so removing
> line 71 should do the trick.
> Keep in mind that the PN correlator is a decimator block, so for N
> samples, with N being the length of the PN sequence, it only outputs
> one sample. Therefore you can't demodulate with the same samples per
> symbol option as in the modulator.
> I hope that helps,
> Gerald

Hi, Gerald,

Thank you for clarifying this block! I think I misunderstood the code in

If I read it correctly, pn_correlator acts like one finger in a RAKE
receiver in that it correlates input samples by PN sequence and
transforms chips to symbols. I don't see "sequential search" part as
described in its comment. As far as I know, sequential search means to
correlate input samples by PN sequence and advance one sample after each
correlation. If that's the case, may I suggest GNU Radio developers
modify its comment in pn_correlator_cc.h from "PN code sequential search
correlator" to "PN code correlator" without using "sequential search"?

Albert Chun-Chieh Huang(黃俊傑)
Blog: Random Notes, http://alberthuang314.blogspot.com/

reply via email to

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