Sunteți pe pagina 1din 3

4.

2 Gold Code Generator


The gold code generator is initially invented by R. Gold in 1967. According to him
the set of small correlation PN codes can be created by modulo 2 additions of the results that are
obtained from the two LFSRs. Then the result obtained is a set of codes with correlation properties
and these codes are known as Preferred Pair Gold Codes. By multiplying the two PN sequences we
will get Gold-Code as shown in the figure 5. The main advantage to use the gold code is that the
cross correlation between the two codes is uniform and bounded [14].We can obtain preferred pair
Gold-Code sequences by time-shifting the one of the PN sequence. These preferred pair Gold-Code
sequences are checked for minimum cross correlation and the sequence with minimum cross
correlation is used as the key. In this project we are considering only the zero shift Gold-Code
sequence, as it is generally used.

LFSR 1

LFSR 2

Gold cod

Figure5: Gold code generator


The logic involved in the simulation of Gold-Code generator is

The two PN Sequences are used as components in the program and are given
common initial fill or seed.

We will declare two signals pn1 and pn2, and we will obtain the outputs
of the PN Sequence generators.

By multiplying these outputs we will get Gold-Code.

f1(x)

SEED: 10000
N=31

f2(x)

Figure6: Preferred Gold-Code Generator


For example consider two LFSRs with five states and the top locations are [5 2] and [5 4 2]
respectively as shown in the above figure.
Here f1(x) is a 5-bit LFSR with a tap sequence [5, 2]
f2(x) is a 5-bit LFSR with a tap sequence [5, 4, 2]
f1(x) =1+x2+x5
seq1: N=25-1=31 bits
f2(x) =1+x2+x4+x5
seq2: N=25-1=31 bits
After running the code results are shown in the figure 7 for the preferred gold code generator.
Example:

PN sequence1 is -1 1 1 -1 -1 -1 1
PN sequence2 is 1 -1 1 -1 -1 1 -1
By using c and mat lab the result code is -1 -1 1 1 1 -1 -1

Figure7: Coding Result of Gold Code Generator.

A Gold code, also known as Gold sequence, is a type of binary sequence, used
in telecommunication (CDMA)[1] and satellite navigation (GPS).[2] Gold codes are named after Robert
Gold.[3] Gold codes have bounded small cross-correlations within a set, which is useful when multiple
devices are broadcasting in the same frequency range. A set of Gold code sequences consists of 2 n 1
sequences each one with a period of 2n 1.
A set of Gold codes can be generated with the following steps. Pick two maximum length sequences of
the same length 2n 1 such that their absolute cross-correlation is less than or equal to 2(n+2)/2,
where n is the size of the LFSR used to generate the maximum length sequence (Gold '67). The set of
the 2n 1 exclusive-ors of the two sequences in their various phases (i.e. translated into all relative
positions) is a set of Gold codes. The highest absolute cross-correlation in this set of codes is 2 (n+2)/2 + 1
for even n and 2(n+1)/2 + 1 for odd n.
The exclusive or of two different Gold codes from the same set is another Gold code in some phase.
Within a set of Gold codes about half of the codes are balanced the number of ones and zeros differs
by only one.[4]

Cc chui Gold c dng ph bin cho cc h thng


CDMA khng trc giao.
Chui Gold c to ra bng cch ly tng hai chui
m-sequence. Hai chui ny phi tho mn mt s iu
kin v c gi l cp u tin. Hm t tng quan
nhn mt trong ba gi tr: {-t(m)/N,1/N,(t(m)-2)/N} vi
N l chiu di m.
B m Gold c N + 2 m v:
Cho php truyn bt ng b. My thu c th thc
hin ng b nh tnh t tng quan ca chui m
Gold.

S-ar putea să vă placă și