Spreading sequences in a spread spectrum systems can be generated with help of diversified codes like m-sequences,Gold Codes,Kasami Codes, Walsh Codes etc.
Compared to m-sequences (maximum length PN Sequences), Gold codes have worst auto-correlation properties but they have better cross-correlation properties.
The sequences associated with Gold Codes are produced by binary addition (modulo-2) of cyclic shifted versions of two m-sequence of length . If two m-sequences of cyclic shift and are used in Gold code generation, then the generated gold code will be unique for each combination of and . This means that a plenty of gold codes are generated with just two m-sequences which implies larger number of users can be accommodated in a given spread spectrum system.
When the two m-sequences are picked randomly for Gold code generation, then the cross-correlation property of the generated Gold code might not be as good as expected. Gold codes are generated using “Preferred” pairs of sequences that will guarantee good cross-correlation (as well as auto-correlation) properties of the generated Gold code.A method for selecting the preferred pairs for Gold Code generation was given by Gold [1] and is detailed here.
1) Take a m-sequence for given length ,where is the number of registers in the LFSR).
2) Decimate the m-sequence by a decimation factor of q. This is our second sequence.
3) If the value of q is chosen according to the following three conditions, then the two m-sequences and will be preferred pairs.
A) is odd or
B) is odd and either or for an integer .
C) The greatest common divisor of and satisfies the following conditions:
, when is odd
, when
Lets consider generation a preferred pairs of m-sequence of length N=63 (n=6). Since mod(n=6,4)=2, the first condition is satisfied. Taking and satisfies condition 2 and 3. So we will use a decimation factor of in our simulation for preferred pairs generation.
The cross-correlation property of the preferred pairs for Gold code generation are three valued and the values are,
where t(n) is given by
For our example, the theoretical cross-correlation values for the preferred pairs of m-sequences are .
Check this book for full Matlab code.
Simulation of Digital Communication Systems Using Matlab – by Mathuranathan Viswanathan
Check this book for full Matlab code.
Simulation of Digital Communication Systems Using Matlab – by Mathuranathan Viswanathan
Check this book for full Matlab code.
Simulation of Digital Communication Systems Using Matlab – by Mathuranathan Viswanathan
Results:
The theoretical and simulated cross-correlation values for the generated preferred pairs (with N=63 and q=5) matches perfectly (which can be seen from data cursors on the second plot).
Go here for : Hardware implementation of Gold code generator
[1]Gold, R. (1967), Optimal binary sequences for spread spectrum multiplexing (Corresp.), IEEE Transactions on Information Theory, 13 (4), pp. 619–621.
[1] Generation of Gold Codes and their cross-correlation
[2] Hardware implementation of Gold code generator
[3] Maximum Length Sequences ( m-sequences)
[4] Walsh Hadamard Code – Matlab Simulation
[5] Codes used in CDMA
[6] Introduction to Spread Spectrum Communications
联系客服