MCC Expt 4 Walsh Code
MCC Expt 4 Walsh Code
Student Name
Roll Number 17102A0057
Grade and Subject
Teacher’s Signature
Experiment Number 4
The system uses 64 Walsh function matrix 64. The first line of this
matrix contains a string of all zeros with each of the following lines
containing different combinations of bit 0 and 1. Each line is
orthogonal and equal representation for binary bits. When
implemented with the CDMA system, each mobile user uses one of the
64 sequences of rows in the matrix as a spreading code. And, it
provides zero cross-correlation among all the other users.
Procedure:
The station encodes its data bit as follows.
● +1 if bit = 1
● -1 if bit = 0
● no signal(interpreted as 0) if station is idle
Each station is assigned a unique 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 placed on the channel.
Since the channel is common, amplitudes add up and hence resultant
channel sequence is 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.
Eg:- Assume 4 stations S1, S2, S3, S4. We’ll use 4×4 Walsh Table to
assign codes to them.
C1 = [+1 +1 +1 +1]
C2 = [+1 -1 +1 -1]
C3 = [+1 +1 -1 -1]
C4 = [+1 -1 -1 +1]
+ [+1 -1 -1 +1]
= [-1 -1 -3 +1]
Program:
# Same as above
B_data = []
for b in B_code:
B_data.append(b * B)
for i in range(num_bits):
dec_A_data.append(channel_data[i] * A_code[i])
dec_B_data.append(channel_data[i] * B_code[i])
Output