Professional Documents
Culture Documents
MC All Experiments 14 19
MC All Experiments 14 19
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.
Theory CDMA is a channelization protocol for Multiple Access, where information can be
sent simultaneously through several transmitters over a single communication
channel.
It is achieved in below steps:
A signal is generated which extends over a wide bandwidth.
The code which performs this action is called spreading code.
Later on, a specific signal can be selected with a given code even in the presence of
many other signals.
It is mainly used in mobile networks like 2G and 3G.
4. Each station does a scalar multiplication of its encoded data bit and code
sequence.
8. The inner product is then divided by N to get data bit transmitted from
station
2.
Program // Java code illustrating a simple n of CDMA
implementatio import java.util.*;
buildWalshTable(num_stations, 0, num_stations - 1, 0,
num_stations - 1,
false);
showWalshTable(num_stations);
}
channel_sequence = new int[num_stations];
channel_sequence[i] += wtable[j][i];
int innerProduct = 0;
(innerProduct / num_stations));
public int buildWalshTable(int len, int i1, int i2, int j1,
int j2, boolean
isBar)
if (len == 2) {
if (!isBar) {
wtable[i1][j1] = 1;
wtable[i1][j2] = 1;
wtable[i2][j1] = 1;
wtable[i2][j2] = -1;
else {
wtable[i1][j1] = -1;
wtable[i1][j2] = -1;
wtable[i2][j1] = -1;
wtable[i2][j2] = +1;
}
return 0;
/ 2;
return 0;
}
public void showWalshTable(int num_stations)
System.out.print("\n");
System.out.print("\n");
System.out.println(" ");
System.out.print("\n");
// Driver Code
int num_stations = 4;
data[0] = -1;
data[1] = -1;
data[2] = 0;
data[3] = 1;
channel.setUp(data, num_stations);
int sourceStation = 3;
channel.listenTo(sourceStation, num_stations);
}
}
Output
Conclusion : Understanding and implementing basic function of Code Division Multiple Access
(CDMA) to test the orthogonality and autocorrelation of a code to be used for
CDMA operation.