You are on page 1of 63

CONTENT

CHAPTER SUBJECT PAGE NO.


CHAPTER ONE OVERVIEW 1
CHAPTER TWO CDMA FUNDAMENTALS 6
CHAPTER THREE SPREADING AND MODULATION 15
CHAPTER FOUR TRANSMITTER AND RECEIVER 32
CHAPTER FIVE SIMULATION 38
CHAPTER SIX RESULT, PERFORMANCE ANALYSIS AND 48
DISCUSSION
REFERENCES 54
APPENDIX 56
CHAPTER ONE

OVERVIEW

1.1 INTRODUCTION TO WIRELESS COMMUNICATION

Universal communication continues to be the goal of telecommunication companies


worldwide. In order to provide huge coverage, service providers must eliminate the wire lines
that keep users focused to a stationary network. Wireless communication is the solution to
eliminating fixed physical media for communications. Here communication takes place
regardless of location constraints.

The global wireless communication market is booming. There are almost 500 million users
worldwide and should be nearly 1 billion within few years. So its a very challenging field to
discuss. But several constraints must be considered. Communication noise, limited
transmission band, multipath effect, interference of other signals is the main topics here. So a
reliable wireless system design is a vital factor to provide seamless services to the subscribers
here.

1.2 INTRODUCTION TO CDMA

An ideal wireless system provides a unified bandwidth-on-demand platform to support a high


user population with mixed traffic and different quality-of-service requirement. Among many
multiple access strategies developed so far, Code Division Multiple Access (CDMA) has
emerged as a major scheme for current PCS system. Now it is considered as a final candidate
for the air interface of the third generation (3G) universal wireless personal communication
network planned for the current century.

If we divide total wireless evolution in four generation then it looks like follows:

1st generation: Voice. (AMPS, D-AMPS)


2nd generation: Voice, Message. (GSM)
3rd generation: Voice, Message, e-mail. (DS-CDMA, EDGE)
4th generation: Voice, Message, e-mail, audio, video and other multimedia
Services. (MC-CDMA, CDMA2000)

The generations are best plotted as follows-

Figure 1.1 Comparison of various mobile generations.

In first generation only voice was considered. So two analog system AMPS and DAMPS were
sufficient. As time progress 2nd generation system GSM came but still data is low rate. Now
3rd generation in wireless system is continuing .So at present and recent future many high
scaled data like video and e-mails needs to be transferred. As data needs to be transferred at
high rate through limited transmission bandwidth, an alternative wireless system needs to be
design. CDMA plays an important role to high speed data transfer by reusing the frequency
band. Comparison of different mobile systems with respect to active users and frequency
reuse capability is shown in the following chart:

2
Figure 1.2 Bandwidth and frequency reuse comparison.

From the above figure it is clear that CDMA can bear large load than others. Again a
frequency band can be used in each cell in CDMA.

1.3 IMPORTANCE OF CDMA

At first generation analog system Advanced Mobile Phone System (AMPS) used
FDMA.
Here voice can be transmitted through dividing the total frequency in to several cells. When
digital system came then it used both TDMA and FDMA. Here frequency band is further
divided into time slots. As transmission frequency band is limited so a fixed amount of user
can communicate at a time. For additional users call fail occurs. As CDMA can reuse
frequency by coding theory it can handle additional user load.

3
CDMA can offer 7 to 10 times the capacity of analog technologies and up to 6 times the
capacity of digital technologies such as TDMA.

As the entire user can use total frequency at a time, data speed of CDMA system is several
times higher than previous one. CDMA provides 144 Kbps speed for mobile users and 2
Mbps for stationary users.

Again CDMA provides a solution to multipath effect. Multipath effect means when a signal is
transmitted then it can traverse several paths. So a delay is associated with every multipath
component. In CDMA system by designing a RAKE receiver properly multipath components
can be resolved.

Although all the user use same frequency band, their transmittable signals are
Separated by users unique code. So interference in CDMA is low.

Power management is an important matter in CDMA system. Less power is needed here than
others because of large bandwidth. So life time of battery of mobile set is much higher.

Finally CDMA allow soft handoff. Soft handoff means a station cant release a
Connection before accepting by other station. So probability of call drop in hand over places
is very low.

4
Day by Day progress of CDMA technique is shown in the following graph.

Figure 1.3 Evaluation of CDMA.

1.4 OBJECTIVES OF THE PROJECT

Total story of this project is divided into two steps:

1. Development of a CDMA wireless communication model that will be


Supported by the IS-95 standard.
2. Analysis of performance of CDMA system for different parameters.

For performance analysis simulation has been performed in MATLAB

5
CHAPTER TWO

CDMA FUNDAMENTALS

2.1 INTRODUCTION

Multiple access means participating more than one user in any job at a time. There are three
multiple access techniques that are FDMA (Frequency Division Multiple Access), TDMA
(Time Division Multiple Access) and CDMA (Code Division Multiple Access).The relative
comparison of these three and details of CDMA are described here.

2.1.1 Frequency Division Multiple Access (FDMA)

Figure 2.1 Frequency Division Multiple Access

In FDMA total transmission bandwidth is divided into some fixed sized cells. These cells are
further divided into sub-cells. Frequency of a cell is divided into two links: uplink and
downlink frequencies. Here a frequency is allocated to the user to communicate. User
transmits the modulated signal modulating by this carrier frequency. It is analogous to a hall
room where several couples conversed to each other by making small sub-rooms in the hall
room.

6
2.1.2 Time Division Multiple Access (TDMA)

Figure 2.2 Time Division Multiple Access

In TDMA many users communicate to each other by dividing transmission time into some
time slots. Users at present use time slots sequentially. In this case uplink and downlink
frequencies need not been separated. Different time slots are specified for incoming and
outgoing data.

In TDMA communicating number of users are fixed at a specific time. So there is a


