You are on page 1of 15

Experiment 1

Spreading and dispreading using PN sequence in MATLAB


Maximum Length PN sequences (m-sequences):Spread spectrum communication is a new theory and modulation technique, and different
from the conventional communication system. A good correlation property and large linear
period of Pseudo-random sequence is the basis of spread spectrum communication systems
intern CDMA (code division multiple access communication systems).
There are several techniques by which spread spectrum can be implemented. One technique
is called direct-sequence and the other technique is a PN (pseudo-noise) code which exhibits
random-like properties which are necessary for providing good spectral characteristics and
security.
Maximum Length PN sequences are binary sequence generators that are capable of
outputting all possible combinations of binary sequences in 2m1 cyclic shifts, where m is
the size of the LFSR (Linear Feedback Shift Registers ) used in generating such sequences.
Terms like Pseudorandom binary sequences (PRBS) or pseudo noise sequences are also used
to refer m-sequences.

Primitive Polynomials
A generator polynomial is said to be primitive if it cannot be factored (i.e. it is prime), and if
it is a factor of (i.e. can evenly divide) XN+1, where N=2m1 (the length of the m-sequence).
For example, if we wish to construct a m-sequence generator using 3 registers (m=3), then
the primitive polynomial that determines the feedback connection can be determined as
follows.
= 2 1
X7+1=(X3+X+1)(X3+X2+1)

Since the number of registers are m=3, we have to chose a primitive polynomial that is of
degree

3.

MECE 205

From

the

above

equation

we

have

two

choices

for

m=3,
Page 1

ie. (x3+x+1) and (x3+x2+1). These polynomials are often represented as [3 1 0] and [3 2 1]
respectively.

Modulo 2 adder

Flip-flop
S0

S1

S2

Output sequence

Clock

Fig 1:- Linear feedback shift register for PN code generation

Spreading and De-spreading Using PN-Sequence:-

Fig 2:- Architecture of spreading and dispreading

Spreading:

A pseudo-random code is generated, different for each channel and each connection

The information data is spread by a pseudorandom code

The resulting signal modulates a carrier

BPSK-signal has a 180- degree phase shift when the output of the multiplication
changes

De-spreading:

A pseudo-random codeis generated, matching the anticipated signal

MECE 205

Page 2

The receiver acquires the received code and phase locks its own code to it

The received signal is correlated with the generated code, extracting the information
data

MATLAB Code

MECE 205

Page 3

Output

Fig 3:- Spreading and dispreading of binary signal using PN codes

MECE 205

Page 4

Experiment 2
Autocorrelation of PN sequence using MATLAb
Autocorrelation
Autocorrelation is a measure of the similarity between a sequence and its time-shifted
sequences. It can be used to predict the start of a PN sequence by detecting the peak.
For CDMA based systems, autocorrelation is used in selecting sequences which gives the
least probability of false synchronisation.
Autocorrelation function of an m-sequence is periodic and two-valued. If we transform the
binary sequence into bipolar sequence by replacing each 0 by +1 and each 1 by -1.

MATLAB Code

MECE 205

Page 5

Output

Fig 4:- Autocorrelation of PN sequence

MECE 205

Page 6

Experiment 3

BER plot for BPSK modulation scheme using MATLAB


BINARY PHASE SHIFT KEYING (BPSK)
BPSK (also sometimes called PRK, phase reversal keying, or 2PSK) is the simplest form of
phase shift keying (PSK). It uses two phases which are separated by 180 and so can also be
termed 2-PSK. It does not particularly matter exactly where the constellation points are
positioned, and in this figure they are shown on the real axis, at 0 and 180. This modulation
is the most robust of all the PSKs since it takes the highest level of noise or distortion to
make the demodulator reach an incorrect decision. It is, however, only able to modulate at 1
bit/symbol (as seen in the figure) and so is unsuitable for high data-rate applications.
In the presence of an arbitrary phase-shift introduced by the communications channel, the
demodulator is unable to tell which constellation point is which. As a result, the data is
often differentially encoded prior to modulation

Fig 5:- Constellation diagram of BPSK


MECE 205

Page 7

MATLAB Code

MECE 205

Page 8

Output

Fig 6:- BER Plot of BPSk modulation

MECE 205

Page 9

Experiment 4

Spread spectrum in BPSK using MATLAB


Spread spectrum
In telecommunication and radio communication, spread-spectrum techniques are
methods by which a signal (e.g. an electrical, electromagnetic, or acoustic signal)
generated with a particular bandwidth is deliberately spread in the frequency domain,
resulting in a signal with a wider bandwidth. These techniques are used for a variety
of reasons, including the establishment of secure communications, increasing
resistance to natural interference, noise and jamming, to prevent detection, and to
limit power flux density (e.g. in satellite downlinks)

Fig 7:- Block diagram of spread spectrum communication system

Input is fed into a channel encoder Produces analog signal with narrow bandwidth Signal
is further modulated using sequence of digits Spreading code or spreading sequence
Generated by pseudonoise, or pseudo-random number generator Effect of modulation is to
increase bandwidth of signal to be transmitted.
MECE 205

Page 10

MATLAB Code

MECE 205

Page 11

Output

Fig 8:- BPSK using PN Sequence


MECE 205

Page 12

Experiment 5

CDMA Spread Spectrum using MATLAB


CDMA Spread Spectrum
CDMA stands for Code Division Multiple Access. It is a digital cellular technology that uses
spread-spectrum technique means it works by digitizing multiple conversations. It is
developed by Qualcomm, Inc. and standardized by the Telecommunications Industry
Association (TIA) as an Interim Standard (IS-95). In this several users share the share the
same physical medium i.e. same frequency band at same time
CDMA is a modulation and multiple access scheme based on the spread-spectrum
communication technology. Individual terminals use spread-spectrum techniques and
occupy the entire spectrum whenever they transmit.

Users share time and frequency allocations, and are channelized by unique assigned
codes

Signals of different users are separated at the receiver by using a correlator that
captures signal energy only from the desired user or channel

Undesired signals contribute only to noise and interference

Fig 9:- CDMA IN DSSS


MECE 205

Page 13

MATLAB Code

MECE 205

Page 14

Output

MECE 205

Page 15

You might also like