Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Santit Traithavil
Department of Engineering,
The Australian National University.
2
Abstract
PN sequences are an important part of Code Division Multiple Access
(CDMA) based wireless cellular systems. This report investigates the generation of m-sequences, Gold sequences, Gold-like sequences and Kasami sequences, which are special families of PN sequences. The autocorrelation and
cross-correlation of these sequences are compared and analysed. The PN sequences specified in IS-95 CDMA and WCDMA standards are generated and
stored for use in system level simulations.
CONTENTS
Contents
1 Introduction
2 m-Sequence
2.1
Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1
Balance Property . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.2
2.2.3
Autocorrelation . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.4
Cross-Correlation . . . . . . . . . . . . . . . . . . . . . . . . .
3 Gold Sequence
10
3.1
Preferred m-sequences . . . . . . . . . . . . . . . . . . . . . . . . . .
10
3.2
Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
3.3
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
4 Gold-Like Sequence
12
4.1
Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
4.2
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
5 Kasami Sequence
5.1
5.2
12
13
5.1.1
Generation
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
5.1.2
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
13
6 Implementation
14
6.1
Example 1: m-Sequence . . . . . . . . . . . . . . . . . . . . . . . . .
14
6.2
16
6.3
18
6.4
GUI Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
CONTENTS
7 Conclusions
21
23
B GUI Snapshot
27
Introduction
m-Sequence
m-Sequence or Maximal Length Sequence is the simplest PN sequence to generate. mSequences are generated by Linear Feedback Shift registers. An m stage shift register,
2 M -SEQUENCE
2.1
Generation
PN Sequence are usually generated by Linear Feedback Shift Register (LFSR). LFSRs are described by primitive polynomials or generator polynomials. These polynomials are conveniently and conventionally represented by a binary vector c =
[cm , cm1 , ..., c1 , c0 ], or the octal notation of the vector. e.g. f (x) = x5 + x2 + 1
is a binary vector 100101 or octal 45. Another convention is to represent it as (5,2,0),
which is sometimes further abbreviated as (5,2).
There are two ways of implementing these polynomials: Galois configuration.
Fibonacci configuration.
For Galois feedback generators, Figure 1, the feedback adders are placed between
the stages. So, there exists small delays inherent in the feedback path. For Fibonacci
feedback generators, Figure 2, the output from last register and intermediary stages
are combine in modulo-2 adders and is fed back to the input of the first register. This
inherits a feedback loop delay which consist of the sum of all propagation delays in
the path from last stage to the first stage. Therefore, Galois feedback generators are
usually faster than Fibonacci feedback generators.
While Galois configuration are readily divisible into units consisting of a flip-flop
and a modulo-2 adder, which makes them desirable for high speed hardware implementation, Fibonacci configuration is, however, easier for software implementation
and is used throughout this work.
2.2
Properties
2.2 Properties
c m= 1
c2
cm-1
c0 = 1
c1
c0 = 1 c1
c2
cm = 1
cm-1
m-1
2 M -SEQUENCE
2.2.1
Balance Property
A run is a sequence consecutive identical symbols (1s or 0s). The length of this
sequence is the length of the run. In an m-sequence generated by a linear feedback
shift registers of length m, there are (L+1)/2 runs, where L = 2m 1. The composition
of the runs is as follows:
1. 1 run of ones of length m. 2. 1 run of zeros of length m 1. 3. 2 runs (1 run of
ones and 1 run of zeros) of length m 2.
4. 4 runs (2 runs of ones and 2 runs of zeros) of length m 3.
5. 8 runs (4 runs of ones and 4 runs of zeros) of length m 4.
..
.
m. 2m2 runs (2m3 runs of ones and 2m3 runs of zeros) of length 1.
2.2.3
Autocorrelation
x[k]x[n k]
(1)
k=
2.2 Properties
(2)
The peak value occurs every time lL where l is an integer. m-Sequences have the
best autocorrelation function of the three kinds. The maximum value of its non-peak
value (maxk [Ra (k)]k6=lL ) is smaller than sequences of other kinds.
2.2.4
Cross-Correlation
Cross-correlation describes the relationship between two sequences. The higher the
cross-correlation is, the more similar the sequences are. The cross-correlation function
of any two sequences is given by:
Rc [n] =
x[k]y[n k]
(3)
k=
The lower bound of the cross-correlation between any pair of binary sequences of
period L in a set of M sequences is described by Welch as [1]:
r
M 1
Rc (k)max L
= L
ML 1
(4)
Usually the rejection of the signals of interfering users is measured by the ratio of
the maximum cross-correlation coefficient and the autocorrelation coefficient. Then
ratio is given by:
=
Rc (k)max
Ra (0)
(5)
A large set of m-sequences have large cross-correlation. This implies that they are
harder to be distinguish and may cause false synchonisation in CDMA based systems.
Although, it is possible to find sets of m-sequences with low cross-correlation, but
the number of sequences in the sets are too small for CDMA applications which
require much larger set of sequences. m-Sequences are useful in those applications
which require only a few sequences with excellent cross-correlation and autocorrelation
properties [2].
10
3 GOLD SEQUENCE
Gold Sequence
For CDMA system, each user is assigned a PN sequence to allow multiple access in a
band of frequencies. It is known that cross-correlation function between m-sequences
can have a relatively large peak, so m-sequences are not suitable in CDMA system due
to mutual interference. Although it is possible to select a small subset of m-sequences
that have smaller cross-correlation peak values, the number of sequences is usually
too small of CDMA applications. Gold sequences are preferred because the large
number of sequences they supply and the cross-correlation between the sequences are
uniformly bounded [1]. A Gold sequence can be generated by logical addition (XOR)
of two preferred m-sequences, so they have same period of 2m 1 as for m-sequences.
3.1
Preferred m-sequences
2(m+1)/2 + 1 , odd m
2(m+2)/2 + 1 , even m
(6)
3.2
Generation
3.3 Properties
11
f1(x) = x5+x2+1
Output
Sequence
f2(x) = x5+x4+x3+x2+1
Figure 3: Example of generating a set of Gold sequences
generator polynomial, can generate a total of L + 2 gold sequences (including the two
generator sequences).
For example, preferred pair m-sequences generated by preferred pair polynomials
(5, 2) and (5, 4, 3, 2) of the same order n = 5 have period L = 25 1 = 31 generate a
set of L + 2 = 33 Gold sequences with the same period.
3.3
Properties
Although gold sequences are generated form pairs of preferred m-sequences, except
the generator sequences, gold sequences are not m-sequences. So, they do not have
the properties of m-sequences and their autocorrelation are not two valued.
Cross-correlation of gold sequences contain three possible values {1, t(m), t(m)
2}, where t(m) is given by Equation 6.
12
5 KASAMI SEQUENCE
Gold-Like Sequence
Gold-Like sequence have parameters very similar to those of Gold sequences. Number
of sequences in a gold-like sequence set is N = L + 1 = 2m where L is the length of
one sequence (number of bits).
4.1
Generation
4.2
Properties
(7)
Kasami Sequence
Kasami Sequence have correlation function which is closest to the Welshs lower bound
in Equation 4. A set of Kasami Sequences is generated in a similar way to a set of
Gold-like sequences. There are two classes of Kasami sequences: the small set and
the large set. The small set is more optimal than the large set in the sense of matching
Welchs lower bound for correlation function. The small set is a subset of the large
set.
5.1
13
Generation
Properties
Correlation function for a small Kasami sequences takes on values within the set
{1, s(m), s(m) 2} where s(m) is given by Equation 7. Consequently, the maximum value for correlation functions is max = s(m) = 1 + 2m/2 . Comparing this to
the Welchs bound for binary sequences, max > 1 + 2m/2 , the small set of Kasami
sequences is an optimal collection of binary sequences in term of correlation functions
lower bound.
5.2
Large set of Kasami sequences contains both small set of Kasami sequences and Gold
(or Gold-like) sequences as subsets. The sequences are of period 2n 1. The number of
sequences within a set is N = 23m/2 for m = 0 mod 4, and N = 23m/2 + 2n/2 for m = 2
mod 4. The autocorrelation and cross-correlation functions takes on values within
the set {1, s(m), s(m) 2, t(m), t(m) 2}. The peak value of cross-correlation
function, |Rc |max = t(m), is larger than a small set of Kasami sequences and, in fact,
is the same as for a set of Gold sequences. However, the packing of signal space
is more efficient. CDMA based systems require large number of sequences in a set,
14
6 IMPLEMENTATION
Implementation
The following examples use implemented MATLAB functions to illustrate the properties of PN sequences. The key properties are summarised in Table 1 and the list
of MATLAB functions is given in Appendix A. The correctness of implemented msequence, Gold sequence, Gold-like sequence and small set Kasami sequence generators were checked by comparing sequences generated by the generators with the
sequences generated by Zhao [4].
6.1
Example 1: m-Sequence
The result sequence is seq1 = 1110010. Plot the autocorrelation of the sequence
using function Plot_Autocorr.
>> Plot_Autocorr(seq1);
From the properties of m-sequences, the peak value of autocorrelation function is
equal to L. The autocorrelation function of seq1, Figure 4, has the peak value equals
to 7.
Generate another m-sequence of generator polynomial x3 + x + 1.
>> seq2=m_seq_gen([3 1])
seq2 =
1
15
7
Maximum =7
Minimum =1
Autocorrelation
5
4
3
2
1
0
1
6
0
Time
3
Maximum =3
Minimum =5
2
Crosscorrelation
1
0
1
2
3
4
5
6
0
Time
16
6 IMPLEMENTATION
The result sequence is seq2 = 1110100. Plot the cross-correlation function of seq1
6.2
17
30
Maximum =31
Minimum =9
25
Autocorrelation
20
15
10
5
0
5
10
30
20
10
0
Time
10
20
30
Maximum =7
Minimum =9
6
4
Crosscorrelation
2
0
2
4
6
8
30
20
10
0
Time
10
20
30
Figure 7: Cross-correlation between the 3th sequence and the 5th sequence.
18
6 IMPLEMENTATION
6.3
19
15
Maximum =15
Minimum =5
Autocorrelation
10
5
15
10
0
Time
10
15
Maximum =7
Minimum =5
Crosscorrelation
10
0
Time
10
Figure 9: Cross-correlation between the 2nd and 3rd sequence in the Gold-like sequence set.
20
6 IMPLEMENTATION
15
Maximum =15
Minimum =5
Autocorrelation
10
5
15
10
0
Time
10
15
Figure 10: Autocorrelation of the 2nd sequence in the small set of Kasami sequences.
3
Maximum =3
Minimum =5
2
Crosscorrelation
1
0
1
2
3
4
5
10
0
Time
10
Figure 11: Cross-correlation between the 2nd and the 3rd sequence in the small set
of Kasami sequences.
6.4
21
GUI Demo
Conclusions
In this project, m-sequences, Gold sequences, Gold-like sequences and Kasami sequences were implemented. These sequences can be used in the simulation of present
and future wireless cellular systems. In addition, a MATLAB graphical user interface
demo was created to demonstrate the properties of various PN sequences.
References
[1] E. H. Dinan and B. Jabbari, Spreading codes for direct sequence cdma and
wideband cdma cellular networks, IEEE Communications Magazine, pp. 4854,
Sept. 1998.
[2] D. V. Sarwate and M. B. Pursley, Crosscorrelation properties of pseudorandom
and related sequences, Proceedings of the IEEE, pp. 593619, May 1980.
[3] B. J. Choi, Spreading sequences, May 2000, http://www-mobile.ecs.soton.ac.
uk/bjc97r/pnseq-1.1/.
[4] Q. Zhao, Common spreading sequences used in multi-user ds-cdma systems,
http://code.ucsd.edu/qizhao/seqs.html.
22
REFERENCES
[5] Matlab Help Notes, Version 7.0.1 release 14 service pack 1 ed., The MathWorks,
Sept. 2004.
23
Folder
Utility Functions
PN Sequence Generator
Function Name
Autocorrelation
Description
Find the autocorrelation of the
input sequence.
bar_pn
bi2pol
Cross_correlation
Find_RunLengths
Plot_Autocorr
Plot_Cross_corr
pol2bi
preferred_pair
test_utility_func
m_seq_gen
Generate an m-sequence with input generator polynomial. (Initial stage is all ones)
Plot_pnseq_CDMA
Illustrate
the
usage
of
PNseq_WCDMA_1, PNseq_WCDMA_2,
PNseq_IS95_I,
PNseq_IS95_Q
and PNseq_IS95_L.
24
Folder
Gold Sequence
Kasami Sequence
Description
Generate an m-sequence with
generator polynomial of octal 13
(x3 + x + 1).
PNseq_15
PNseq_67
PNseq_IS95_I
PNseq_IS95_L
PNseq_IS95_Q
PNseq_WCDMA_1
PNseq_WCDMA_2
gold_seq_gen
test_gold_gen
gold_like_gen
test_gold_like_gen
small_kasami_gen
25
Folder
Function Name
test_kasami_gen
Description
Demonstrate the usage of the
function small_kasami_gen.
Guide
m_seq_pot
PN Sequence Demo
PN_Seq_Demo
Sequence/Family
m-Sequence
Preferred
m-Sequence
Gold Sequence
Gold-like Sequence
Decimation
q
2m 1
2m 1
Period
L
Family Size
N
Cross-correlation
Rc
t(m)
|Rmax |
t(m)
Maximum
Cross-correlation
No. of LFSR
m
-
m
m
L+2
(9)
(8)
t(m)
t(m)
2m 1
2m 1
L+2
s(m)
2m/2
2m 1
2m 1 23m/2 if m = 0(mod4)
2m/2 1
2n/2 + 1 and
2(n+2)/2 + 1
m odd
(optimal set)
m even &
multiple of 4
m even
m even
2(m+1)/2 + 1 , odd m
2(m+2)/2 + 1 , even m
Kasami Sequence
(Small Set)
Kasami Sequence
(Large Set)
Note:
t(m) =
s(m) = 2m/2 + 1
Table 1: Key properties of different sequences.
27
GUI Snapshot
28
B GUI SNAPSHOT
29
30
B GUI SNAPSHOT