Gerald Baier <[email protected]> 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 pn_correlator. 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/ _______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
