Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

CDMA codes and its usage

CDMA codes and its usage


Contents
1 Iterium Standard-95 System 2
1.1 IS – 95 2
2 Pseduo Random Noise Sequence 4
2.1 PN Sequence 4
2.1.1 PN Sequence generation 6
2.1.2 PN Generator Example 8
2.2 Types of PN Sequences in CDMA 9
2.2.1 Short Code 9
2.2.2 Long Code 9
2.2.3 Walsh Code 11
2.3 Correlation Between PN Sequences 12
2.4 Process Gain and Its Benefits 14
2.5 Spreading Code Acquisition and Tracking 16
2.5.1 Initial Code Acquisition 18
2.5.2 Code Tracking 20

1
CDMA codes and its usage

1 Iterium Standard-95 System


1.1 IS-95
Interim Standard 95 (IS -95) is a U.S. digital cellular system based on CDMA that
allows each user within a cell and in adjacent cells to use the same radio channel.
Each IS-95 channel occupies 1.23MHz of spectrum in each one-way link; the user
data is spread to a channel chip rate of 1.2288MHz. IS -95 uses a different modulation and
spreading technique for the forward and reverse links. On the forward link, the base station
simultaneously transmits the user data for all mobiles in the cell by using different
spreading sequence for each mobile. The user data is encoded, interleaved, and spread by
one of sixty-four orthogonal spreading sequences (Walsh functions).
To avoid interference, all signals in a particular cell are scrambled using a
pseudorandom sequence of length 2 15-1 chips.
CDMA base stations transmit information in four logical channel formats:

Pilot channels, sync channels, paging channels, and traffic channels.

On the reverse link, all mobiles respond in an asynchronous fashion. The user data
is encoded, interleaved, and then blocks of 6 bits are mapped to one of the 64 orthogonal
Walsh functions. Finally, the data is spread by a user specific code of 42 bits (channel
identifier) and the base station pseudorandom sequence of length 2 15 chips. The reverse
channel is organized in:

Access channels and traffic channels.

At both the base station and the terminal, Rake receivers are used to resolve and
combine multipath components, in order to improve the link quality.

In IS-95, a three-finger Rake receiver is used at the base station.

2
CDMA codes and its usage

Fig.1

3
CDMA codes and its usage

2 Pseduo Random Noise Sequence


2.1 PN Sequences
• What are PN sequences?
A Pseudo-random Noise (PN) sequence is a sequence of binary numbers, e.g. ±1, which
appears to be random; but is in fact perfectly deterministic. The sequence appears to be
random in the sense that the binary values and groups or runs of the same binary value
occur in the sequence in the same proportion they would if the sequence were being
generated based on a fair "coin tossing" experiment. In the experiment, each head could
result in one binary value and a tail the other value. The PN sequence appears to have
been generated from such an experiment. A software or hardware device designed to
produce a PN sequence is called a PN generator.
Pseudo-random noise sequences or PN sequences are known sequences that exhibit
the properties or characteristics of random sequences. They can be used to logically isolate
users on the same frequency channel. They can also be used to perform scrambling as
well as spreading and despreading functions. The reason we need to use PN sequences is
that if the code sequences were deterministic, then everybody could access the channel. If
the code sequences were truly random on the other hand, then nobody, including the
intended receiver, would be able to access the channel. Thus, using a pseudo-random
sequence makes the signal look like random noise to everybody except to the transmitter
and the intended receiver.
• Why PN sequence is chosen as a noise like waveform?
To know that we have to understand what is called “white Noise”.
The adjective “white” is used in the sense that white light contains equal amounts of all
frequencies within the visible band of electromagnetic radiation.
It has power spectral density independent of the operating frequency. We express the
power spectral density of white noise by
Sw (f) = No/2 ... No = KT0 watts /Hz. where K is Boltzman constant &
T0 is the equivalent noise temperature.
• Equivalent noise temperature of a system “T0”: -
It is the temperature at which a noisy resistor has to be maintained such that, by
connecting the resistor to the input of a noiseless version of the system, it produces the
same available noise in the actual system it depends only on the parameters of the system
Since the auto correlation function is the inverse Fourier of the power spectral density it
follows that for white noise, the auto correlation function of white noise consists of a delta
function weighted by the factor No/2 and occurring at τ = 0.
Accordingly, any two different samples of white noise, no matter how closely together in
time, they are taken, are uncorrelated. So we have to search for a code sequence has a
noise like wave or almost has autocorrelation function near that of white noise.

4
CDMA codes and its usage

Fig.2

5
CDMA codes and its usage

2.1.1 PN Sequence Generation