possibility of call drop in TDMA if additional load arises. A digital mobile system
Global System for Mobile (GSM) use TDMA .It is analogous to a hall room where a couple
enters first and conversate for a specific time and then another couple participate. After
completing a time slot round first couple again enters the hall room.

2.1.3 Code Division Multiple Access (CDMA)

Figure 2.3 Code Division Multiple Access

7
In CDMA all the subscribers use the same large frequency band and it is the main power of
CDMA. With Code Division Multiple Access, network stations transmit continuously and
together on the same frequency. For each user in CDMA, there is a unique signature code that
consists of a binary sequence. Interference between the transmissions of different users is
resolved by the signature code. It is analogous to hall room where all couples can speak
together by using different languages.

2.2 SPREAD SPECTRUM

Spread spectrum (SS) was initially developed for military anti-jamming communications in
the mid-1950. It has since found a wide range of applications in commercial wireless systems.
The underlying idea of spread spectrum is to spread a signal over a large frequency band and
transmit it with low power per unit bandwidth.
Following figure shows comparison of spread spectrum signal compared to traditional
communication system.

Figure 2.4 comparison of spread spectrum signal and traditional Communication system.

8
Among many possible ways of spreading the bandwidth, the two predominant types are as
follows:

1. Direct Sequence (DS).


2. Frequency Hopping (FH).

2.2.1 Direct Sequence Spread Spectrum (DSSS)

Figure 2.5 DS- spread spectrum modulator.

DS spread spectrum achieves band spreading by modulating the information symbol stream
with a higher rate chip sequence. Each symbol of duration Ts is spread into multiple chips of
duration Tc < Ts. The bandwidth expansion factor L,

L = Ts / Tc
Determines the amount of redundancy infected during modulation. L is often called the
spread factor or the processor gain. Having a spreading factor L spectrum is spreaded L

9
times than symbol spectrum. Spreading the spectrum take place by multiplying each symbol
information by its chip sequence.

Mathematically, the spread spectrum modulated signal can be expressed as:

X (t) = S (k) Wk (t - kT)


k=-
Where,
S (k) = kth symbol of information stream
Wk (t) = spreading waveform or signature waveform for kth symbol.

This chip sequence is further expressed as follows:


L
Wk (t) = Ck (i) p (t - iTc + Tc)
i=1

Where,
C (i) = each chip of spreading waveform.
P (t) = chip pulse shaping filter.
After spreading, the chip sequence is usually shaped by this filer P (t), to limit the bandwidth
of the output.

A block diagram of spread spectrum is shown bellow:

Figure 2.6 block diagram of spread spectrum

10
At the receiver end spreading waveform plays main role of user detection and reconstruction
of original symbol stream. In DS-SS spreading factor L has an important effect on CDMA
system. Because

1. L measures the degree of freedom of the system.


2. Received power is reduced by a factor of L.
2.2.2 Frequency Hopping Spread Spectrum (FH-SS)

Instead of using the code sequences to spread the signal in the time domain, frequency-
hopping spread spectrum transmits information through L possible frequency bands based on
an index provided by the codes.

In particular, an FH spread spectrum signal can be modulated as follows:


L
S (t) = Ck (i) ej2 (i-1) ft S (k) p (t-kT)
i=1

Where binary code, {Ck (i)} that is a set of {0, 1} determines at which frequency the
information is transmitted. The frequency pattern is designed to vary with time, as illustrated
in the following figure:

Figure 2.7 Time varying spectral pattern of an FH spread spectrum signal.

11
Where the shaded area denotes the frequency bins through which the information is
transmitted at a given time for a given symbol. If only a single carrier frequency is used on
each hop, the data modulation is called single channel modulation.

Frequency hopping may also be classified as fast or slow. Fast frequency hopping occurs
when the hopping rate equals or exceeds the symbol rate, whereas Slow frequency hopping
implies that many symbols ate transmitted in the time interval between frequency hops.

2.3 STRUCTURE OF CDMA BASED ON IS-95

Total CDMA structure has been divided into two channels that is
Forward channel and Reverse channel
The inside structure of these two channels are almost same but reverse. Definition of these
two channels is given bellow.

2.3.1 Forward and Reverse Channel

A forward channel is a link through which the network / base station transmits a signal to the
mobile user. A reverse channel is a link through which a mobile user transmits a signal to the
base station. These two channels are graphically shown bellow:

Figure 2.8 Forward Channel

12
Figure 2.9 Reverse Channel

The block diagram of the forward channel is shown bellow:

Last three blocks is the main region of interest of this thesis and will be discussed in the next
chapter. But a short note on the first twos is given in this chapter.

2.4 DIGITIZATION

Digitization is used for coding the analog voice signal to digital signal .The technique applied
here is called vocoding. This allows compression of the signal to occur at the same time.

The specific vocodor employed in IS-95 is not defined in specification. IS-96-A defines the
vocoding standard for CDMA.

2.5 ERROR CORRECTING APPROACH

This step includes following three steps:

13
2.5.1 Convolutional Encoder

Convolutional coding encodes the incoming bit stream of information, thus allowing the
receiver to correct the errors at the receiver and an improvement in communication reliability.
Alternatively, for a fixed communication reliability level, Convolutional coding allows a
lower power transmitter in the system.

2.5.2 Repetition

User data entering the system enters at a slower rate. The output of the block interleaver is
fixed at 19.2 Kbps; hence, the repeater repeats the data to achieve the fixed bit rate. For
example, if the user data rate was at 9.6 Kbps, the data would be repeated twice to achieve
19.2 Kbps at the output of the interleaver.

2.5.3 Block Interleaving

The Convolutional encoder / decoder corrects short burst of error in bit stream easily.
However, it is unable to correct long burst of errors in the bit stream through the channel. A
block interleaver rearranges the order of the bits in the bit stream. During transmission, if a
long burst of errors occurs in the bit stream, at the receiver, a block deinterleaver will
rearrange the bit stream into its original sequence. During this process, the long burst of errors
will appear on the Convolutional encoder as short burst of error. The Convolutional decoder
can now correct the errors.

