gold code

4
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. 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. LFSR 1 LFSR 2 Gold cod

Upload: truong-van-truong

Post on 11-Jan-2016

218 views

Category:

Documents


5 download

DESCRIPTION

gold code

TRANSCRIPT

Page 1: gold code

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.

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

LFSR 1

LFSR 2

2 3 41 5

Gold cod

Page 2: gold code

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 2n − 1

sequences each one with a period of 2n − 1.

54321

Page 3: gold code

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]

Các chuỗi Gold được dùng phổ biến cho các hệ thốngCDMA không trực giao.Chuỗi Gold được tạo ra bằng cách lấy tổng hai chuỗim-sequence. Hai chuỗi này phải thoả mãn một số điềukiện và được gọi là cặp ưu tiên. Hàm tự tương quannhận một trong ba giá trị: {-t(m)/N,1/N,(t(m)-2)/N} vớiN là chiều dài mã.Bộ mã Gold có N + 2 mã và:Cho phép truyền bất đồng bộ. Máy thu có thể thựchiện đồng bộ nhờ tính tự tương quan của chuỗi mãGold.