0% found this document useful (0 votes)
4 views

C24 MC

The document outlines an experiment on Code Division Multiple Access (CDMA), focusing on its implementation, objectives, and outcomes. It explains the principles of CDMA, including orthogonality and autocorrelation, and provides a procedure for encoding and decoding data using orthogonal codes. Additionally, it includes a programming example in Python and discusses the importance of spread spectrum technologies in wireless communication.

Uploaded by

dedot66701
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

C24 MC

The document outlines an experiment on Code Division Multiple Access (CDMA), focusing on its implementation, objectives, and outcomes. It explains the principles of CDMA, including orthogonality and autocorrelation, and provides a procedure for encoding and decoding data using orthogonal codes. Additionally, it includes a programming example in Python and discusses the importance of spread spectrum technologies in wireless communication.

Uploaded by

dedot66701
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Experiment No.

2: CDMA

PART A

(PART A: TO BE REFFERED BY STUDENTS)

A.1 Aim: To implement a basic function of Code Division Multiple Access


(CDMA) to test the orthogonality and autocorrelation of a code to be used
for CDMA operation. Write an application based on the above concept.

A.2 Prerequisite: Knowledge of multiplexing schemes

A.3 Objectives: To understand the importance of security in wirelesss


communication by means of spread spectrum technologies.

A.4 Outcomes: Student will be able to articulate the knowledge of GSM, CDMA &
Bluetooth

technologies and demonstrate it.(LO-2)

A.5 Tools Used/programming language: Java

A.6 Theory:
 Code-division multiple access (CDMA) is a channel access method used
by various radio communication technologies. CDMA is an example of multiple
accesses, where several transmitters can send information simultaneously over a
single communication channel. This allows several users to share a band of
frequencies (see bandwidth). To permit this without undue interference between
the users, CDMA employs spread spectrum technology and a special codling’s
scheme (where each transmitter is assigned a code).

CDMA issued as the access method in many mobile phone standards. IS-95,also
called" cdma One", and its 3G evolution CDMA2000, are often simply referred to
as "CDMA", but UMTS, the 3G standard used by GSM carriers, also uses "wideband
CDMA", or W-CDMA, as well as TDCDMA and TD-SCDMA, as its radio technologies.

 CDMA Orthogonality:

Techniques generally used are direct sequence spread spectrum modulation


(DS-CDMA), frequency hopping or mixed CDMA detection (JDCDMA). Here, a
signal is generated which extends over a wide bandwidth. A code called
spreading code is used to perform this action. Using a group of codes, which are
orthogonal to each other, it is possible to select a signal with a given code in the
presence of many other signals with different orthogonal codes.

 CDMA Autocorrelation:

Autocorrelation of the sequence, it determines the ability to synchronize and lock the
spreading code for the received signal.

A.7 Procedure:
 The station encodes its data bit as follows.
o I
f
b
i
t
=
1
t
h
e
n
+
1
o
I
f
b
i
t
=
0
t
h
e
n
-
1

o n
o
s
i
g
n
a
l
(
i
n
t
e
r
p
r
e
t
e
d
a
s
0
)
i
f
s
t
a
t
i
o
n
i
s
i
d
l
e

 Each station is allocated a different orthogonal sequence (code) which is N bit long
for N stations

 Each station does a scalar multiplication of its encoded data bit and code
sequence.
 The resulting sequence is then stored on the channel.
 Since the channel is common, amplitudes add up and hence resultant channel
sequence is the sum of sequences from all channels.

 If station 1 wants to listen to station 2, it multiplies (inner product) the channel


sequence with code of station S2
 The inner product is then divided by N to get data bit transmitted from station 2.

 Working

 CDMA uses orthogonal codes to transmit different signal over the same channel

 CDMA is use in 3’rd generation wireless communication like CDMA 2000, w-


CDMA,HSDPA
(high speed downlink packet access), HSUPA(high speed

uplink packet access)  CDMA stands for Code Division

Multiple Access.

 It is a digital cellular standard that utilizes spread-Spectrum Technology.

 It spreads the signal over a fully available spectrum or over multiple


channels through division.

 It is a more secure and private line.

 It has good voice and data communication capabilities.

 The information is sent simultaneously through several transmitters over


a single communication channel.

 Consider there is single channel having four users, user1,user2,user3,user4


 Assume there are four orthogonal codes

 If two diff orthogonal codes are multiplied it will always give 0; this is the
property of orthogonal code.

 User send data 1,0 (stream of data)or use may be silent that is no data to
transmit.

 Users are having following data


 Data in channel is;

 If data 2 want to receive then

R2= C(x)*C2

And hence we are getting –a after dividing by 4 and data send by user 2 is -a

Sample Output:
PART B

(PART B: TO BE COMPLETED BY STUDENTS)