14
CHAPTER THREE

SPREADING AND MODULATION

3.1 INTRODUCTION

Spreading and Modulation are two important part of CDMA system. The purpose of
spreading is necessary to increase the bandwidth and the purpose of modulation is to efficient
transmission of spreaded signal.

3.2 SPREADING

Spreading is done by multiplying the input bit stream with a CDMA code. It is math
mathematically expressed as-

X (t) = a (t) * s (t)

Where,
X (t) = spreaded signal.
a (t) = CDMA code.
s (t) =input stream.

There are different types of CDMA code that are mentioned bellow-

1. Binary Maximal-length sequence.


2. Gold sequences.
3. Orthogonal Gold sequence.
4. Orthogonal cyclic shift m-sequence.
5. Kasami sequences.
6. Walse code.
Among these Walse code is used here for spreading.

15
3.2.1 Walse Code

The walse code is calculated from a special type of matrix called walse matrix. Each row of
this matrix corresponds to a walse code and each code is unique. Each code is a sequence of 1
and -1. These 1 and -1 are called chips of walse code. A walse matrix contains one row of all
ones and the remaining rows each have equal number of ones and minus ones. Walse code
also called Hadamard code.

IS-95 CDMA system uses a 64 X 64 walse matrix for walse code generation. So 64 walse
codes are generated from the following walse matrix:

Figure 3.1 Walse Matrix

16
Each walse code consists of 64 chips. Each CDMA user is assigned a walse code for
spreading his bit stream. So only 64 users is possible in this system.

Walse code can be generated using following function:

Where,

____
Where n is a power of two and Wn is the information of Wn such that 1 becomes - 1 and -1
becomes 1.

3.2.2 Properties of Walse Code

Orthogonality of each pair of Walse code is an important property that makes it popular for
CDMA encoding and decoding. This property indicates that bit wise multiplication and
summation of each pair of Walse code is zero. This is expressed mathematically as follows:
i=m
Wa, i * Wb, i = 0
i=1
Where,

17
Wa, i = ith chip of as Walse code.
Wb, i = ith chip of bs Walse code.

Example: (1 -1 1 -1) * (1 1 -1 -1) = (2 2 2 + 2) = 0

If two same walse code is bit wise multiplied and summed then result is number of chip in
that code. Again if a code is bitwise multiplied and summed with negation of code then result
is same as previous but negative signed. These are expressed mathematically as follows:
i=m
Wa, i * Wa, i = m
i=1

and
i=m
Wa, i * Wa, i = - m
i=1

3.2.3 Pseudorandom Noise (PN) Sequences

There are two types of PN codes-

Short PN code and Long PN code

These two are generally used for scrambling of spreaded bits. Scrambling means
encryption of bit stream making it noise like. Scrambling is different from spreading because
no bandwidth expansion occurs here. Uplink scrambling codes maintains separation among
different mobile stations. Short PN codes are recommended for base stations equipped with
advanced receivers employing multi-user detection or interference cancellation.

PN sequences are generated by combining the outputs of feedback resisters. A feedback shift
register consists of consecutive twostage memory or storage stages and feedback logic.
Binary sequences are shifted through the shift register in response to clock pulses. The

18
contents of the stages are logically combined to produce the input to the first stage. The initial
contents of the stages and feedback logic determine the successive contents of the stages. A
feedback shift register and its output are called linear when the feedback logic consists
entirely of modulo-2 adders.

Modulo-2 adder perform the following mathematical function-

Figure 3.2 Modulo-2 adder

To demonstrate the properties of a PN sequence, we consider a linear feedback shift register


that has a four-stage register for storage and shifting, a modulo-2 adder, and a feedback path
from adder to the input of the register. It is best shown in the following figure-

Figure 3.3 feedback shift register

19
The operation of the shift register is controlled by a sequence of clock pulses. At each clock
pulse the content of each stage in the register is shifted by one stage to the right. Also, at each
clock pulse the contents of stages X3 and X4 are modulo-2 added and the result is feedback to
stage X1. The shift register sequence is defined to be the result is fed back to stage.

X1 is initially filled with a 0 and the other remaining stages are filled with 0, 0 and 1 that is
the initial stage of register is 0 0 0 1. Next we perform the shifting, adding and feeding
operation where we obtain the result after each cycle that is shown in the following table:

Table 3.1 Result of shifting after each cycle.

20
We notice that contents of shift registers repeat after 2 ^ 4 -1 = 15 cycles. The output
sequence is given as 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1 where left most bit is the earliest bit.
Sequences are best shown in the following figure.

3.2.4 Bit Scrambling

Bit scrambling occurs at the following steps:

1. An arbitrary data sequence S (t) is generated by a digital source. In this case, we use +1 and
-1 to represent 1 and 0 respectively.
2. A PN code sequence P (t) is generated by a feedback shift register.
3. We multiply S (t) and P (t) bitwise. This is called scrambling. The output of the multiplier
is transmitted to a distant receiver.

Figure 3.4 bit scrambling

4. At the distance receiver, the resulting scrambled sequence is picked up assuming no


propagation delay.
5. The code P (t) used at the transmitting location is assumed to be available at the receiver.
6. The original data sequence is recovered by multiplying the received sequence by the locally
available code P (t). An important rule to recover is P (t) * P (t) = 1.

21
Figure 3.5 Descrambling at receiver end.

For circuit implementation modulo-2 operation is preferred since exclusive or gates are
cheaper than multiplication circuits. In modulo-2 operation 0 and 1s are used. But here for
modeling purpose multiplication is easier.
Now total operations are listed in the following table:

Table 3.2 Bit scrambling

3.2.5 CDMA Encoding and Decoding

Instead of transmitting bit stream directly it is encoded by walse code. To transmit a bit 1
actually walse code chips are transmitted sequentially and to transmit a bit 0 ones
complement of walse code is transmitted. For 64 chip walse code chip rate is 64 times higher
than original bit stream.

