Table of Contents Author Guidelines Submit a Manuscript
International Journal of Antennas and Propagation
Volume 2015, Article ID 956735, 9 pages
Research Article

Optimized Method for Generating and Acquiring GPS Gold Codes

1Team of Communication Signals, Geolocation, Parallel Processing and Hardware Implementation, ETA Laboratory, Electronics Department, University of Bordj Bou Arreridj, 34031 El Anasser, Algeria
2PRISME, Polytech Orléans, 12 rue de Blois, BP 6744, 45067 Orléans Cedex 02, France

Received 31 May 2015; Revised 13 September 2015; Accepted 15 September 2015

Academic Editor: Ding-Bing Lin

Copyright © 2015 Khaled Rouabah et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.


We propose a simpler and faster Gold codes generator, which can be efficiently initialized to any desired code, with a minimum delay. Its principle consists of generating only one sequence (code number 1) from which we can produce all the other different signal codes. This is realized by simply shifting this sequence by different delays that are judiciously determined by using the bicorrelation function characteristics. This is in contrast to the classical Linear Feedback Shift Register (LFSR) based Gold codes generator that requires, in addition to the shift process, a significant number of logic XOR gates and a phase selector to change the code. The presence of all these logic XOR gates in classical LFSR based Gold codes generator provokes the consumption of an additional time in the generation and acquisition processes. In addition to its simplicity and its rapidity, the proposed architecture, due to the total absence of XOR gates, has fewer resources than the conventional Gold generator and can thus be produced at lower cost. The Digital Signal Processing (DSP) implementations have shown that the proposed architecture presents a solution for acquiring Global Positioning System (GPS) satellites signals optimally and in a parallel way.

1. Introduction

The spreading codes are the most important elements of the Direct Sequence Code Division Multiple Access (DS-CDMA) communications [1]. According to their performances and their characteristics, they will determine the quality of transmission and communication because they have the properties of a White Gaussian Noise (WGN). The code sets can be divided into two classes: orthogonal codes, like Walsh Hadamard codes, mainly used in Interim Standard 95 (IS-95) and CDMA 2000 systems [25], Orthogonal Variable Spreading Factor (OVSF) codes [6], used in Wideband CDMA (WCDMA) [7] and Time Division Synchronous CDMA (TD-SCDMA) systems [8], orthogonal Gold codes [9, 10], and Golay complementary codes [1117] and those being nonorthogonal or pseudorandom codes, such as m-sequence codes [1820], Gold codes [21, 22], Gold-like codes, Kasami codes [23, 24], Weil codes [25, 26], and Barker codes [27]. The performances of a CDMA system are largely dependent on the characteristics of spreading codes and their principle of generation. GPS system uses Gold codes that are generated by two LFSRs expressed each as coefficients of a polynomial. The two polynomials corresponding to the two LFSRs form a preferred polynomial pair of a Gold code. The whole code sequence is defined solely by the generator polynomials and the initial states. The receivers, thus, only need to store the generators functions instead of the whole sequence and the memory space is saved [28]. The codes generation has attracted much attention in both industrial and academic fields. The knowledge of the spread spectrum codes is a prerequisite for designing receivers capable of acquiring and tracking all satellites in the constellation. Global Navigation Satellite Systems (GNSS) include the American GPS, the European Galileo, the Russian GLObal NAvigation Satellite System (GLONASS), and the Chinese BeiDou. Galileo satellite navigation system will use memory codes for the bands E1-OS (Open Service) and E6 that are hard for reverse engineering [26]. These codes are random sequences like Coarse Acquisition (C/A) code used in GPS but do not have a common code generator algorithm. According to [25, 26], the principle of memory codes is to generate a family of codes that fulfills the properties of a random noise at maximum for a given code length. The resulting codes are then optimized by means of artificial intelligence like genetic algorithm in order to have codes with properties that are needed for optimal operation of Galileo system. The optimized codes are then stored in the receiver memory, which is more expensive compared to codes generators. Hence, a lot of memory is required for full system support. Although memory codes will provide an increase in receiver tracking performances, their implementation has a direct implication in the receiver design. In fact, memory increases the hardware cost, the complexity, the use of signal processing resource, and the power consumption of the receiver when compared to LFSRs. As manufacturers move towards low-cost and low-power ASIC implementations, memory code implementation will become more challenging [29]. In this paper, we propose a simpler and faster pseudorandom code generator that can be efficiently initialized to any desired code, with a minimum delay. In addition, we propose an architecture with fewer resources than the conventional ones which can be produced at lower cost. We propose also a new form of the correlation function calculation that is compatible with these codes. The paper is organized as follows: we begin with discussion of the classical principle of generation and the properties of C/A-GPS Gold codes. The principle of the proposed architecture for these codes’ generation and correlation principles are provided in Section 3. After that, we present the results of DSP implementation and, finally, we end up by some conclusions.

