# DIRECT SEQUENCE SPREAD SPECTRUM AND RAKE RECEIVER

|**autocorrelation**properties, which make the transmitted signals less vulnerable to multipath effects. In CDMA every user employs a different spread-sequence which is orthogonal to the one employed by another user; hence, their transmitted signal should not interfere.

Pseudo-noise sequences (PN sequences) used in DSSS are generated in a deterministic manner although they appear to be random noise. From all the types of pseudo-noise sequences, the ones chosen for this study were m-sequences. The main purposes of spread-spectrum techniques are to make the signal less susceptible to jamming, to reduce energy density and to allow multiple access . In addition, a system using this technique has three main properties:

– The signal will occupy a bandwidth greater than its baseband version.

– The spreading sequence is independent of the data signal.

– The receiver correlates the received signal with a replica of the spreading sequence, a process known as despreading.

A chip is defined as the duration of each element inside the sequence and it is usually named Tc. This time is much smaller than the bit duration in the sequence that is going to be coded. In addition, PN sequences must satisfy the following properties:

**Balance**: the number of 1s in a sequence’s period differs by one from the number of 0s.

**Run-length**: there are runs of 1s and 0s inside one period. The number of runs of 1s must be the same as the number of 0s. In each period, half of the runs with the same sign have length 1, a quarter has length 2, an eighth have length 3 and so forth.

**Autocorrelation**: the autocorrelation function for these sequences is periodic and it has two values. For a given sequence ak of 1s and -1s, the autocorrelation C(K) is computed as:

Its values are 1 for k=0 and -1/N for the rest of the values of k. This is associated with the fact that comparing the periodic sequence with any shifted version of itself will result in a difference between matches and mismatches equal to 1.

Maximum-length sequences (m-sequences) are one of the most important PN sequences in use. They are called maximum-length because they can be generated by using a shift register of length equal to m; therefore, there are 2m-1 chips of length m. Typical length values are 7, 15, 31, 63, 127 and 255.

# RAKE RECEIVER

As the diagram shows, the reflected waves that arrive with different time delays are detected individually by the rake receiver. The diversity technique employed is maximal-ratio combining, where there is an amplification or attenuation factor proportional to the signal amplitude for each branch.

Let x(t) be the spread transmitted signal, then, the received signal will be:

Therefore, the signal is convolved by the channel impulse response, and AWGN is added. If the channel introduces k paths, we can model each of them by using the following expression:

where α_{k} is a complex number. Every correlator or finger is set with a time delay equal to or a multiple of the channel time delays. Therefore, assuming a delay of td, and two paths introduced by the channel, the signal at the output of the rake receiver is:

^{2}(t)=1, and g(t)·g(t-td) is small due to the benefits from the autocorrelation properties of the PN sequences. In the Matlab code, the rake receiver was implemented to detect the strongest path and sort the rest of the paths in decreasing order of energy. This technique helps to reduce the number of fingers needed when some of the paths have very low energy values. In addition, the rake receiver coherently combines the two path components. As shown in the Matlab simulation, this technique hugely improves the quality of the received signal.

**BPSK, QPSK and more channel implementations**will be posted 🙂

Hello,

Thanks a lot for your code and explanation, I am trying to implement RAKE CDMA using OOK modulation, in order to reduce the energy consumption, I don’t know if you already tried it?

Thx

Thanks for your comment, but unfortunately, we haven’t tried that modulation. However, if you know how to code OOK in Matlab, you can just replace the 16QAM modulator and demodulator by OOK and the rest should be the same, if you want to use a multipath Rayleigh channel. The receiver structure shouldn’t change.