These sequences are easily generated by using an M-bit linear feedback shift register
with the appropriate feedback taps, e.g. as shown in Fig. For M = 5. With the appropriate
taps, the length (N) of the serial bit stream at the output will be a maximum (Lmax):
N = Lmax = 2M - 1
The meaning of bit-stream length in this context is the maximum length of the bit
sequence before it starts repeating itself. PN sequences of maximum length are called
maximal linear code sequences, but because non-maximal PN sequences are rarely used
in SS systems, “PN sequences” will be used to denote maximal linear code sequences for
this document. Also “PN codes” or “PN code sequences” will be used synonymously with
“PN sequences”. The feedback taps are added modulo-2 (exclusive OR’ed) and fed to the
input of the initial shift register. Only particular tap connections will yield a maximum length
for a given shift register length. These maximal length PN codes have the following
properties:
1. Code balance:
The number of ones and the number of zeros differ by only 1, i.e., there is 1 more one
than the number of zeros. This particularly useful when the channel is AC coupled (no DC
transmission).
2. Autocorrelation:
Using signaling values of ±1, the autocorrelation of a PN sequence has a value of –1 or
all phase shifts of more than one bit time. For no has shift (perfect alignment with itself), the
autocorrelation has a value of N, the sequence length.
3. Modulo-2 addition:
Modulo-2 addition of a PN sequence with a shifted version of itself results in a differently
shifted version of itself.
4. Shift Register States:
The binary number represented by the M bits in the shift register randomly cycle through
all 2M values, except for 0, in successive 2M-1 clocks.

If the value of 0 (all shift register bits are 0) is ever present in the shift register, it will
stay in that state until reloaded with a nonzero value.

6
CDMA codes and its usage

Fig.3

Fig.4

7
CDMA codes and its usage

2.1.2 A PN Generator Example


A PN generator is typically made of N cascaded flip-flop circuits and a specially selected
feedback arrangement. The flip-flop circuits when used in this way are called a shift register
since each clock pulse applied to the flip-flops causes the contents of each flip-flop to be
shifted to the right. The feedback connections provide the input to the left-most flip-flop.
With N binary stages, the largest number of different patterns the shift register can have is
2N. The all-binary-zero state, however, is not allowed because it would cause all remaining
states of the shift register and its outputs to be binary zero. The all-binary-ones state does
not cause a similar problem of repeated binary ones provided the number of flip-flops input
to the modulo-2 adder is even. The period of the PN sequence is therefore 2N -1. For
example, starting with the register in state 001, the next 7 states are 100, 010,101, 110,
111, 011, and then 001 again and the states continue to repeat. The output taken from the
right-most flip-flop is 1001011 and then repeats. With the three-stage shift register, the
period is 23-1 or 7.

Fig.5

8
CDMA codes and its usage

2.2 Types of PN Sequences in CDMA


There are two different types of PN codes and one output of Hadamard Matrix
used in IS-95 CDMA Technology:

1. Short PN code
2. Long PN code
3. Walsh codes
IS-95 uses the two types of maximum-length PN generators to spread the signal power
uniformly over the physical bandwidth of about 1.25 MHz. The PN spreading on the reverse
link also provides near orthogonality of and hence, minimal interference between signals
from each mobile. This allows reuse of the band of frequencies available, which is a major
advantage of CDMA.
2.2.1 Short Code:
A 15-stage linear shift register generates the short PN code. Therefore, the maximum
length of the Short PN Code is
L = 2 N-1 = 2 15-1 = 32,768-1 chips.
By implementation, an extra chip is inserted at the end of the sequence, yielding a
sequence of length L=32,768 chips. The short PN code runs at a speed of 1,228,800 chips
per second. This yields a repetition cycle of 32,768/1,228,800=26.67 ms.
The short PN code consist of two PN Sequences I and Q each 32,768 chips long
generated in similar but differently tapped 15 bit shift register, the two sequences scramble
the information on the I and Q phase channels.
§ These codes are used for cell identification in a reused cell.
§ The chip rate of the short PN code is 1.2288 Mcps.

2.2.2 Long Code:


The PN chips from the long code are used to provide several randomizing functions in
the IS-95 system. These include providing chips for message-scrambling on the forward
and reverse links, for identifying individual mobiles and access channels on the reverse
links by using unique offsets for each entity and for randomizing the location of the power
control bits on the forward traffic channels. A 42-stage linear shift register generates the
long PN code. Therefore, the maximum length of the long PN code is
L = 2 N-1 = 2 42-1 = 4.4 x 1012 = 4.4 trillion chips.
The Long PN Code also runs at a speed of 1,228,800 chips per second. This yields a
repetition cycle of 4.4 x 1012/1,228,800 = 41-42 days.
The long PN code is generated in a 42-stage linear shift register generator with the
output of the 42nd stage input into the first stage and modulo-2 added with the outputs of
stages 1, 2, 3, 5, 6, 7, 10, 16, 17, 18, 19, 21, 22, 25, 26, 27, 31, 33, and 35. The output of
the long code generator is taken after the output of each flip-flop in the generator has been
added with a corresponding bit in a 42-bit mask, which is unique to each user, access, and
paging channel.
§ Base band data scrambling in the forward link
§ Base band data spreading in the reverse link

