Introduction To CDMA and PN-Sequence

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 33

Topics

• Multiple Access Techniques


• Introduction to CDMA
• The key Operations in CDMA
• Spreading Codes or Orthogonal Codes
• Comparison of BW required for Ordinary Wireless System and
CDMA system
• Pseudo-random Sequence (PN sequence)
• Linear Feedback Shift Register
• Properties of PN-sequence
• Balanced Property
• Run length Property
Multiple Access Techniques
• FDMA
• TDMA
• CDMA
Code Division Multiple Access (CDMA) – cont.
1) Introduction
Do not confuse
CDMA (conflict-free) Frequency
with
CSMA (contention-
based)

User 1
User 2
CSMA = carrier sense
multiple access ...

User n
Time

Code
• Separate (unique) code per user
• Code sequences are orthogonal
=> different users can use same frequency simultaneously (see Fig above)
• Some 2G systems use CDMA / Most of 3G systems use CDMA
Frequency f ’ Frequency f
Structure of a CDMA MS #1 C1 ’ C1
System (with FDD)
MS #2 C2 ’ C2



MS #n Cn’ Cn

Reverse channels
BS
Forward channels
(Uplink) (Downlink)
Notes:
1) FDD (frequency division duplexing ) since f for all forward
channels, and f’ for all reverse channels
2) Ci = ith code
3) Ci’ x Cj’ = 0, i.e., Ci’ and Cj’ are orthogonal codes on f’
Ci x Cj = 0, i.e., Ci and Cj are orthogonal codes on f
Two Implementation Methodologies for CDMA

a) DS = direct sequence

b) FH = frequency hopping
- same frequency for all forward and all reverse
channels
Direct Sequence Spread Spectrum DSSS
 Concept of DSSS for CDMA
 Pseudorandom sequence c(t) phase-modulates original signal s(t), producing m(t)

 m(t) occupies broader bandwidth & has lower peak power than s(t)

 Results in better resistance to interference

Transmitter Receiver
Spreading De-
Original spreading Recreated
spread signal
digital signal m(t) digital signal
s(t) s(t)

Power Power Power


Code Code
c(t) c(t)

Frequency Frequency c(t) is Frequency


Synchronized!
Introduction to Code Division Multiple Access (continue..)

The Key Operations in CDMA

Multiplying with code


Combining signals of all the users
Correlating with the code
Introduction to Code Division Multiple Access (continue..)
• Let we transmit two symbols a0 to user 0 • We take a0 symbol and multiply it by
and a1 to user 1, and instead of its code which will give the sequence
transmitting these symbols directly we as shown, which corresponds to user
multiple these symbols with codes. 0

user 0  a 0 , a 0 , a 0 , a 0 
• The codes are nothing but the sequences
such as [1, 1, 1, 1]
• For user 0
• we write a code of length four symbols
and we call this code (C0) [1, 1, 1, 1]. • Now we take a1 symbol and multiply
• For user 1 by its code which will give the
sequence as shown, which
• For user 1 will write a different code C1 i.e. corresponds to user 1
[1,-1,-1, 1] and we call this code as C1.
user 1  a1 , a1 , a1 , a1 
Introduction to Code Division Multiple Access (continue..)

• Transmitted Signal
• Now, we add up the two signals corresponding to
the two users (i.e. user 0 and user 1)
Introduction to Code Division Multiple Access (continue..)

• Received Signal at user 0


• At the receiver i.e. at user 0, we again multiply the tx signal with the
spreading sequence or code C0 [1, 1, 1, 1] of user 0 as shown below.
The multiplication operation is also known as correlation
The interference in the net signal due to
symbols a1 is magically removed from the
net signal by multiplying it with the
spreading sequence of a0 and we get 4a0
which corresponds to user 0 scaled by 4.
The multiplication operation is also known
as correlation. At user 0 we correlate with
his code C0 and able to recover the symbol
a0
The net signal at user 0 = 4a0+0
Introduction to Code Division Multiple Access (continue..)

• Received Signal at user 1


• At the receiver i.e. at user 1, we again multiply the above with the
spreading sequence or code C1 [1, -1, -1, 1] of user 1 .

The interference in the net signal due to


symbols a0 is magically removed from the
net signal by multiplying it with the
spreading sequence of a1 and we get 4a1
which corresponds to user 1 scaled by 4. At
user 1 we correlate with his code C1 and
able to recover the symbol a1

The net signal at user 1 = 4a1+0