22
CDMA encoding technique is described in the following example. Here for simplicity we
consider a case 8 chips are used per bit to generate the walse function. Stations A, B, C, and D
are assigned the following walse codes:

If station A wants to transmit a 1 bit then its chip sequences (-1 +1 -1 +1 -1 +1 -1


+1) is transmitted. If station A wants to transmit a 0 bit then its negative chip sequences (+1 -
1 +1 -1 +1 -1 +1 -1) is transmitted. We assume that all stations are synchronized in time. So
all chip sequences begin at the same instant. When two or more stations transmit
simultaneously their bipolar signals add linearly. For example if in one chip period three
stations output +1 and one station outputs -1 , the net result is +2 .In the following table we
consider five different cases when one or more stations transmit simultaneously:

Table 3.3 five cases of one or more stations transmitting.

Note: a dash (-) means no transmission by that station.

As mentioned previously the normalized correlation of any two distinct chip sequences is 0
and the normalized correlation of any chip sequence with itself is 1. By using this property we

23
want to show that the receiver recovers the bit stream of station C by computing the
normalized inner products of the received sequences with the chip sequence of station C.

Normalized inner products are:

(S1 * C) / 8 = (1+1+1+1+1+1+1+1) / 8 = 1; C transmits bit 1.


(S2 * C) / 8 = (2+0+0+2+0+2+2+0) / 8 = 1; C transmits bit 1.
(S3 * C) / 8 = (3+1+1-1+3+1+1-1) / 8 = 1; C transmits bit 1.
(S4 * C) / 8 = (2+0+0-2+2+0+0-2) / 8 = 0; C does not transmit.
(S5 * C) / 8 = (1-1-1-3+1-1-1-3) / 8 = -1; C transmits bit 0.
We assumed that all the chips are synchronized in time. In real situation, this is impossible.
The sender and receiver are synchronized by having the sender transmit a known chip
sequence long enough for the receiver to lock onto. All other (unsynchronized) transmissions
then seen as random noise.

The following figure shows the spreading and dispreading of input signal:

Figure 3.6 Spreading and de-spreading.

3.3 MODULATION

After spreading input stream spreaded data is modulated by a high frequency carrier. And it is
done for transmission purpose. There are three ways to modulate a waveform which are-

24
1. Amplitude Modulation (AM).
2. Frequency Modulation (FM).
3. Phase Modulation (PM).

These are shown in the figure:

Phase Shift Keying (PSK) also known as phase modulation. In case of PSK, the frequency
and amplitude of the carrier is constant, while the phase of the carrier (p) varies according to
the input data stream. The carrier signal is given by:

C (t) = Acos (wt + p)

For a PSK modulation scheme the number of bits to represent one symbol is shown as
follows:

N = log2M

Where,
N = number of bits per symbol.
M = number of levels.

Depending on the number of bits per symbol two type of modulation can be applied in
CDMA. First one is Binary Phase Shift Keying (BPSK) that is simple to implement and
second one is Quadrature Phase Shift Keying (QPSK) that is little bit complex than BPSK but
efficient.

3.3.1 Binary Phase Shift Keying (BPSK)

In BPSK total phase is divided into two parts. One is 0 degree phased carrier and another is
180 degree phased carrier. Each bit of bit stream can be represented by of these two different
phased carriers.

25
Bit 1 ==> 0 degree.
Bit 0 ==> 180 degree.

BPSK can be implemented by multiplying each bit of spreaded signal by a cosine wave
signal.

Y (t) = X (t) * cos (wt)

Here,
Y (t) = Transmitted signal.
X (t) = Spreaded signal.
Y(t) is then transmitted. At the receiver end if we multiply Y(t) by the same carrier cos (wt)
then original signal before modulation is recovered.

Figure 3.8 BPSK modulation and demodulation.

3.3.2 Quadrature Phase Shift Keying (QPSK)

According to the equation-

N = log2 M

If M = 4 then N=2. That means total phase is divided into four phase angles. Thus from the
above equation, QPSK uses two bits to represent one symbol. Each possible bit pair is
mapped to a phase angle. These two bits are modulated independently into two channels
called I-channel and Q-channel. Phase difference between these two modulated signals is 90
degree. QPSK act as two independent BPSKs.

26
QPSK phase and channel allocation and constellation diagram is shown bellow:

Figure 3.9 Constellation diagram.

3.3.2.1 IQ-Modulation

Quadrature modulation can be implemented by IQ-Modulation. Input signal is modulation


into the I and Q channel before transmission takes place. The I channel represents the
component of the modulated signal that is in phase with the RF carrier signal. The Q channel
represents the component of the modulated signal that is in 90 phase out of phase with the RF
carrier signal.
The transmitted signal can be represented by-

I (t) + j Q (t) = A (t) [exp j (wt + p (t))]

27
Where,
A (t) = amplitude of the carrier signal,
P (t) = phase of carrier signal.

I(t) can be generated by scrambling odd positioned bit. And Q(t) can be generated by
scrambling the odd positioned bits. A short PN sequence scrambles the signal spreaded by
walse code. This is produced with a fifteen- stage feedback register. The short code is 2^15 -1
chip long. So period of short code is 2^15 -1. The PN sequence generator creates the codes at
a rate of 1.2288 Mcps, resulting it repeating every 26.67ms. I and Q channel uses different PN
sequence, this reduce the probability of errors of the transmitted signal. IQ-modulation is best
shown in the following figure:

Figure 3.10 IQ modulation.

Here, Y (t) = Xodd (t) * Ipn (n) * Cos (wt) + Xeven (t) * Qpn (n) * Sin (wt)

The I channel is based on the following characteristic polynomial:

PI (x) = x15 + x13 + x9 + x8 + x7 + x5 + 1

The Q channel is based on the following characteristic polynomial:

28
PQ (x) = x15 + x12 + x11 + x10 + x6 + x5 + x4 + x3 + 1

