Communication Technology

 

 

 

 

Spread Spectrum

 

Spread Spectrum in Wireless Communication refers to a technology to spread narrow spectrum data (low chip rate) to wider spectrum (high chip rate). This technique has been used in early WLAN (e.g, 802.11b), CDMA, WCDMA.

 

A typical method of spreading a spectrum is illustrated as below.

[1] - this indicates the original data. This is assumed to be relatively low chip rate.

[2] - this indicates the frequence response of the data ([1]). As you see here, the frequency waveform looks very narrow.

[3] - this indicate a specific sequence of chips called 'spreading code'. Intuitively, you would notice that this has higher chip rate than the data.

[4] - this indicates the frequency response of the spreading code([3]). Intuitively, you would notice that this has much wider bandwidth in spectrum.

[5] - this shows the result of applying XOR to data sequence and spreading code sequence. This process is called 'spreading'. By this step, the data of low chip rate is converted to another sequence with higher chip rate.

[6] - this indicate the frequency response of the sequence [5]. This shows the much wider frequency band comparing to the data spectrum ([2]).

[7] - This is to show how to convert the spreaded sequence to the original data sequence. The method is very simple. Just XOR the spreaded sequence with the same spreading sequence and it gives you the original sequence.

[8] - this indicates the frequency response of the sequence [7].

 

 

NOTE 1 : As shown above, you would notice that the chip rate of the scrambled data gets higher than the chip rate of the original data. The ratio of the original data chip rate and the spreaded chip rate is called Spreading Factor.

 

NOTE 2 : In CDMA, a set of specially designed spreading code called Walsh code are used to spread the data in such a way that the chip rate of the spreaded data become 1.2288 Mcps (Mega chips per second). In Walsh Code, every spreading code has same spreading factor.

 

NOTE 3 : In WCDMA, a set of specially designed spreading code called OVSF(Orthogonal Variable Spreading Factor) code are used to spread the data in such a way that the chip rate of the spreaded data become 3.84 Mcps (Mega chips per second). In OVSF, there are multiple levels of code sets with different spreading factors. Depending on the data rate to be achieved, different spreading factors are applied.

 

 

 

Why Spreading ?

 

Why we do spread spreading ? There can be several advantages coming out of this technology. With specially designed spreading code, we can achieve advantages as follows.

  • We can make the chip rate of the signal at physical layer all the same regardless of chip rate (data rate) of user data
  • We can make the user data a random-like data which would make unwanted deciphering very difficult (i.e, improving security)
  • We can use scrambling codes as a tool to differetiate various physical channels occupying the same spectrum as other channels. When a scrambling code is used for this purpose, they are often called as 'channelization code'.

 

 

 

Octave Script

 

Following is the octave script that produced the plots show above. This is just for visualize the concept of spread spectrum, but not strictly complies to the implementation of spread spectrum in real world (e.g, CDMA, WCDMA, 802.11b)

N1 = 100; % Upsampling Rate

h1_t = ones(1,N1);

bits1 = 2000/N1;

 

N2 = 10; % Upsampling Rate

h2_t = ones(1,N2);

bits2 = 2000/N2;

 

rand ("seed", 102)

sig1 = randi([0 1],[1 bits1]);

sig2 = randi([0 1],[1 bits2]);

 

 

sig1_zerostuff = zeros(1,length(sig1) * N1);

sig1_zerostuff(1:N1:length(sig1_zerostuff)) = sig1;

sig2_zerostuff = zeros(1,length(sig2) * N2);

sig2_zerostuff(1:N2:length(sig2_zerostuff)) = sig2;

 

sig1_pulse = conv(sig1_zerostuff,h1_t);

sig1_pulse_mod = 2*sig1_pulse-1;

sig1_pulse_fft = circshift(fft(sig1_pulse_mod),floor(length(sig1_pulse_mod)/2));

sig1_pulse_fft = sig1_pulse_fft / max(sig1_pulse_fft);

sig2_pulse = conv(sig2_zerostuff,h2_t);

sig2_pulse_mod = 2*sig2_pulse-1;

sig2_pulse_fft = circshift(fft(sig2_pulse_mod),floor(length(sig2_pulse_mod)/2));

sig2_pulse_fft = sig2_pulse_fft / max(sig2_pulse_fft);  

sig_ss = xor(sig1_pulse(1:2000),sig2_pulse(1:2000));

sig_ss_mod = 2*sig_ss-1;

sig_ss_fft = circshift(fft(sig_ss_mod),floor(length(sig_ss_mod)/2));

sig_ss_fft = sig_ss_fft / max(sig_ss_fft);

sig_ds = xor(sig_ss(1:2000),sig2_pulse(1:2000));

sig_ds_mod = 2*sig_ds-1;

sig_ds_fft = circshift(fft(sig_ds_mod),floor(length(sig_ds_mod)/2));

sig_ds_fft = sig_ds_fft / max(sig_ds_fft);

 

subplot(4,3,[1 2]);

plot(sig1_pulse_mod);

xlim([0 length(sig1_zerostuff)]);

ylim([-2 2]);

axis("nolabel");

title("[1] data");

 

subplot(4,3,3);

plot(20*log10(abs(sig1_pulse_fft)));

xlim([0 length(sig1_zerostuff)]);

ylim([-40 0]);

axis("nolabel");

title("[2] Spectrum");

 

subplot(4,3,[4 5]);

plot(sig2_pulse_mod);

xlim([0 length(sig2_zerostuff)]);

ylim([-2 2]);

axis("nolabel")

title("[3] spreading code");

 

subplot(4,3,6);

plot(20*log10(abs(sig2_pulse_fft)));

xlim([0 length(sig2_zerostuff)]);

ylim([-40 0]);

axis("nolabel");

title("[4] Spectrum");

 

subplot(4,3,[7 8]);

plot(sig_ss_mod);

xlim([0 length(sig_ss)]);

ylim([-2 2]);

axis("nolabel")

title("[5] ss=XOR(data,spreading code)");

 

subplot(4,3,9);

plot(20*log10(abs(sig_ss_fft)));

xlim([0 length(sig_ss_fft)]);

ylim([-40 0]);

axis("nolabel")

title("[6] Spectrum");

 

subplot(4,3,[10 11]);

plot(sig_ds_mod);

xlim([0 length(sig_ds)]);

ylim([-2 2]);

axis("nolabel")

title("[7] dss=XOR(ss,spreading code)");

 

subplot(4,3,12);

plot(20*log10(abs(sig_ds_fft)));

xlim([0 length(sig_ds_fft)]);

ylim([-40 0]);

axis("nolabel")

title("[8] Spectrum");

 

 

 

Reference :

 

[1] CDMA Overview

[2] Principles of DS-CDMA