2. Principle of Generating and Acquiring C/A-Gold Codes

The acquisition is the tiresome job of searching a three-dimensional space for the correlation peak. One dimension is the satellite vehicle signal number (SN) (at least if the receiver has no a priori knowledge). The second dimension is the frequency space, since an unknown Doppler shift of the transmitted signal and an inaccurate frequency reference in the receiver produce a high frequency-offset uncertainty. The third dimension is the code phase [30, 31].

Many modern GPS receivers have 8, 12, or 16 channels in parallel to facilitate a faster search process. GPS system contains 32 codes. Each code is generated using a combination of two tapped LFSRs and as shown in Figure 1. Each LSFR generates a maximum-length Pseudorandom Noise (PRN) sequence of “” elements, where , which is equal to 10 in GPS system, is the number of the LSFR stages as illustrated in Figure 1.

Figure 1: LSFRs based Gold codes generator.

A shift register is a set of one-bit storage or memory cells. When a clock pulse is applied to the register, the content of each cell shifts one bit to the right. The content of the last cell is “read out” as output [31].

The two resulting 1023-chip-long sequences are modulo-2 added to generate a 1023-chip-long code, only if the polynomial is able to generate codes of maximum length. Every 1023rd period, the shift registers are reset with all ones, making the code start over. register always has a feedback configuration with the polynomial: , meaning that state 3 and state 10 are feedback to the input. In the same way, register has the polynomial: . To make different codes for the satellites, the outputs of the two shift registers are combined in a very special manner. register always supplies its output, but register supplies two of its states to a modulo-2 adder to generate its output. The selection of states for the modulo-2 adder is called the phase selection. SN is affected to each satellite of the constellation. Table 1 shows the combination of the phase selections (PS) for each satellite C/A-GPS code [31].

Table 1: C/A-GPS code phase assignment.

The most important characteristics of the C/A codes are their correlation properties. The two important correlation properties of the C/A codes can be stated as follows [31].

2.1. Nearly No Cross-Correlation

All the C/A codes are nearly uncorrelated with each other. That is, for two codes and for satellites and , respectively, the cross-correlation can be written as

2.2. Nearly No Autocorrelation Except for Zero Lag

All C/A codes are nearly uncorrelated with themselves, except for zero lag. This property makes it easy to find out when two similar codes are perfectly aligned. The autocorrelation property for satellite can be written asIn the very first time when a receiver is switched on, it has no information about its position or about the position of the satellites. The receiver has no information about which satellites are in view. The receiver starts a sky search by analyzing the input signal with respect to all known satellite ranging codes [32]. If the receiver has been initialized before, it generally uses almanac and ephemerides, the approximate user position, and approximate time estimate to provide aiding information in form of estimated Doppler shift and estimated time shift to the tracking loops. Depending on the availability of the information, three different acquisition modes are distinguished: cold start, hot start, and reacquisition start. In cold-start case, no information is available to help acquiring signals and determining the satellites in view; therefore, the acquisition times may take several minutes. In hot-start case, the receiver has a number of initialization parameters (almanacs or navigation messages), and the acquisition time is reduced to a few tens of seconds. Reacquisition start is the process when satellites signals have just been lost and are acquired again; therefore, the receiver has good knowledge of time and Doppler shift [32].

