I want to design a receiver for a spread spectrum system. I know that two Pseudo sequence with two different length must be used in the receiver, but I can' t manage this with common receivers(such as integrate and dump and so on...) , can this be done? Regards.

enter image description here

  • $\begingroup$ No, you don't have to use two different sequences in the receiver. You might be thinking of the generation of Gold codes? But yes, these can be done, quite ostensibly: Gold codes are actually used. $\endgroup$ Dec 16, 2019 at 10:45
  • $\begingroup$ @ Marcus Müller but in my situation, I have two pseudo sequence with two different length and they are m-sequence, and I don't come to mind any solution. $\endgroup$ Dec 16, 2019 at 11:37
  • $\begingroup$ Can you provide more details on the specific waveform implementation? How is each data symbol created using the two sequences? $\endgroup$ Dec 16, 2019 at 12:40
  • $\begingroup$ @Dan Boschen I updated a picture in my question. I have two Pseudo code with length 63 and 31 respectively. One data symbol spreads using 63 and then two sequential data symbol spreads with 31 and this procedure continues. $\endgroup$ Dec 16, 2019 at 13:09
  • $\begingroup$ Interesting - Do you know why this is being done? Same chip rate for both? $\endgroup$ Dec 16, 2019 at 15:17

2 Answers 2

prn_code= 512;%sampled at Chip2x     
rx_sig % Load your signal    
early = rx_sig.*prn_code(+1 circular shift);    
late = rx_sig.*prn_code(+1 circular shift);    
if (early-late)>1    
    prn_code= prn_code(-1 circular shift )     
    prn_code= prn_code(+1 circular shift )     
prompt = rx_sig.* prn_code;

Am I right? @Dan Boschen

  • $\begingroup$ @ Dan Boschen Only say me who you use separated I and Q correlator. $\endgroup$ Dec 18, 2019 at 15:02

Just despread the same way with two different integrate and dump times for your two symbol types with appropriate blanking on each between longer and shorter code sequence periods.

I would be tempted to do all the acquisition and tracking on the longer symbol and then simply despread the shorter symbols using the synchronization from the longer one— with that approach envision a receiver for the just the longer sequence with 62 chip gaps between each symbol.

Alternatively if each code repeats at the same location in each symbol, given the relatively short sequences, a sliding complex correlator using I and Q FIR filters with the sequence as the coefficients (in reverse order) using two samples per chip would be a very simple approach —- the complex I and Q output of the filter would have a spike in time after every alignment with those symbols (0 or 180 degrees once aligned depending on the data symbol and given I and Q would have phase to provide for carrier recovery). Detect the spike with a threshold detector on the magnitude for acquisition, track the complex peak for carrier tracking and track the two samples on either side of the peak for early-late timing tracking. The peak sample will give you the same performance as an integrate and dump of the multiplication of the received sequence with the output of a code generator but given your peculiar waveform structure this may be a lot simpler.

Once all timing is established, a single 31 tap FIR filter on I can simply demodulate the other two symbols.

Summarizing this FIR approach:

One 126 tap FIR filter on I for carrier and timing recovery/tracking and demod of 63 chip symbols.

One 126 tap FIR filter on Q for carrier and timing recovery/tracking.

One 31 tap FIR filter on I for demod of the 31 chip symbols.

As @WilliamHa points out in the comments, this approach will only work if the same code sequence appears in each symbol, starting at the same location each time (beyond being inverted to designate a "1" or "0" data bit), but will not work if the code generators run continuously causing the code starting location to shift by one sample at the start of each longer sequence, and at the start of the pair of shorter sequences, due to the relationship between the two codes. In this case I would approach it using continuously running correlators where the outputs are blanked during the other symbols, using the longer code for tracking and carrier recovery and using the synchronized clock from that to demodulate the shorter codes. Similar to the FIR filter filter approach, there would be 6 correlators for the longer code: 2 for Early (I and Q), 2 for prompt (I and Q) and 2 for late (I and Q). Each of these should be running at at least 2 samples per chip. Only one I correlator is needed for the shorter codes at one sample per chip as the carrier and time reference is established from the longer code. The added complexity will be in timing the integrate and dump outputs of the correlator such that they are blanked during the shorter code sequences, but this would be determined in the timing recover process such that accumulation starts at the estimated start of the longer code and dumps after 63 chips, and then waits 62 chips before accumulating again. This structure assumes the code generators run continuously with the same chip rate, and the correlator structure is done by multiplying the code generator output with the received signal after having been down-converted to baseband. With this approach Carrier Recovery is done by monitoring the rotation of the I and Q prompt symbols of the longer code; a carrier error is determined using a complex conjugate multiply of one symbol with the previous and then multiplying that time I prompt to strip the +1/-1 data. Clock Recovery can be done by monitoring the magnitude of the Early and Late outputs of the longer code, where clock error = Early-Late. Acquistion is done by setting a threshold on the magnitude of the longer code.

Using the cross correlation property of the FFT, all the correlators could be done with FFT's as well, including one-shot joint frequency and delay acquisition if processing allows. I explain that approach further in this post: GPS signal acquisition

  • $\begingroup$ Excellent, I would like implement integrate and dump using intdmp matlab function, but It doesn't look right, what method you suggest? $\endgroup$ Dec 16, 2019 at 16:42
  • $\begingroup$ What I described - using filter(a,1,signal) in Matlab where a is the reverse order of the code sequence. Set a threshold using “probability of false detection vs probability of false alarm” techniques tracking signal peaks when aligned versus average noise level when not aligned. $\endgroup$ Dec 16, 2019 at 16:53
  • $\begingroup$ that is very good , I can do acquistion but I can't do early and late properly and I faced with many error.... $\endgroup$ Dec 17, 2019 at 16:27
  • $\begingroup$ Use two samples per chip and offset the early and late correlators by 1/2 a chip $\endgroup$ Dec 17, 2019 at 16:29
  • 1
    $\begingroup$ I or someone else here can likely help you if you do what I just recommended in my last comment. Happy to help! Post a new question specific to your problem with the early late and prompt correlator. Give specific details of that problem and helpful if you can narrow it down to the simplest case, show what you tried and what is wrong. $\endgroup$ Dec 18, 2019 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.