9
CDMA codes and its usage

Fig.6

Fig.7

10
CDMA codes and its usage

2.2.3 Walsh code:


In 1923, J.L. Walsh introduced a complete set of orthogonal codes, based on rearranging
the Rademacher code. These codes are also binary valued codes.
The Walsh code, also known as the Hadamard code, is a set of 64 orthogonal codes, there
purpose is to provide:
1. Forward channel spreading over the 1.2288MHz band;
2. Unique identification to a mobile.
The chip rate (code rate) of a Walsh code is 1.2288 Mchips per second (Mcps).
The four different types of forward channels are designated as follows:

1. Pilot channel: W0 (Walsh code 0);


2. Paging channel: W1 to W7 (unused paging codes can be used for traffic);
3. Sync channel: W32;
4. Traffic channel: W8 to W31 and W33 to W63.

Fig.8

11
CDMA codes and its usage

2.3 Correlation between PN sequences


The correlation of two random variables x(t) and y(t), is a time-shift comparison which
expresses the degree of similarity or the degree of likeness between the two variables. The
Auto-Correlation function R, provides the degree of similarity between a random variable
x(t) and a time-shifted version of x(t).
Likewise, the cross-correlation function provides the degree of similarity, or the degree of
likeness between a random variable x(t) and time-shifted version of another random
variable y(t). To get the average value of the auto-correlation or cross-correlation, a
normalization by the sequence length L is required.
Consider Ci(t) and the time-shifted version of itself, say C i(t-1)
Ci(t) = 1 0 0 1 1 1 0
Ci(t-1) = 0 0 1 1 1 0 1
When corresponding bits from the two sequences have the same parity (or match each
other), we call the match an agreement "A". Likewise, when corresponding bits from the
two sequences do not have the same Parity (do not match each other), we call the
mismatch a disagreement "D" .By counting all the agreements and all the disagreements
over the full length L of the sequence, a measure of correlation can be estimated as:
Correlation = Total number of "A" - Total number of "D"
Now, consider the reference PN code C i(t) and its time-shifted versions as shown.
Now let us compute the correlation of C i(t) and Ci(t-t), for all suitable values of t (here
from 0 to 7).
In general, it can be shown that the full-length auto-correlation function (R) of PN codes
or PN sequences is characterized by a large positive number equal to the length of the PN
sequence (R=2n-1) when time shift=0, and -1 for all time-shifts equal or greater than the
duration of one chip. So when normalized by the length, the auto-correlation function is
equal to 1 at time-shift zero and is very small (-1/L) for all values of time shifts equal or
greater than one chip.
In summary, the auto-correlation function of PN codes is a two-value function. Its
maximum value occurs when the time-shift parameter is zero. For all other values equal to
or greater than one chip, the correlation function is -1.
• Orthogonality of PN sequences
Consider the reference PN Code Cj(t) and the time-shifted versions of another code Ci(t)
as shown. Let us compute the cross-correlation of Cj(t) and Ci(t-t) for all suitable values of t
(0 to 7).
Two PN sequences Ci(t) and Cj(t) are said to be orthogonal if and only if their respective
normalized correlation function is equal to 1 at a time-shift of zero and their cross
correlation function is equal to zero for all time-shift values. As shown above, averaged
over the code length, the cross-correlation function of PN sequences is not zero. As a
result, PN sequences are not perfectly orthogonal.

12
CDMA codes and its usage

Fig.9

Fig.10

13
CDMA codes and its usage

2.4 Process Gain and its Benefits


The primary benefit of processing gain is its contribution towards jamming resistance to
the DSSS signal. The PN code spreads the transmitted signal in bandwidth and it makes it
less susceptible to narrowband interference within the spread BW. The receiver of a DSSS
system can be viewed as unspreading the intended signal and at the same time spreading
the interfering waveform. This operation is best illustrated on Figure, which, depicts the
power spectral density (psd) functions of the signals at the receiver input, the despread
signal, the band pass filter power transfer function, and the band pass filter output. The
figure graphically describes the effect of the processing gain on a jammer. The jammer is
narrow, and has a highly peaked psd, while the psd of the DSSS is wide and low. The
despreading operation spreads the jammer power psd and lowers its peak, and the BPF
output shows the effect on the signal to jammer ratio.
If for example, BPSK modulation is used and an E b/No of lets say 14dB is required to
achieve a certain BER performance, when this waveform is spread with a processing gain
of 10dB then the receiver can still achieve its required performance with the signal having a
4dB power advantage over the interference. This is derived from the 14dB required minus
the 10dB of PG.
The higher the processing gain of the DS-SS waveform the more the resistance to
interference of the DSSS signal. If a code with a length of 16 bits is to be used then the
processing gain is equivalent to 10 Log[16] dB or 12.04dB.