The core element of the receiver is the correlation between the received signal and locally generated replica. The identification of one dedicated satellite signal is performed by searching for the maximum of its autocorrelation function, which works like a filter for all other satellites signals components [32].

The acquisition of a specific satellite from the total constellation involves performing the correlation between the code corresponding to this satellite and its replica that is locally generated. Therefore, the number of locally generated replicas depends on the number of satellites that can be acquired. An increasing number of visible satellites increase the requirements of the hardware components and circuitry, which is a limitation of classical LFSR based Gold codes generator.

3. Principle of the Proposed Method

In our proposed method, we use the bicorrelation between two different codes and . The main idea is that, in contrast to the intercorrelation function of two different C/A-GPS codes, which is always null, the bicorrelation function can be different from zero.

The general expression of the bicorrelation is given byBy considering the same procedure as the autocorrelation function, we can determine analytically the approached mathematical model of . Here, we have considered three rectangular windows, a fixed one and two others that are, respectively, shifted by and .

In ideal case, which corresponds to the absence of noise, multipaths, and interferences, (3), for C/A-GPS codes, is found to beHere, we use the same principle as that used in [33]. In this case, as presented in Figures 2 and 3, two pyramids whose basis is hexagonal and symmetrical about the diagonal characterize the nonnull bicorrelation bidirectional plot. Besides, as illustrated in Figure 4, when considering either one of the plan sections , we find exactly the ACF triangular waveform of the code which is thus given by . Therefore,which gives where is the specific time delay corresponding to the th code, which permits deriving the th satellite from the th satellite. The centers and of the hexagons correspond, respectively, to the ACF peaks projections on the straight lines and .

Figure 2: Plot of the bicorrelation of two Gold codes.
Figure 3: Zoomed C/A-GPS code bicorrelation peak presenting a hexagonal basis.
Figure 4: Graphical determination of values.

, as illustrated in Figure 4, is found by determining the difference between and coordinates relative to either or axis.

According to (5) and (6), we notice that it is possible to generate a C/A-GPS code from the product of another code and its delayed version . For example, let us consider the bicorrelation of the two codes and . This latter is found to be nonnull and the projections of the two autocorrelation peaks on the plan , as presented in Figure 5, are chips and chips; therefore, chips. Hence, according to (6), we conclude that code 26 may be generated from code 31 by multiplying this latter by its same version delayed by chips.

Figure 5: Example of determining from the bicorrelation of codes and .

Consequently, this characteristic is going to be used to generate all the CA-GPS codes of the satellite constellation from the exclusive use of just one locally generated code. This latter, for convenience, is chosen to be which is generated either by the LSFR generator or from the memory. To initiate the generation of the remaining codes, we will first look for all the codes for which . As solutions, we obtain the eight codes with . Then, corresponding , which permit their generation from , are determined graphically and given in Table 2. The set of codes so obtained, , with , represents the first category of codes generated from .

Table 2: Different categories of C/A-GPS Gold codes and their corresponding values.

Afterwards, each of these eight codes will in turn be bicorrelated separately with the rest of the codes. In this case also, by solving for the codes for which with , we findFor codes with .For codes with .For codes with .For codes with .For codes with .For code with .For code with .

The cumulative set of values, with , , , , , , , , , , , , , , , , , , , , , is then graphically determined and given in Table 2 which gives the second category of 21 codes that are also initially generated from .

By using the same reasoning, the last remaining two codes with , which represent the third and last category, are obtained by replacing in (6) and solving for the codes for which . Corresponding values graphically determined are given in Table 2.

The different steps used to generate the whole set of the GPS constellation codes from the single code are summarized in the flow chart of Figure 6.

Figure 6: Flow chart showing the relation between all C/A-GPS codes.