Spreading Codes or Orthogonal Codes
• Why Spreading Codes
• When we correlate code 0 (C0) at user 0 it is
orthogonal to code 1 (C1) and the interference
component goes away to zero and we are able
to recover symbol corresponding to user 0.
• Also we correlate code 1 (C1) at user 1 which is
orthogonal to code 0 (C0) and the interference
component goes away to zero and we are able
to recover symbol corresponding to user 1.
• Hence, this Orthogonality of codes is Key to
• If two vectors have dot product 0 then we CDMA i.e. we employ codes which are
call those vectors orthogonal. orthogonal to each other so that we recover
• Hence, these codes are in fact orthogonal, the signal corresponding to each user. Such
and that is the reason we are able to codes are named as SPREADING CODES
recover the symbols corresponding to these
codes. The code employed for user 0 is
orthogonal to the code employed by user 1.
Spreading Codes (continue…)
• Let we look at the other spreading Hence, any two codes from C0, C1 , C2 and C3
codes of N=4, These are Set of 4 are Orthogonal, and we can use C0, C1 , C2 and
Codes, and Orthogonal to each C3 to transmit streams of information for 4
other users (i.e. user 0, user 1, user 2, user 3).
If the Number of Orthogonal Codes
corresponding to length N is N, then we can
multiplex N users. It is because we can transmit
one information stream per code and can
transmit N orthogonal codes, and hence, can
transmit N streams of information.
If the N=4, we can support 4 users, if N=16 , we
can support 16 users, if N=1024, we can support
1024 users. So if we want to support more users
over the same channel then we have to increase
the code length ,hence CDMA can adaptively
support the increasing number of users on the
• Now we take the two codes as shown wireless channel by increasing the code length,
below, and compute the dot product hence we can have more and more orthogonal
codes to support more and more users.
Bandwidth Required for Ordinary Wireless Vs CDMA
systems (continue..)
• In case of ordinary wireless system we had
BW of 1KHz corresponding to 1Kbits/s,
• In case of CDMA system we multiply a0 with
the chiping sequence (i.e. the code which is
[1,1,1,1], which results in increasing the BW
from 1KHz to 4KHz.
• Hence, due to multiplication with the code
did spread the BW of the signal. and due to
this phenomenon the CDMA is known as
SPREAD SPECTRUM TECHNOLOGY,
• And the codes C0, C1,……….. which spread
the BW are known as SPREADING CODES.
Pseudo-random Sequence (PN sequence)
.
• Let we have a look one a typical
code as shown, it looks
approximately like a random
sequence of +1, -1 as shown.
• As this codes looks like a
random sequence hence it is
called a Pseudo random
sequence or Pseudo Noise or
PN sequence (i.e. it is not
exactly random and neither
exactly noise, hence, it known
as Pseudo Noise or PN
sequence )
Linear Feedback shift Register (LFSR)
A technique to generate PN-sequences of Now we combine X(i-3) and X(i-4)
longer length (i.e. the longer length is linearly and feedback to X(i). Hence
used to support a large number of users)
is known as Linear Feedback shift these are known as Linear Feedback
Register (LFSR). Shift Register (LFSR). Here, the
The term register mean a Delay combining is a Binary combining
Element. which is known as a Binary addition
Let we have a sequence of four Delay in the field two (i.e. it is also known
Elements as shown, and we have input as the XOR operation)
Xi, then after one register (D) (i.e one
delay), it becomes X(i-1), after one more
delay D we have X(i-2), at the third
register we have X(i-3), and at 4th register
we have X(i-4).
We have a set of shift registers ( 4
registers), and are also called a chain of
registers.
Linear Feedback shift Register (LFSR) (continue..)
XoR operation The XOR operation is something like
LFSR works on the principle of parity, if it has odd parity then
XOR operation as shown output is 1 and if even parity then the
output is 0.

Xi  Xi3  Xi4
Linear Feedback shift Register (LFSR) (continue..)
Now we look at the Operation of Pseudo Noise Sequence or PN-sequence
the LFSR implementing the below by LFSR
Feed-Back equation, by a table as
shown
Xi  Xi3  Xi4

• Number states is defined by the


following formula
The number of states  2D  1

• (in the case D=4, the number of


states is 15)
Properties of the PN-Sequences
Balanced property….. Property 1
• The PN-Sequence that was generated can be shown by the X(i-4) state in
the above table

• Now we map the above sequence to a voltage level either +1 or -1. We map 1 to a -1
and 0 to a +1 , and hence, we will have the code as shown by the blue color below
Linear Feedback shift Register (LFSR) (continue..)
Balanced property….. Property 1
The no of -1 ones and the no of
Now let we look at the properties +1ones are approximately equal
of this code and we count the except that the no of -1ones is one
number of -1 ones an +1 ones. more than the no of +1ones.
The number of -1ones is 8 (i.e.  As the number of -1ones in the code
there are 8 (-1) in this code), and is always one greater than the
the number of +1 ones is 7 (i.e. number of +1ones in the code, hence
there are 7(+1) in the code). this property of PN-sequence is
called as Balanced Property
Property 2 (Run Length Property)

• Property 2 is also as a Run Length Property.


• A Run is any string of continuous values. For instance, if we have string of
1111 that will be called one Run or if we have a continuous value of -1-1-1-1
that will called a Run too.
• Now let have a look of the Runs in the below PN-Code (i.e. strings of +1 and -1
ones) as shown below
Property 2 (Run Length Property) (continue…)
• There are total 8 Runs in the Out of 8Runs , one run is of length four, one
above PN-code run is of length three, two runs of length
• 1st Run is of length [-1-1-1-1] two, 4 runs of length 1
Summary
• 2nd run is of length [1 1 1]
• ½ runs are of length 1
• 3rd Run is of length [-1]
• ¼ runs are of length 2
• 4th Run is of length [1 1] • 1/8 runs are of length 4
• 5th Run is of length [-1 -1] • Hence, the above is called Run Length
• 6th Run is of length [1] Property of the PN-Sequence
• 7th Run is of length [-1]
• 8th Run is of length [1]
3. Correlation
Consider an n-bit binary sequence b1 b2 b3 ………… bn. We can
write this binary sequence in matrix form as
[ B ] = [ b1 b2 b3 …………. bn ] and the shifted matrix

[ B ]1 = [ bn b1 b2 b3 ………. bn-1] and [ B ]2 = [ bn-1 bn b1 b2 b3 …….. bn-2]


Now if [ C ]n = [ B ] (*) [B]n
The correlation fulfilled when all [C] m matrixes are balanced for all
values of m (from m=1 to n-1)
Example:
Evaluate the 15-bit spreading code “ 100110101111000 “ for balance,
run property and correlation.

solution

Balance: the code has eight “1”s and seven “0”s. Balance is achieved.

Run property: the code has two one bit run of “1”s and two one bit run of “0”s ,
One two bit run of “1”s and one two bit run of “0”s , no three bit run of “1”s
and one three bit run of “0”s, one four bit run of “1”s and no four bit runs of “0”s.
Correlation:
[B] = [ 1 0 0 1 1 0 1 0 1 1 1 1 0 0 0 ]
[B]1 = [ 0 1 0 0 1 1 0 1 0 1 1 1 1 0 0 ]
[C]1 = [ 1 1 0 1 0 1 1 1 1 0 0 0 1 0 0 ]

[B] = [1 0 0 1 1 0 1 0 1 1 1 1 0 0 0 ]
[B]2 = [ 0 0 1 0 0 1 1 0 1 0 1 1 1 1 0 ]
[C]2 = [ 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 ]

We notice that [ C]1 and [c]2 are balanced, if we continue


we find all other C’s matrixes are balanced. So correlation is fulfilled
Bandwidth Required for Ordinary Wireless Vs CDMA
systems
• BW required for Ordinary System BW required for CDMA System
2) Frequency Hopping Spread Spectrum
This is frequency hopping technique, where the users are made to change the frequencies of
usage, from one to another in a specified time interval, hence called as frequency hopping.
 Concept of FHSS for CDMA
 Pseudorandom hopping pattern sequence changes frequency of digital radio signal across broad
