## 3 Code Synchronization Algorithm Based on the Segment Correlation
### Design of the Code Acquisition Module  
The block diagram of the acquisition loop of the receiver is shown in Figure 6. The acquisition judgment circuit is the core component of the acquisition loop. The serial acquisition method is used in the acquisition judgment module. The serial acquisition method is well used in situations where the cycle of the carrier signal is short. However, some problems occur when the cycle of the carrier signal is too long. Specific analyses of various such scenarios are described as follows:  
Situation 1: the carrier signal is not inverted after BPSK demodulation. In our case, the word \"inverted\" means that positive carrier signals before BPSK demodulation turn into negative carrier signals after BPSK demodulation. The signal waveform of such a situation is shown in Figure 7. After the correlation accumulation operation, the output signal is positive peak-to-peak. Acquisition judgment methods can succeed in such cases, _i.e._ carrier signals can be correctly restored after BPSK demodulation.  
Figure 6: The block diagram of the acquisition loop of the receiver.  
Figure 7: Carrier signal example indicative of the first situation.  
Situation 2: the carrier signal is inverted after BPSK demodulation, while the data acquisition time of the correlative accumulation is reasonable. A sample signal waveform of such a situation is shown in Figure 8. After the correlation accumulation operation, the output signal is negative peak-to-peak. Acquisition judgments also can succeed in such situations.  
Situation 3: the carrier signal is inverted after BPSK demodulation, but the data acquisition time of the correlative accumulation is not reasonable. This situation is shown in Figure 9. In this situation, although the signal is acquired, the value after accumulation is far less than the threshold value which we have set and erroneous judgment occurs.  
Hence, to avoid unsuccessful acquisitions, a novel serial acquisition algorithm based on segment correlation is proposed.  
Unlike traditional code acquisition algorithms, our proposed acquisition algorithm is based on correlation that is performed after partitioning each acquisition time interval into smaller segments. Then, a correlation operation is performed between acquisition data for each such segment. After the  
Figure 8: Carrier signal example indicative of the second situation.  
Figure 9: Carrier Signal of the third situation.  
correlation operation, the absolute values of the obtained correlation operation results of segment are summed. The accumulated value is used as the final code acquisition value of each acquisition time interval. The block diagram of the proposed serial acquisition algorithm is shown in Figure 10. In the proposed serial acquisition algorithm, the absolute value of the results obtained after the correlation operation are the peak-to-peak values in each time segment. Peak-to-peak values will be acquired by adding the peak-to-peak values in each segment of the acquisition time interval. In this manner, erroneous judgments are avoided and, hence, the capturing efficiency is improved.