Based on these results, we can propose a new structure for acquiring all C/A-GPS codes. The principle of this correlation scheme is shown in Figure 7. In this structure, the manner in which the reference C/A code is locally generated depends on the category to which it belongs. The codes of the first category are all generated directly from by using the corresponding delay lines values of Table 2. Then, each one of these first-category codes is delayed separately with its corresponding as given in Table 2, to obtain the second category of codes. Finally, the third category of codes is generated by applying corresponding to the appropriate codes of the second category as specified in Table 2. By comparing the outputs of the different correlators, after an integration time to a specific threshold, we can easily detect the absence or the presence of any satellite of the constellation.

Figure 7: The proposed acquisition algorithm structure.

4. DSP Implementation

As shown in Figure 7, the basic element in the proposed C/A-GPS Gold code generation structure is the delay line, which can be implemented in a DSP by using a Digital Delay Line (DDL) that is an elementary functional unit for delay modeling. A fundamental building block of DDL is shown in Figure 8.

Figure 8: DDL.

The function of a delay line is to introduce a time delay corresponding to samples between its input and output. Because is an integer, the DDL can be implemented as a circular buffer, which is one of the highlights of a DSP. In fact, compared to linear buffer, circular buffer is more advantageous in terms of memory and access time. We can also implement the DDL as a Finite Impulse Response (FIR) filter with a transfer function that is given as follows:The filter given by (7) has “” poles at and “” zeros at . Its frequency response is given as follows:The filter, given by (7) and (8), is an all-pass filter with linear phase and it can be implemented as C/A-GPS Gold codes generator [34].

There are different DSP families with particular architectures. It is therefore necessary to choose the processor with the essential resources to meet specific needs. The ADSP BF537 processors, Analog Devices, Inc., can reach the highest performances in comparison to the other ones. Processors, ADSP BF537, are new members of the Blackfin family of Analog Devices, Inc., Intel Micro Signal Architecture (MSA), which offer very high performances and low power consumption with the usability advantage. They are clocked at speeds up to 600 MHz. ADSP BF537 processor is shown in Figure 9.

Figure 9: ADSP BF537 processor.

The schemes implemented in this DSP, for our method and traditional LFSR method, are given, respectively, in Figures 1 and 10 and the results are shown in Figure 11 as code representation in graphical mode. The obtained results illustrate that the C/A-GPS codes obtained with our method coincide with C/A-GPS LFSR codes.

Figure 10: DSP implemented scheme.
Figure 11: DDL based C/A-GPS Gold code.

In addition, when we compare the execution time of the proposed method to that of the conventional one for one given code, we find that our architecture is 5.3883 times faster. Therefore, the proposed generation process, compared to the classical one, is approximately 172.4 times faster, which shows the efficiency of our method.

5. Conclusion

An efficient method for generating and acquiring C/A-GPS signals based on bicorrelation function principle is proposed in this paper. This method takes advantage of the relationships between the different C/A-Gold codes that are derived from the slices of the bicorrelation function. The proposed architecture, compared to the conventional ones, is less time consuming and has fewer resources since it uses a reduced number of XOR functions. In addition, it can be produced at lower cost and may be used for the acquisition of all C/A-Gold GPS satellites signals. The DSP implementations have shown that the proposed architecture presents a real solution for the optimal acquisition of GPS signals. Moreover, it can be easily extended to all CDMA PRN codes especially those of GPS and Galileo CDMA new generation systems.

Conflict of Interests