14
CDMA codes and its usage

We can define GP as:

Where SNRo and SNRi are the output and input SNR of the correlator, respectively.
Where BWD and BWSS are the bandwidth of the data before and after SS modulation.

Fig.11

15
CDMA codes and its usage

2.5 Spreading Code Acquisition and Tracking


No matter which form of spread spectrum technique we employ, we need to have the
timing information of the transmitted signal in order to despread the received signal and
demodulate the despread signal. For a DS-SS system, we see that if we are off even by a
single chip duration, we will be unable to despread the received spread spectrum signal,
since the spread sequence is designed to have a small out-of-phase autocorrelation
magnitude. Therefore, the process of acquiring the timing information of the transmitted
spread spectrum signal is essential to the implementation of any form of spread spectrum
technique. Usually the problem of timing acquisition is solved via a two-step approach:
• Initial code acquisition (coarse acquisition or coarse synchronization), which
synchronizes the transmitter and receiver.
• Code tracking, which performs and maintains fine synchronization between the
transmitter and receiver.
Given the initial acquisition, code tracking is a relatively easy task and is usually
accomplished by a delay lock loop (DLL). The tracking loop keeps on operating during the
whole communication period. If the channel changes abruptly, the delay lock loop will lose
track of the correct timing and initial acquisition will be reperformed. Sometimes, we
perform initial code acquisition periodically no matter whether the tracking loop loses track
or not.
Compared to code tracking, initial code acquisition in a spread spectrum system is
usually very difficult. First, the timing uncertainty, which is basically determined by the
transmission time of the transmitter and the propagation delay, can be much longer than a
chip duration. As initial acquisition is usually achieved by a search through all possible
phases (delays) of the sequence, a larger timing uncertainty means a larger search area.
Beside timing uncertainty, we may also encounter frequency uncertainty that is due to
Doppler shift and mismatch between the transmitter and receiver oscillators. Thus this
necessitates a two-dimensional search in time and frequency. Moreover, in many cases,
initial code acquisition must be accomplished in low signal-to-noise-ratio environments and
in the presence of jammers. The possibility of channel fading and the existence of multiple
access interference in CDMA environments can make initial acquisition even harder to
accomplish.
The problem of achieving synchronization in various fading channels and CDMA
environments is difficult and is currently under active investigation. In many practical
systems, side information such as the time of the day and an additional control channel, is
needed to help achieve synchronization.

16
CDMA codes and its usage

Fig.12

17
CDMA codes and its usage

2.5.1 Initial Code Acquisition


As mentioned before, the objective of initial code acquisition is to achieve a coarse
synchronization between the receiver and the transmitted signal. In a DS-SS system, this is
the same as matching the phase of the reference-spreading signal in the despreader to the
spreading sequence in the received signal. We are going to introduce several acquisition
techniques, which perform the phase matching just described.
• Acquisition strategies
Serial search
The first acquisition strategy we consider is serial search. In this method, the acquisition
circuit attempts to cycle through and test all possible phases one by one (serially) as shown
in Figure.
The circuit complexity for serial search is low. However, penalty time associated with a
miss is large.
Therefore we need to select a larger integration (dwell) time to reduce the miss
probability. This, together with the serial searching nature, gives a large overall acquisition
time (i.e., slow acquisition).

Fig.13

18
CDMA codes and its usage

Parallel search
Unlike serial search, we test all the possible phases simultaneously in the parallel search
strategy as shown in figure. Obviously, the circuit complexity of the parallel search is high.
The overall acquisition time is much smaller than that of the serial search.

Fig.14

19
CDMA Air Interface Overview

2.5.2 Code Tracking


The purpose of code tracking is to perform and maintain fine synchronization. A code-
tracking loop starts its operation only after initial acquisition has been achieved. Hence, we
can assume that we are off by small amounts in both frequency and code phase. A
common fine synchronization strategy is to design a code tracking circuitry, which can track
the code phase in the presence of a small frequency error. After the correct code phase is
acquired by the code tracking circuitry, a standard phase lock
Loop (PLL) can be employed to track the carrier frequency and phase. In this section, we
give a brief introduction to a common technique for code tracking, namely, the early-late
gate delay-lock loop (DLL).

Fig.15

20

You might also like