frequency band in random way
 Radio emitter freq. hops frequently channel to channel in predetermined pseudorandom way

 m(t) occupies broader bandwidth & has lower peak power than s(t)

Transmitte Receiver
r
Spreading De-
spreading Recreated
Original Xmit (“dehopped”)
digital signal spread signal digital signal

Power Hopping pattern Power Hopping pattern Power

Hopp. patt.
Synchro-
nized!
Frequency Frequency Frequency
An Example of Frequency Hopping Pattern

Frequency

Time
Frequency hopping spread spectrum (FHSS)
Frequency selection in FHSS
First–hop frequency
Comparison between FHSS and DSSS/CDMA
Both the spread spectrum techniques are popular for their characteristics. To
have a clear understanding, let us take a look at their comparisons.

FHSS DSSS / CDMA


Multiple frequencies are used Single frequency is used
Hard to find the user’s frequency at any User frequency, once allotted is always the
instant of time same
Power strength of the signal is high Power strength of the signal is low
Stronger and penetrates through the
obstacles It is weaker compared to FHSS

It is never affected by interference It can be affected by interference


It is cheaper It is expensive
This is the commonly used technique This technique is not frequently used
FHSS DSSS / CDMA
Multiple frequencies are used Single frequency is used
Hard to find the user’s frequency at any User frequency, once allotted is always the
instant of time same
Power strength of the signal is high Power strength of the signal is low
Stronger and penetrates through the It is weaker compared to FHSS
obstacles
It is never affected by interference It can be affected by interference
It is cheaper It is expensive
This is the commonly used technique This technique is not frequently used

You might also like