CDMA Illustrated

This site illustrates the principles of Code Division Multiple Access by showing the steps involved based on two systems.

Controls

Signals

Your browser does not support HTML 5. Sorry. Your browser does not support HTML 5. Sorry.

The two input signals. You can draw on this surface to create the signals, that are to be transmitted via the CDMA system. The signal resolution (i.e. "pixel size") is modified by the "Spreading factor" slider in the controls panel. A higher spreading factor increases the robustness of the signal against interference, but decreases the overall throughput (assuming a constant transmission rate of the underlying signal).

Note: in this example, the slider increases the spread factor acutally quadratic instead of linear. This is due to the fact, that the example operates in 2D space. If you modify the spread factor, you have to clear the input signal. Otherwise strange results may occur.

Codes

Your browser does not support HTML 5. Sorry. Your browser does not support HTML 5. Sorry.

The spreading codes used to spread the input signal for transmission. Each signal is spread with a unique and orthogonal (i.e. not correlated to all other codes) code. In the example, the orthogonality can be seen as one code is all horizontal lines, while the other is all vertical. The code bandwidth is much higher, than the original signal bandwidth (the exact ratio is given by the spreading factor). The bandwidth of the code therefore determines the bandwidth of the transmitted signal.

The signal is spread by XOR-ing each signal bit with the appropriate number of code bits.

Spreaded signals

Your browser does not support HTML 5. Sorry. Your browser does not support HTML 5. Sorry.

The resulting signal after applying the spreading code. This signal is transmitted over the air to the receiver.

Received signal (sum + noise)

Your browser does not support HTML 5. Sorry.

The signal as seen at the receiver. As each transmitter sends on the same channel, the signals (more or less) add up at the receiver. Due to this overlaying, CDMA requires the received signal strength of each sender to be roughly equal, to prevent senders from wiping out weaker signals. You can influence the ratio of the two signals by the "Signal factor" parameter in the controls panel. A factor of 1 means, that both signals are equally strong at the receiver. Increasing factors quickly lets the left signal deteriorate. In a real system, a good power control is needed at each sender, to prevent this kind of effect. The maximum signal factori given in this example of 100 would otherwise be reached with a difference in the sender distance of factor 10 (i.e. one sender is 1 km from the receiver, the other is 10 km away), due to the quadratic nature of the path loss of electromagnetic waves.

In reality no channel is noise free. There are always random influences from the environment, deteriorating the received signal. You can explore the effects of noise by using the "Noise" parameter in the control panel. CDMA systems are (depending on the spreading factor) quite resistant to noise.

Correlated signals

Your browser does not support HTML 5. Sorry. Your browser does not support HTML 5. Sorry.

The correlated signals at the receiver. By correlating the received signal with the known code of the sender (i.e. doing the same XOR operation as was done for the spreading) , a correlation gain is achieved for any signal part, that was initially spread with that same code. Signal parts with orthogonal codes or random noise do not profit from this gain, as they cancel out within a transmitted bit (some noise parts will shift a received symbol up, other will shift one done. Overall those effects cancel out and leave a set of symbols, whose average tends towards the original signal value). Therefore the correlation increases the signal-to-interference ratio of the transmission.

As any stochastical process, the average tendency gets more stable with more input values. This is why a higher spreading factor (i.e. more transmitted symbols per input symbol) produces a more robust transmission. With low spreading factors and high noise, you will start to see bit errors in the decoded signal below.

Decision

Your browser does not support HTML 5. Sorry. Your browser does not support HTML 5. Sorry.

In order to decode the correlated received signal, a simple threshold decision is taken. If the average value of a "pixel" (i.e. a square of the original signal resolution) is below a certain value, it is decided as a 0, otherwise it is considered to be a 1. In real systems more steps would be possible (e.g. if the input signal is a higher order code like QPSK oder n-QAM). Also, real systems might adapt their decisions to the current channel conditions by transmitting know training sequences and checking, how the channel modifies these.

© Markus Brueckner e-mail