None of the authors has any conflict of interests.


  1. J. S. Lee, L. E. Miller, and E. Leonard, CDMA Systems Engineering Handbook. s.l, Artech House, 1998.
  2. J. L. Walsh, “A closed set of normal orthogonal functions,” American Journal of Mathematics, vol. 45, no. 1, pp. 5–24, 1923. View at Publisher · View at Google Scholar · View at MathSciNet
  3. D. Gerakoulis and S. Ghassem Zadeh, “Extended orthogonal code designs with applications in CDMA,” in Proceedings of the IEEE 6th International Symposium on Spread Spectrum Techniques and Applications, vol. 2, pp. 657–661, Parsippany, NJ, USA, September 2000. View at Publisher · View at Google Scholar
  4. T.-K. Woo, “Orthogonal code design for quasi-synchronous CDMA,” Electronics Letters, vol. 36, no. 19, pp. 1632–1633, 2000. View at Publisher · View at Google Scholar · View at Scopus
  5. S. Ulukus and R. D. Yates, “Iterative construction of optimum signature sequence sets in synchronous CDMA systems,” IEEE Transactions on Information Theory, vol. 47, no. 5, pp. 1989–1998, 2001. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus
  6. F. Adachi, M. Sawahashi, and K. Okawa, “Tree-structured generation of orthogonal spreading codes with different lengths for forward link of DS-CDMA mobile radio,” Electronics Letters, vol. 33, no. 1, pp. 27–28, 1997. View at Publisher · View at Google Scholar · View at Scopus
  7. L. B. Milstein, “Wideband code division multiple access,” IEEE Journal on Selected Areas in Communications, vol. 18, no. 8, pp. 1344–1354, 2000. View at Publisher · View at Google Scholar · View at Scopus
  8. S. Liu and J. R. Cruz, “Uplink performance of TD-SCDMA systems,” in Proceedings of the 60th IEEE Vehicular Technology Conference (VTC '04), vol. 6, pp. 4170–4174, IEEE, Los Angeles, Calif, USA, September 2004. View at Publisher · View at Google Scholar
  9. R. Gold, “Maximal recursive sequences with 3-valued recursive cross-correlation functions (corresp.),” IEEE Transactions on Information Theory, vol. 14, no. 1, pp. 154–156, 1968. View at Publisher · View at Google Scholar
  10. K.-L. Du and M. N. S. Swamy, Wireless Communication Systems: From RF Subsystems to 4G Enabling Technologies, Cambridge University Press, Cambridge, UK, 1st edition, 2010.
  11. M. J. E. Golay, “Multi-slit spectrometry,” Journal of the Optical Society of America, vol. 39, no. 6, pp. 437–444, 1949. View at Publisher · View at Google Scholar · View at Scopus
  12. M. J. E. Golay, “Static multislit spectrometry and its application to the panoramic display of infrared spectra,” Journal of the Optical Society of America, vol. 41, no. 7, pp. 468–472, 1951. View at Publisher · View at Google Scholar · View at Scopus
  13. M. J. E. Golay, “Complementary series,” IRE Transactions on Information Theory, vol. 7, no. 2, pp. 82–87, 1961. View at Google Scholar · View at MathSciNet
  14. R. Turyn, “Ambiguity function of complementary sequences,” IEEE Transactions on Information Theory, vol. 9, no. 1, pp. 46–47, 1963. View at Publisher · View at Google Scholar
  15. G. R. Welti, “Quaternary codes for pulsed radar,” IEEE Transactions on Information Theory, vol. IT-6, no. 3, pp. 400–408, 1960. View at Publisher · View at Google Scholar
  16. Y. Taki, H. Miyakawa, M. Hatori, and S. Namba, “Even-shift orthogonal sequences,” IEEE Transactions on Information Theory, vol. 15, no. 2, pp. 295–300, 1969. View at Publisher · View at Google Scholar
  17. C. C. Tseng and C. L. Liu, “Complementary sets of sequences,” IEEE Transactions on Information Theory, vol. 18, pp. 644–652, 1972. View at Google Scholar · View at MathSciNet
  18. E. H. Dinan and B. Jabbari, “Spreading codes for direct sequence CDMA and wideband CDMA cellular networks,” IEEE Communications Magazine, vol. 36, no. 9, pp. 48–54, 1998. View at Publisher · View at Google Scholar · View at Scopus
  19. R. C. Dixon, Spread Spectrum Systems with Commercial Applications, John Wiley & Sons, New York, NY, USA, 3rd edition, 1976.
  20. L.-T. Wang and E. J. McCluskey, “Linear feedback shift register design using cyclic codes,” IEEE Transactions on Computers, vol. 37, no. 10, pp. 1302–1306, 1988. View at Publisher · View at Google Scholar · View at Scopus
  21. R. Gold, “Optimal binary sequences for spread spectrum multiplexing (Corresp.),” IEEE Transactions on Information Theory, vol. 13, no. 4, pp. 619–621, 1967. View at Publisher · View at Google Scholar
  22. P. Fan and M. Darnell, Sequence Design for Communication Applications, Research Studies Press, Baldock, UK, 1996.
  23. T. Kasami, “Weight distribution formula for some class of cyclic codes,” Tech. Rep. R-285, Coordinated Science Laboratory, University of Illinois at Urbana-Champaign, Urbana, Ill, USA, 1966. View at Google Scholar
  24. D. V. Sarwate and M. B. Pursley, “Correlation properties of pseudo random and related sequences,” Proceedings of the IEEE, vol. 68, no. 5, pp. 593–619, 1980. View at Publisher · View at Google Scholar · View at Scopus
  25. S. Wallner, J. A. Avila-Rodriguez, and G. W. Hein, “Galileo E1 OS and GPS L1C pseudo random codes requirements, generation, optimization and comparison,” in Proceedings of the 1st CNES Workshop on Galileo Signals and Signal Processing, Toulouse, France, October 2006.
  26. S. Wallner, J. A. Avila-Rodriguez, and G. W. Hein, “Galileo E1 OS and GPS L1C pseudo random noise codes—requirements, generation, optimization and comparison,” in Proceedings of the 20th International Technical Meeting of the Institute of Navigation (ION GNSS '07), Fort Worth, Tex, USA, September 2007.
  27. S. W. Golomb and R. A. Scholtz, “Generalized Barker sequences,” IEEE Transactions on Information Theory, vol. 11, no. 4, pp. 533–537, 1965. View at Publisher · View at Google Scholar · View at MathSciNet
  28. G. X. Gao, D. Akos, T. Walter, and P. Enge, “Understanding the GIOVE-B broadcast codes of the Galileo system,” in Proceedings of the 42nd Asilomar Conference on Signals, Systems and Computers, pp. 2086–2090, IEEE, Pacific Grove, Calif, USA, October 2008. View at Publisher · View at Google Scholar · View at Scopus
  29. G. Neil, O. Michael, C. Michael, A. Jonathan, and M. Tony, “Early results are in testing a prototype Galileo receiver,” GPS World, vol. 16, no. 11, pp. 26–33, 2005. View at Google Scholar
  30. D. Megnet-Kagi, H. Mathis, P. Flammant, and A. Thiel, “C/A-code synchronization using analog feedback shift registers (AFSR),” in Proceedings of the 17th International Technical Meeting of the Satellite Division of the Institute of Navigation (ION GNSS '04), pp. 32–42, Long Beach, Calif, USA, September 2004.
  31. K. Borre, D. M. Akos, N. Bertelsen, P. Rinder, and S. H. Jensen, A Software-Defined GPS and Galileo Receiver: A Single-Frequency Approach, Birkhäuser, Boston, Mass, USA, 2007.
  32. B. Hofmann-Wellenhof, H. Lichtenegger, and E. Wasle, GNSS—Global Navigation Satellite Systems: GPS, GLONASS, Galileo, and More, vol. 507, Springer, Vienna, Austria, 2008.
  33. S. Zitouni, D. Chikouche, K. Rouabah, and K. Mokrani, “Analytical models of correlation functions, DLL discriminator outputs and multipath envelope errors for CosBOC(m, n) modulated signals in coherent and non-coherent configurations,” Wireless Personal Communications, vol. 82, no. 2, pp. 911–951, 2015. View at Publisher · View at Google Scholar
  34. T. I. Laakso, V. Välimäki, M. Karjalainen, and U. K. Laine, “Splitting the unit delay [FIR/all pass filters design],” IEEE Signal Processing Magazine, vol. 13, no. 1, pp. 30–60, 1996. View at Publisher · View at Google Scholar · View at Scopus