(Students must submit the soft copy as per following segments within two
hours of the practical. The soft copy must be uploaded on the ERP or
emailed to the concerned lab in charge faculties at the end of the practical
in case the there is no ERP access available)

Roll No. C 24 Name: Anirudha Kashid

Class : TE C (COMPS) Batch : C2

Date of Experiment: 21/01/25 Date of Submission – 28/01/25

Grade :

B.1 Question of Curiosity:

Q.1: Source Code (students need to implement CDMA using any programming
language like Java, Python , etc)

ANS –
import numpy as np

def encode_data(data_bits, codes):


"""
Encodes the data bits using the given orthogonal codes.
"""
encoded_channel = np.zeros(len(codes[0]))
for i in range(len(data_bits)):
encoded_channel += data_bits[i] * codes[i]
return encoded_channel

def decode_data(encoded_channel, code):


"""
Decodes the data for a specific station using its code.
"""
return np.dot(encoded_channel, code) / len(code)

def main():
# Define orthogonal codes
codes = [
[1, 1, 1, 1], # Code C1
[1, -1, 1, -1], # Code C2
[1, 1, -1, -1], # Code C3
[1, -1, -1, 1], # Code C4
]
codes = np.array(codes)

# Input data bits


data_bits = []
for i in range(4):
bit = float(input(f"Enter D{i+1}: "))
data_bits.append(bit)

# Encode the data bits


encoded_channel = encode_data(data_bits, codes)
print(f"\nResultant Channel {encoded_channel.tolist()}")

# Input the station to decode


station = int(input("\nEnter the station to listen for C1=1, C2=2, C3=3, C4=4: "))
if 1 <= station <= 4:
decoded_data = decode_data(encoded_channel, codes[station - 1])
print(f"Inner Product {encoded_channel.tolist()}")
print(f"Data bit that was sent {decoded_data}")
else:
print("Invalid station number.")

if __name__ == "__main__":
main()

Q.2: Output of CDMA


ANS –
Q.3: Explain CDMA with one suitable example.

ANS – CDMA (Code Division Multiple Access) is a wireless communication


technology that allows multiple users to transmit data simultaneously over the same
frequency channel. It works by assigning a unique code to each user, enabling multiple
signals to coexist without interference.

EXAMPLE-

Let’s assume there are two users (User A and User B) sending data over a CDMA
network.

Step 1: Assign Unique Spreading Codes

CDMA uses orthogonal Walsh Codes for encoding. Assume:

1. User A's Code: [1, -1, 1, -1]


2. User B's Code: [1, 1, -1, -1]

Step 2: Transmit Data

Suppose:
1. User A wants to send bit 1
2. User B wants to send bit -1

Each user multiplies their data bit with their assigned code:

1. User A's Encoded Signal = 1 × [1, -1, 1, -1] → [1, -1, 1, -1]
2. User B's Encoded Signal = -1 × [1, 1, -1, -1] → [-1, -1, 1, 1]

Step 3: Combine Signals (Superposition)

The transmitted signal is the sum:

[1, -1, 1, -1] + [-1, -1, 1, 1] = [0, -2, 2, 0]

This is the composite channel signal.

Step 4: Receiver Decodes the Signal

If the receiver wants to extract User A's data, it takes the received signal and applies
User A's code:

( [0, -2, 2, 0] . [1, -1, 1, -1] ) / 4


=(0+2+2+0)/4
=4/4
= 1 (User A's original bit)

Similarly, for User B:

( [0, -2, 2, 0] . [1, 1, -1, -1] ) / 4


=(0-2-2+0)/4
= -4 / 4
= -1 (User B's original bit)
Conclusion

1. Even though both users transmitted data at the same time on the same frequency, their
data was successfully decoded.
2. This is how CDMA allows multiple users to share the same frequency channel
without interference

Q.4: What is spread spectrum? List types of spread spectrum technologies.

ANS – Spread Spectrum:


Spread spectrum is a communication technique where a signal's bandwidth is spread
over a wider frequency range than its original bandwidth. This makes the signal less
susceptible to interference, noise, and unauthorized access

Types of Spread Spectrum Technologies:


1. Frequency Hopping Spread Spectrum (FHSS): The signal frequency rapidly
changes over different channels in a random sequence.
2. Direct Sequence Spread Spectrum (DSSS): The signal is multiplied by a pseudo-
random noise code to spread its frequency.
3. Chirp Spread Spectrum (CSS): Uses chirp signals with increasing or decreasing
frequency for spreading.
4. Chirp Spread Spectrum (CSS): Uses chirp signals with increasing or decreasing
frequency for spreading.

Q.5: Differentiate between FDM and FHSS.


ANS-

B.2 Conclusion:

The successful implementation of the basic CDMA function demonstrates that the system
can accommodate multiple users while maintaining signal integrity and minimal
interference. This highlights the robustness of CDMA for communication systems,
making it suitable for applications requiring efficient use of bandwidth and high user
capacity

You might also like