Based on the characteristic polynomials, the pilot PN sequences I(n) and Q(n) are generated
by the following linear recursions:

Where in above two equations + indicates modulo 2 addition.


3.3.2.2 Base band Filtering

Pulse-shaping is required for both the I and Q channels. The purpose of this pulse shaping is
to band limit the signal to meet FCC regulations. This pulse-shaping filter is identical for both
I and Q channels. These coefficients are separated in time by one fourth a PN chip (203.5 ns).

Most filtering used in mobile communications obeys Nyquist's pulse-shaping criterion for
zero inter symbol interference (ISI). His theorem states that the received pulse shape, pr (t),
must have the property

Where T is the symbol period and n is any integer. For matched filtering, one would convolve
the transmitted pulse-shape with a time-reversed version in order to minimize the noise. All
sampling instants after convolution must occur at t = nT for there to be zero ISI. For IS-95,
the receiver filter is identical to the pulse shaping filter due to symmetry. The convolution of
the two filters is shown in Figure 3.11 with the sampling instances marked by the symbol `+'.
It is notable that where the sampling instances occur, the waveform is not equal to zero. The
modified pulse-shape has better spectral characteristics than convential raised cosine filter.
The resulting ISI is acceptable when attempting to meet stringent bandwidth constraints.

29
Figure 3.11 Convolution of pulse-shaping filter with matched filter; appropriate
Sampling instances for each chip are marked with +.

A base band filtering can be designed by its filter coefficients. As filter is symmetric, its
coefficients are also symmetric. A digital filter is specified with coefficients given in Table
3.4.

30
Table 3.4 Filter Coefficients for Base band Filtering

31
CHAPTER FOUR

TRANSMITTER AND RECEIVER

4.1 INTRODUCTION

In wireless communication we need to give special attention to receiver design than


transmitter design. Because transmitter transmits the modulated signal that is noise free. But
receiver receives the signal that propagates through the air medium. Many types of noise can
added to the modulated signal. Again main signal can be interfered by other signals. Specially
Multi path effect make receiver design complex.

In this chapter BPSK modulation is shown in the figure for simplicity. But if system uses IQ-
modulation the BPSK will be replaced with this.

4.2 TRANSMITTER

The following figure shows a simple transmitter. Here after spreading the input signal it is
modulated and then transmitted.

Figure 4.1 Transmitter.

32
4.3 MULTIPATH EFFECT

When a transmitter transmits signal it propagates through air medium. Some parts of the
signal reflect in the obstacles then reach to the receiver. So a time delayed signal as well as
primary signal reaches to the receiver. The signal that passes directly from transmitter to
receiver is called Line Of Sight (LOC) of the signal. Other delayed signals are called
multipath components.

Figure 4.2 Multipath effect

4.4 RECEIVER DESIGN

In broad sense there are two types of receiver-

1. Single user receivers


2. Multiple user receivers.

Here single user receivers are discussed briefly.

4.4.1 Single User Receivers

The single user receiver is the basic receiver design for DS-CDMA system. This receiver can
decode only one users signal by his walse code. The signals from other users are treated as

33
interference, e.g.., multiple access interference (MAI). The single user receiver is the simplest
in complexity but its performance suffers in the presence of large MAI.

4.4.1.1 Correlation Receiver

Correlation receivers are optimal in AWGN channel, while they have several drawbacks. As
we know multi path effect is a resistance to wireless communication. Correlation receiver
rejects multi path components regarding them noise like. Correlation receiver can receive only
LOC (line of sight) of the signal.

Figure 4.3 Correlation Receiver.

Where,
Y(t) = Received modulated signal.
S(t) = Signal after de-modulation and de-spreading.
LPF = Low Pass Filter.

Correlation receiver performance also degrades substantially in a CDMA environment when


interfering signals have larger signal energy than the desired digital, i.e., near-far problem.
Multi path and near-far problem effects have motivated the development of receiver structures
that are resistant to both these conditions.

4.5 RAKE RECEIVER

Previously described problems can be resolved by designing a special type of receiver called
rake receiver. Actually rake receiver is a collection of several correlation receiver. It uses

34
multiple correlators to separately detect the M strongest multipath components. In rake
receiver after receiving the signals different multipath components are sent to different
correlator for decoding. In case of rake receiver a single correlator is called arm of receiver.
Following figure shows a rake receiver.

Figure 4.4 N arms rake receiver.

Where R (t) = Received signal.

Each correlator takes as input a delayed signal and walse code to resolve that signal. Then the
output of all the correlators is combined to get aggregate result. Here only the maximum
output of the correlator is taken and multiplied with a large gain term and low outputs of the
correlator is multiplied with low gain term to reduce them.
After performing this operation over a walse period T, result is compared with the threshold
of a decision device for estimation of a bit.

Here one arm rake receiver is same as correlation receiver. Two arms rake receiver can
resolve one multipath component as well as original signal. Practically three arms rake

35
receiver is used in CDMA system and can resolve two multipath components. If number of
multipath components is large than number of arms then strongest components only survives.
If number of multipath components is equal to the number of arms then optimal result can be
found. Again if number of multipath components is less than number of arms, then some arm
resource is wasted.

Considering this problem a new type of rake receiver has been proposed that is slight
modification of the previous rake receiver.

4.6 PROPOSED RAKE RECEIVER

Here an additional components counter included at the receiving point and each correlator
must have enable/disable input bit. Correlator becomes enable if 1 is send as input to
correlator.

In this receiver number of multipath components is found first from components counter.
Then a desired bit word is send to the correlators to make actual number of correlators enable.
All other operations of this receiver is same as previous RAKE receiver.

For example if at present number of multipath components are three including original signal
then bit word looks like follows.

Figure 4.5 Bit word.

36
Block diagram of proposed RAKE receiver looks like follows:

Figure 4.6 Proposed RAKE receiver

37
CHAPTER FIVE

SIMULATION

5.1 INTRODUCTION

CDMA encoding and decoding technique is simulated by matlab. Simulation includes


following steps:

1. Capturing two voice signals.


2. Spreading input signals.
3. Modulation of spreading signal.
4. Addition of transmission noise.
5. De-modulation and De-spreading.
6. Noise removal.

5.2 CAPTURING ANALOG SIGNALS

Two input voice signal is captured from microphone sampling at 8 KHz. Following function
is used for this purpose-

y1= wavrecord (t*fs, fs,'double');

Where, fs =8000 Hz
t = Total recording time in second.
y1=Captured samples in matrix form where each
sample contains a double type value.

In our simulation purpose we have captured two signals for 2 seconds that means total 16000
samples are coded. Off them 1000 samples are plotted in graph by the following function:

38
plot (y1 (1:1000, 1));

This function plots first 1000 samples of y1 signal.

Voice signal 1:

Figure 5.1 voice signal 1

Voice signal 2:

Figure 5.2 voice signal 2

39
5.3 SPREADING THE INPUT SIGNALS

Taking sampled signals of double type each sample is converted into 16 bit unsigned integer.
Then each bit is spreaded by 4 chip walse code. Practically 64 bit walse code is used but here
for simplicity only 4 bit walse code is used. In our simulation following user defined function
is used- [note: all user defined function definition is given in the appendix.]

function [e, et] = encode_cdma(x1, x2)

Here, x1, x2 =input signals and


e, et =Return signals.

Signal after spreading:

Figure 5.3 spreading signal.

5.4 MODULATION OF SPREADING SIGNALS

Signal can be modulated in two ways-


1. BPSK.
2. IQ- modulation.

40
Here both are used in simulation. In BPSK modulation user defined function modulation () is
used. In IQ-modulation even and odd chips are grouped and using following function a
complex signal is formed-

e {i} =complex (et {i} (1:2:64), et {i} (2:2:64));

where e {i} =complex signal.


et {i} (1:2:64) =odd chips.
et {i}(2:2:64) =even chips.

Signal after BPSK modulation:

Figure 5.4 BPSK modulated signal.

5.5 ADDITION OF TRANSMISSION NOISE

As transmission medium is noisy, some random noise needs to add to signal. Noise is added
to the signal by user defined function-
Noise add ()

That use randn () function to add noise to each chip.

41
Received noisy modulated noisy signal at receiver end looks like follows:

Figure 5.5 noisy modulated signal

From this figure it is clear that it distorted compared to fig 5.4.

5.6 DE-MODULATION AND DE-SPREADING

After noise signal is received to the receiver end, it is demodulated and despreaded. But this
signal is distorted from original signal due to transmission noise. In our simulation user
defined function

[x1, x2] = encode_cdma (z);

Where x1, x2 = Decoded original signals.


z = encoded signal.

Noisy signal after demodulation and noisy signal after de-spreading is given bellow-

42
De-modulated signal:

Figure 5.6 noisy demodulated signal.

Compared to fig: 5.3 this signal is much noisy.

Despreaded signal no 1:

Figure 5.7 noisy despreaded signal no 1.

43
Despreaded signal no 2:

Figure 5.8 noisy despreaded signal no 2.

In fig: 5.7 and fig: 5.8 noise spikes are formed because of the noise of transmission channel.
Fig 5.7 is the noisy version of original signal in fig 5.1 and Fig 6.8 is the noisy version of
original signal in fig 5.2.

5.7 NOISE REMOVAL

Frequency band of noise is different from that of voice signal. Voice signal contain frequency
from 0 to about 320 Hz. But frequency of noise is different from that of voice signal.
Frequency spectrum of the signal is obtained by Fourier transform.

Power spectrum of the voice signal in fig 5.1 is shown in the following figure where
horizontal line indicates frequency and vertical line indicates power-

44
Figure 5.9 power spectrum of original voice signal 1.

Power spectrum of the noisy signal looks like follows-

Figure 5.10 power spectrum of noisy decoded voice signal 1.

In figure 6.10 it is clear that many additional frequency components are added to the signal
for noise. As our input voice signal contain only low frequencies, then by applying a low pass
filter that pass only 0 to 300 Hz we can remove noise. In our simulation this can be done by a
user defined function named

noise_remove ();

45
Power spectrum of the filtered signal is shown bellow:

Figure 5.11 power spectrum of filtered decoded voice signal 1

Yet a large amount of noise is removed, some noise is still present that is shown in he upper
figure.

So another technique for noise can be implemented. In this technique filter is imposed hen de-
spreading signal because walse code has low correlation with noise. As mentioned earlier
when a signal bit is spreaded by a 4 chip walse code then spreading actor is 4. When spreaded
signal is multiplied by same walse code then original signal bit is recovered. As noise is added
with each chip, so frequency of noise is same as that of chips. Knowing this things noise can
be removed by following technique-

(Original signal bit) * (walse code) = spreaded code


(spreaded code) * (walse code) = Original signal bit
(spreaded code) + (noise) = noisy spreaded code

46
Now-
(noisy spreaded code) * (walse code)
= ((spreaded code) + (noise)) * (walse code)
= (spreaded code) * (walse code) + (noise) * (walse code)
= Original signal bit + (noise) * (walse code)

As frequency of original signal bit and noise multiplied by walse code is different, so y
filtering noise frequencies properly noise can be removed.

Finally our simulation window looks like follows:

Figure 5.12 simulation window

47
CHAPTER SIX

RESULT, PERFORMANCE ANALYSIS AND DISCUSSION

6.1 RESULTS

When no transmission noise is not added then decoded voice signal was exactly same as the
original signal.

But when noise was added then the decoded signal was distorted. If we filter the decoded
signal then big amount of noise is removed but still present some noise. I think this noise can
be removed by the technique described previous chapter.

6.2 PERFORMANCE ANALYSIS

Performance of CDMA system can be analyzed based on following topics-

1. Receiver accuracy.
2. Capacity.
3. System accuracy.

6.2.1 Receiver Accuracy

Correlation receiver can detect only main signal component, other delay component is noticed
as noise. If at present there is no delay component then correlation receiver works with 100%
efficiency. But there is a delay component with the main signal then there is a possibility of
occurring error at 50% time. So accuracy graph of correlation receiver looks like follows:

48
Figure 6.1 Accuracy of correlation receiver.

Accuracy of three arms RAKE receiver against multipath components looks like follows:

Figure 6.2 Accuracy of three arms RAKE receiver.

49
Sometimes three arms RAKE receiver waste arm resource if multipath component is less than
arms number. The following figure shows number of active arms against multipath
components:

Figure 6.3 Arms uses of traditional three arms RAKE receiver.

Here all the three arms active all the time even though it is no need to be active when there are
one or two components only.

Our proposed RAKE receiver with multipath components counter makes optimal use of arms
against multipath components:

Figure 6.4 Arms uses of proposed three arms RAKE receiver.

50
6.2.2 System Accuracy

In case of noise addition about 80 samples are corrupted between 1000 samples.

Accuracy = 100 (80/1000) = 92 %

Following figure shows corrupted samples with respect to input samples-

Figure 6.5 System accuracy comparing corrupted samples with input samples.

6.2.3 Capacity

In case of fixed signal to noise ratio (S/N =9) capacity of AMPS, GSM and CDMA is found
from following equation-

C = Bw log2 (1 + S/N)

51
Following figure shows this phenomenon-

Figure 6.6 capacities of various mobile systems.

6.3 DISCUSSION

In this thesis simulation and implementation of CDMA system is described. As simulation is


performed by matlab, real time encoding and decoding is not possible. Because matlab is not
too fast to process 8000 samples in a second (signal capturing frequency 8 KHz). Here each
sample is represented by a 16 bit unsigned number. Then each bit is replaced by a 4 chip
walse code. So instead of taking 1 second matlab takes 30 seconds to process 8000 samples.
In simulation result was as expected. Here both BPSK and IQ-modulation is imposed in
CDMA system.

Implementation of CDMA system was real time by TMS320C50 dsp kit because its clock rate
is 40 MHz. In implementation spreading, modulation and de-spreading of signal is monitored
in LCD display and oscilloscope. Here only BPSK is implemented, IQ-modulation is not
considered in case of implementation.

52
Special attention is given to the receiver design. Existing receivers are described and a new
RAKE receiver is proposed in this thesis. Performance of proposed receiver and existing
receivers are compared shown that proposed receiver is effective in terms of resources uses.

6.4 LIMITATIONS

Limitations of the thesis are as follows-

1. IQ-modulation is not implemented by kit although it is simulated.


2. Noise is not fully removed in error correction.

6.5 FURTHER STUDY

With the knowledge of this paper following extensions of the thesis can be made-

1. Noise removal techniques can be improved.


2. Multi carrier CDMA can be analyzed.

53
REFERENCES

[1] Vijay K.Garg - IS-95 CDMA and cdma2000.

[2] Andrew S. Tanenbaum - Computer Networks.

[3] Jerry D. Gibson The Mobile Communication Handbook. (Second Edition).

[4] Hui Liu Signal Processing Applications in CDMA Communication

[5] Imam Mahmud Taifur Rahman Al-wazedi and Makoto Kawai , A New Switching

Scheme Using Hadamard-Coded CDMA and Onboard Multiport Coupler for

Multibeam Satellites. Joint Conference on Satellite Communication (JC-SAT) ,

Seoul ,Korea, 2004, 25-30.

[6] MDA-DSP MANUAL An Integrated Development Environment Kit, MIDAS

Engineering Co., Ltd.

[7] T.S. Rappaport, Wireless Communications, Prentice Hall, 1996

[8] S. Haykin, Communication Systems, John Wiley & Sons, 2001

[9] S. P. Nicoloso, An Investigation of Carrier Recovery Techniques for PSK Modulated

Signals in CDMA and Multipath Mobile Environments," M.S. Thesis, Virginia

Polytechnic Institute and State University, June 1997.

[10] R. E. Ziemer and R. L. Peterson, Introduction to Digital Communication, Macmillan

Publishing Company, New York, 1992.

[11] R. E. Ziemer and R. L. Peterson, Digital Communications and Spread Spectrum

Systems, Macmillan Publishing Company, New York, 1985.

54
[12] M. K. Simon, J. K. Omura, R. A. Scholtz, and B. K. Levitt, Spread Spectrum

Communication Handbook, McGraw-Hill, New York, 1994.

[13] J. D. Parsons, the Mobile Radio Propagation Channel, Halsted Press, New York,

1992.

[14] John G. Proakis, Dimitris G. Manolakis- Digital Signal Processing: Principle,

Algorithm, and Applications.

55
APPENDIX

Matlab Code for Simulation

%%%%% Executes on button press in Record1 button. %%%%

function pushbutton1_Callback (hObject, eventdata, handles)

global fs;
global t;
global y1;
t=2;
fs=8000;
y1 = wavrecord (t*fs, fs,'double');
y1 (1) =0.99;
y1 (2) =-0.99;
wavwrite (y1, fs,'C:\j1.wav');

%%%%% Executes on button press in Play1 button. %%%%%

function pushbutton2_Callback(hObject, eventdata, handles)

global fs;
global y1;
fs=8000;
[y1, fs, n]=wavread ('c:\j1.wav');
plot (y1 (1:1000, 1));
wavplay (y1, fs,'sync');

%%%%%%%%%%%%% cdma encoding occurs here %%%%%%%%%%%%%


%%%%%%% now x1, x2 represents input signal %%%%%%%%%%

function [e, et] = encode_cdma(x1, x2)

global w;
w {1}= [1 1 1 -1];
w {2}= [1 1 -1 1];
w1{1}= [-1 -1 -1 1];
w1{2}= [-1 -1 1 -1];

v1 = uint16(x1 * 10000 + 10000);


v2 = uint16(x2 * 10000 + 10000);

56
for i=1:8000
e1 {i} = [];
e2 {i} = [];

for j=1:16
c1=bitget(v1(i),j);
c2=bitget(v2(i),j);
r=(j-1)*4;
if(c1==1)
e1{i}=horzcat(e1{i},w{1});
else
e1{i}=horzcat(e1{i},w1{1});
end

if(c2==1)
e2{i}=horzcat(e2{i},w{2});
else
e2{i}=horzcat(e2{i},w1{2});

end
end
et{i}=e1{i}+e2{i};
e{i}=complex(et {i}(1:2:64) , et {i}(2:2:64));
end

%%%%%%%%% cdma decoding occurs here %%%%%


%%%%%%% now d1, d2 represents decoded signal %%%%%%%%%

function [d1,d2]= decode_cdma(p1)

global w;
w{1}=[1 1 1 -1];

w{2}=[1 1 -1 1];

l=0;
k=0;
c=1;
d=1;
s1=0;
s2=0;
for i=1:8000
for n=1:32

p{i}((n-1)*2 + 1)=real(p1{i}(n));

57
p{i}((n-1)*2 + 2)=imag(p1{i}(n));
end

for j=1:4:61

s1=s1+sum(w{1}.* p{i}(j:j+3));
s2=s2+sum(w{2}.* p{i}(j:j+3));

k=k+1;
if(s1>0)

c=bitset(c,k,1);
else
c=bitset(c,k,0);
end

if(s2>0)

d=bitset(d,k,1);
else
d=bitset(d,k,0);
end
s1=0;
s2=0;
end

d1(i)=(c-10000)/10000;

d2(i)=(d-10000)/10000;
k=0;
c=1;
d=1;
end

%%%%%%% Executes on button press in Encode button. %%%%%%

function pushbutton3_Callback(hObject, eventdata, handles)


global y1;
global y2;
global z1;
global z;
[z, z1]=encode_cdma(y1,y2);

%%%%%% Executes on button press in Record2 button. %%%%%%

58
function pushbutton5_Callback(hObject, eventdata, handles)
global fs;
global t;
global y2;
fs=8000;
y2 = wavrecord(t*fs,fs,'double');
y2(1)=1;

y2(2)=-1;
wavwrite(y2,fs,'C:\j2.wav');

%%%%%%% Executes on button press in Play2 button. %%%%%

function pushbutton6_Callback(hObject, eventdata, handles)


global fs;
global y2;
fs=8000;
[y2,fs,n]=wavread('c:\j2.wav');
plot(y2(1:1000,1));
wavplay(y2,fs,'sync');

%%%%% Executes on button press in Decode button. %%%%%%%%

function pushbutton7_Callback(hObject, eventdata, handles)


global z;
global fs;
[x1,x2] = decode_cdma(z);
wavwrite(x1,'C:\e1.wav');
wavwrite(x2,'C:\e2.wav');

%%%%%%%%%%%%% Executes on button press in


Play1 button after decoding.%%%%%%%%%%%%%%%

function pushbutton9_Callback(hObject, eventdata, handles)


global fs;
global flag;
fs=8000;
[y12,fs,n]=wavread('c:\e1.wav');
plot(y12(1:1000,1));
wavplay(y12,fs,'sync');

%%%%%%%- Executes on button press


in Play2 button after decoding.%%%%%%%

59
function pushbutton10_Callback(hObject, eventdata, handles)
global fs;
fs=8000;
[y13,fs,n]=wavread('c:\e2.wav');
plot(y13(1:1000,1));
wavplay(y13,fs,'sync');

%%%%% Executes on button press in Modulate button. %%%%%%


function pushbutton11_Callback(hObject, eventdata, handles)
modulation();

%%%%%%%%%%%%%% Modulation function %%%%%%%%%%%%%%%%

function modulation()
global z1;
for i=1:1
for j=1:64
for k=1:8
z11{i}((j-1)*8 + k) = z1{i}(j) * cos((3.142 *
k)/4);
end
end
end

t=(z11{1})';
plot(t(1:150,1));

%%%% Executes on button press in Transmission button %%%%

function Transmission_Callback(hObject, eventdata, handles)


noise_add();

%%%%%%%%%%%%% Noise addition function %%%%%%%%%%%%%%%

function noise_add()
global z;

for i=1:8000
for j=1:32
z{i}(j)=z{i}(j) + complex(randn(1)*0.7,randn(1) *
0.7);
end
end

60
% Executes on button press in Error correction button. %%

function errorcorrection_Callback(hObject, eventdata, handles)


noise_remove();

%%% Noise removal function %%%%

function noise_remove()

global fs;
global flag;
flag=1;
fs=8000;
[y121,fs,n]=wavread('c:\e1.wav');
[y122,fs,n]=wavread('c:\e2.wav');
Y = fft(y121,1000);

F=[0 0.02 0.05 0.1 0.2 0.23 0.25 0.3 0.4 0.5 0.6 0.7 0.8 1];
A=[1 1 1 1 1 0 0 0 0 0 0 0 0 0];
b = firpm(23,F,A);

for j=1:24
oy1(j)=b(1:j)*y121(j:-1:1);
oy2(j)=b(1:j)*y122(j:-1:1);
end

for p=25:8000
oy1(p)=b*y121(p:-1:p-23);
oy2(p)=b*y122(p:-1:p-23);
end

oy1(1)=0.98;
oy2(1)=0.98;
oy1(2)=-0.98;
oy2(2)=-0.98;

wavwrite(oy1,'C:\e11.wav');
wavwrite(oy2,'C:\e21.wav');
wavplay(oy1,fs,'sync');
plot(oy1(1:1000));

Y = fft(oy1,1000);
yy = Y.* conj(Y) / 1000;
plot(yy);

61

You might also like