Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 69

Al-Mustansiriya

Technical
Technical
Engineering University
CollegeCollege
/ Al-Najaf
/ Al-Najaf
College of Techniques
Communications EngineeringEng. Dpt.
Electrical
ComputerEngineering Department
Networks-4th Class-2015/2016
Class-2011/2012
Ph.D. courses /Comm. Eng./2018-2019

Spread Spectrum Techniques in


Wireless Communication
Lec.#1:
Basic Spread Spectrum systems and
Generation of Direct Sequence SS Signals

A Seminar
By: :Qasim Hadi Kareem

Tus. 26/02/2019
Fundamentals of Spread-Spectrum Techniques

 Spread Spectrum refers to a system originally developed for military applications, to


provide secure communications by spreading the signal over a large frequency band.
 Figure below, represents a narrow band signal in the frequency domain. These
narrowband signals are easily jammed by any other signal in the same band.
Likewise, the signal can also be intercepted since the frequency band is fixed and
narrow (i.e. easy to detect).
Benefits of Spread-Spectrum Technology

1- Avoiding interception
 Spreading the transmitted power over a wider band undoubtedly lowers the
power spectral density, and thus hides the transmitted information within the
background noise.
 The intended receiver recovers the information with the help of system
processing gain generated in the spread process.
 The unintended receiver does not get the advantage of the processing gain and
consequently will not be able to recover the information.
 Because of its low power level, the spread spectrum transmitted signal is said to
be a Low Probability of Interception (LPI) signal.
Benefits of Spread-Spectrum Technology

2- Resistance to fading
 In a multipath propagation environment, the receiver acquires frequent copies of
the transmitted signal. These signal components often interfere with each other
causing what is commonly described as signal fading.
 The resistance of the spread-spectrum signals to multipath fading is brought
about by the fact that multipath components are assumed to be independent.
 This means that if fading attenuates one component, the other components may
not be affected, so that unfaded components can be used to recover the
information.
Benefits of Spread-Spectrum Technology

3- Accurate low power position finding


 The distance (range) between two points can be determined by measuring the
time in seconds, taken by a signal to move from one point to the other and back.
This technique is exploited in the Global Positioning System (GPS). Since the
signal travels at the speed of light (3 × 108 metres/sec),
𝑅𝑎𝑛𝑔𝑒 𝑖𝑛 𝑚𝑒𝑡𝑟𝑒𝑠 = 3 × 108 xtransit time/2
 In practice, the transit time is determined by monitoring the correlation between
transmitted and received code sequences. The transit time can be computed by
multiplying the code duration by the number of code bits needed to align the
two sequences.
Benefits of Spread-Spectrum Technology

3- Accurate low power position finding


 Higher resolution requires code symbols to be narrow which means high code rates.
 Thus, the sequences are selected to provide the required resolution so that if the code
sequence has N chips, each with duration 𝑇𝑐 seconds, then:

𝑚𝑎𝑥𝑖𝑚𝑢𝑚 𝑟𝑎𝑛𝑔𝑒 = 1.5 𝑁 𝑇𝑐 . 108 𝑚𝑒𝑡𝑟𝑒𝑠


 The range resolution requires the chip duration T to be small so that sequence
c

chip rate is as high as possible. On the other hand, maximum range requires a
long sequence (i.e. N is large) so that many chips are transmitted in a single
sequence period.
Benefits of Spread-Spectrum Technology

4- Improved multiple access scheme


 In FDMA, the radio spectrum is shared between the users such that a fraction of the
channel is allocated to each user at a time.
 In TDMA, each user is able to access the whole of the spectrum at a unique time slot.
 The spread spectrum offers a new network access scheme due to the use of unique code
sequences. This technique is called Code Division Multiple Access (CDMA).
Principles of spread-spectrum communications

 Digital transmission schemes which provide satisfactory performance and an adequate


bit rate can be arranged into two categories:
 In applications like satellite communications, these schemes provide efficient usage of
the limited power available.
 In applications such as mobile wireless, where the schemes achieve efficient usage of
the limited bandwidth available for the service in demand.
 The bandwidth expansion in spread spectrum is acquired through a coding process that
is independent of the message being sent or the modulation being used.
 The spread-spectrum concept has developed from the principle of Shannon theorem.
Concept & Process Gain

 The idea behind SSS can be drawn from the well known Shannon equation:
𝐶 = 𝐵 𝑙𝑜𝑔2 (1 + 𝑆𝑁𝑅)

 Assuming that the receiver is ideal with no loss of information, then C at its input and
output are the same:
𝐵𝑟𝑓𝑆𝑆𝑆 𝑙𝑜𝑔2 1 + 𝑆𝑁𝑅𝐼 = 𝐵𝑖𝑛𝑓 𝑙𝑜𝑔2 1 + 𝑆𝑁𝑅𝑜 or
𝐵𝑟𝑓𝑆𝑆𝑆
𝐵𝑖𝑛𝑓
𝑆𝑁𝑅𝑜 = 1 + 𝑆𝑁𝑅𝐼 −1
Concept & Process Gain

𝐵𝑟𝑓𝑆𝑆𝑆
 Let = 𝐺𝑝 which is called the process gain, then:
𝐵𝑖𝑛𝑓
𝐺𝑝
𝑆𝑁𝑅𝑜 = 1 + 𝑆𝑁𝑅𝐼 −1
and since 𝑆𝑁𝑅𝐼 is usually is very small (𝑆𝑁𝑅𝐼 << 1) for SSS, then:
𝑆𝑁𝑅𝑜 = 𝐺𝑝 𝑆𝑁𝑅𝐼 (recall that (1 + 𝑥)𝑛 ≈ 1 + 𝑛𝑥 𝑖𝑓 𝑥 << 1)
𝑆𝑁𝑅𝑜 𝐵𝑟𝑓𝑆𝑆𝑆
Or 𝐺𝑝 = =
𝑆𝑁𝑅𝐼 𝐵𝑖𝑛𝑓
i.e the advantage obtained in the SNR is the same as the ratio of the bandwidth expansion
or the Process Gain Gp.
Concept & Process Gain

 If perfect synchronization is accomplished, the desired signal collapses to its original


bandwidth, whereas any unwanted signal (such as noise, fading interference, multiuser
interference and jamming) will be uncorrelated with the received coded signal and will
be spread by the Tx local code.
Types of Spread Spectrum Systems (SSS):

 Spread spectrum signals are classified into many basic types:


1- Direct Sequence SSS . DS-SSS.
2- Frequency Hopping SSS. FH-SSS.
3- Time Hopping SSS. TH-SSS.
4- Pulse-FM or chirp (radar applications)
5- Hybrids. i.e DS-SSS followed FH-SSS or, FH-SSS followed by DS-SSS, TH-SSS/DS-
SSS
These basic spread spectrum systems are different by their modulation formats.
Most common types of spread-spectrum systems

 Two spread-spectrum systems are widely employed in the provision of reliable


communications: the Direct Sequence Spread Spectrum (DS-SS), and the Frequency
Hopped Spread Spectrum (FH-SS) systems.
 The DS-SS system executes the spreading of the data energy in real time by phase
modulating the data with a high rate code sequence.
 The FH-SS scheme performs the energy spreading in the frequency domain. And it is
accomplished by forcing the narrowband carrier to jump pseudo-randomly from one
frequency slot to the next according to the state of the code sequence in use.
 A hybrid of both schemes can be developed to improve the processing gain compared
to what is obtainable from a single scheme.
Direct Sequence SSS:

 This uses mostly the BPSK modulation as the basic modulation format
of the data by the wide band code c(t).
Direct Sequence SSS:

Receiver
Direct Sequence SSS:

 The time and frequency domains are shown for illustration.


Direct Sequence SSS:

 The time and frequency domains are shown for illustration.


Direct Sequence SSS/ PN code

 Pseudo-Noise (PN) sequence is a pseudorandom sequence of 1’𝑠 𝑎𝑛𝑑 0’𝑠 with some
statistical properties that are similar to noise.
 The sequence looks random from 3rd party point of view, but it is fully deterministic
from the designer point of view.
 Applications of PN include not only Comsec & Transec but extend control eng.( used
in system identification).
Direct Sequence SSS/ PN code

 There are many practical implementations for PN sequence generator, the simplest is
what is called feedback shift register (FBSR).
 The content of the shift register is shifted to the right for each clock pulse and a new
serial in bit is generated by a Boolean function.
 Depending on this function Shift register sequences are Classified into linear and
nonlinear FBSR.
Direct Sequence SSS/ PN code

 Linear FBSR:
In this case, the Boolean function is the Ex-OR only of some selected taps of the shift
register:

Where the +is the mod-2 addition and 𝑎𝑖 is a binary variable that specifies the taps to be
selected.
The PN sequence output can be taken from the final stage or any previous stage since the
only difference is a time shift.
Also, parallel outputs can also be used for other applications. This will gives a
pseudorandom non-binary sequence.
Direct Sequence SSS/ PN code

 For linear FBSR, the initial content cannot be all zero state since this will lock the
register to the zero state. Depending on the taps (a1, a2,a3,…………an) all statistical
properties of the output sequence are determined.
 There are 2𝑛 different ways to choose the taps but not all of these are useful.
 Statistical properties of the output PN sequence:
1- Period P: It is the no of bits after which the shift register repeats itself. For linear type,
its maximum is 2𝑛 − 1 bits.
2- Complexity: It is that part of the PN sequence necessary to find the whole sequence. For
linear maximum period PN sequence, only 2n bits are fair enough to find the whole 2𝑛
− 1 bits.
3- Randomness Properties: These are:
a- p(0) & p(1) at the O/P.
Direct Sequence SSS/ PN code

b-p(00),p(01),p(10),p(11),p(000),p(001),p(010),…… or the p(run of L bits).


For good sequences p(0)=p(1)= 0.5 or in general:
p(run of L bits)= (0.5)𝐿 .
c- Autocorrelation properties: 𝑅𝑠𝑠 𝑘 = σ𝑃𝑖=1 𝑆𝑖 𝑆𝑖+𝑘
For good sequence, the autocorrelation calculated over one or part of the period(partial
correlation) is close to a delta dirac fn., or two-valued with large difference between the
inphase and out of phase values, i.e:
Direct Sequence SSS/ PN code

 Choosing the taps for P=𝑃𝑚𝑎𝑥 =2𝑛 − 1 (maximal length linear FBSR):
 For any taps (a1, a2,a3,…………an) ,there is a corresponding characteristic polynomial
F(x) given by:

 (Note that 𝑎𝑛 =1 always otherwise the order of the FBSR will be less than n).
 Linear maximal length sequence is obtained if F(x) is irreducible (cannot be factored)
and primitive( generates all the elements). The no of such polynomial of degree n is
given by:
∅(2𝑛 −1)
 𝑤ℎ𝑒𝑟𝑒 ∅(𝐿)=no of integers less than L that are relatively prime to L.
𝑛
Direct Sequence SSS/ PN code

 For example, for n=4, then ∅(15) =8 (integers less than 15 and relatively prime to 15
are 14,13,11,8,7,4,2,1), hence there are 8/4=2 sets of taps that give 𝑃𝑚𝑎𝑥 for n=4. (note
also that ∅ (𝐿) =L-1 if L is prime).
 There is no general method that can be used to check or find these polynomials of order
n (or taps)satisfying maximal length conditions.
 A table is given in some books that give these polynomials in terms of the taps to be
selected for maximal length as shown:
Direct Sequence SSS/ PN code
Direct Sequence SSS/ PN code

 In above table, only half of the true taps are given. The 2nd half can be obtained by
subtracting other than an taps from n to obtain the new taps. For example, for n=4, table
above gives only [3,4], the 2nd set is [4-3,4]=[1,4] and so on.
 It should be noted, however, that the two PN sequences obtained from the [4,3] or [4,1]
taps are the same except for a time shift between them.
 Example: Generate the linear maximal length PN sequence obtained from the taps[1,4].
Then find its properties.
Direct Sequence SSS/ PN code
Direct Sequence SSS/ PN code

 To test other properties, then:


a-p(0)=7/15, p(1)=8/15 ≈ 0.5.
b-p(00)=3/15, p(01)=4/15, p(10)=4/15, p(11)=4/15≈ 0.25 almost equal, and so on for run of 3 bits.
c-Autocorrelation: To find 𝑅𝑠𝑠 (𝑘) for k=0 to P-1, then cyclically shift S(i) to the right by k and find
the no of bits that agrees and no of bits that disagrees, then:
𝑅𝑠𝑠 (𝑘)=(no of bits that agrees)-(no of bits that disagrees)
For k=0, then: 1 1 1 1 0 1 0 1 1 0 0 1 0 0 0
111101011001000
Agree bits=15, disagree bits=0, 𝑅𝑠𝑠 (0)=15-0=15.
For k=1, then: 1 1 1 1 0 1 0 1 1 0 0 1 0 0 0
011110101100100
Agree bits=7, disagree bits=8, 𝑅𝑠𝑠 (1)=7-8=-1
Direct Sequence SSS/ PN code

For k=2, then: 1 1 1 1 0 1 0 1 1 0 0 1 0 0 0


001111010110010
Agree bits=7, disagree bits=8, 𝑅𝑠𝑠 (2)=7-8=-1
And so on 𝑅𝑠𝑠 (3)=𝑅𝑠𝑠 (4)=……. 𝑅𝑠𝑠 (14)=-1 values
Direct Sequence SSS/ PN code

 A parameter of the 𝑅𝑠𝑠 (k) is called index of discrimination ID, where:


ID=Rss(0)-(max(𝑅𝑠𝑠 (k), k≠0), here ID=15-(-1)=16.
 High index of discrimination is not so much important in Com. sec, but it has a great
importance in Tran. Sec.
 Also, the normalized 𝑅𝑠𝑠 (k) is obtained by dividing by P=15:
Direct Sequence SSS/ PN code

Correlation functions
 The comparison of a signal with itself is described as the autocorrelation function. On
the other hand, the cross-correlation is a measure of similarity between two autonomous
signals.
 two binary sequences {a} and {b} with elements 𝑎𝑛 and 𝑏𝑛 that can be real or complex
such that:

In the analysis, we assume the two sequences to be periodic with long period N and
0≤n ≤N−1.
 Two correlation functions of interest when considering spread-spectrum
communications: periodic correlation function and aperiodic correlation function. Each
is designed for a specific application.
Direct Sequence SSS/ PN code

Periodic correlation function


 The periodic correlation function 𝑅𝑎,𝑏 (τ) of N-element sequences {a} and {b} is
defined by:
Direct Sequence SSS/ PN code

 Example: Sequences {a} and {b}, each with period N=15, are given by:
{a}={1, 1, 1, −1, 1, 1,−1,−1, 1,−1, 1,−1,−1,−1,−1}
{b}={1, −1,−1,−1,−1, 1,−1,−1,−1,−1, 1,−1,−1,−1,−1}
Find the periodic autocorrelation and cross-correlation functions of the sequences.
Solution:
Periodic autocorrelation functions with shift right is shown in the following sketches:
Direct Sequence SSS/ PN code
Direct Sequence SSS/ PN code
Direct Sequence SSS/ PN code
Direct Sequence SSS/ PN code

 Linear FBSR as a state machine


Let v(i) be a column vector representing the state of the shift register at time i, then:
v(i+1)=[A] v(i) mod-2, where [A] is a binary n x n transition matrix representing the taps.
The [A] matrix is always of the form with taps written in the 1st row, 1's just below the
main diagonal and 0's elsewhere.
For example, if the taps are [1,4], then:
Suppose that the cryptanalyst knows 2n successive bits of the sequence, then he can write:

G(1)=[v(1) v(2) v(3) …..v(n)] and,


G(2)=[v(2) v(3) v(4) ….v(n+1)]
Direct Sequence SSS/ PN code

Where G(1) & G(2) are nxn matrices, each column in them is the successive states of the
shift register.
Then G(2)=[A] G(1) and
[A]=G(2) [𝐺(1)]−1 ,i.e. [A] can be found from 2n successive bits.
If [A] is known then the key is known. Hence, the complexity of linear FBSR is 2n bits(
this is a weak point).
The 3rd party can know the whole 2𝑛 -1 if he knew only 2n bits.
Example: Apply the above procedure for the 4th order LFBSR with taps [1,4].
Solution: Recall the sequence 1 1 1 1 0 1 0 1 1 0 0 1 0 0 0. Take, say last 8 successive bits
1 1 0 0 1 0 0 0 , then:
v(1)=[0011], v(2)=[1001], v(3)=[0100], v(4)=[0010] and v(5)=[0001] and:
Direct Sequence SSS/ PN code

[G(2)] [𝐺(1)]−1 =[A].


Direct Sequence SSS/ PN code

Recurrence Relation of the Linear FBSR:


Let the output PN sequence be s(i) for i=0 to P-1, then if the 1st n bit is known (initial
state), then the next bits can be found in terms of the taps(a1, a2,……..an) and the present
state, i.e.,

This is called the recurrence relation.


For example, if the taps are [1001], and the initial state is [1111]=[S(1),S(2),S(3),S(4)],
then:
Direct Sequence SSS/ PN code

This recurrence relation is useful to find the taps if 2n successive bits are known to the
cryptanalyst.
Direct Sequence SSS/ PN code

Example: for the following Direct sequence spread-spectrum modulation and


demodulation system:
Direct Sequence SSS/ PN code

Example-cont. : A binary data stream of 4 digits [1011] is spread using an 8-chip code
sequence C(t)= [01 10 10 01]. The spread data phase modulates a carrier using binary phase
shift keying.
The transmitted spread-spectrum signal is exposed to interference from a tone at the carrier
frequency but with 30 degrees phase shift. The receiver generates an in-phase copy of the
code sequence and a coherent carrier from a local oscillator.
i. Determine the baseband transmitted signal.
ii. Express the signal received. Ignore the background noise.
iii. Assuming negligible noise, determine the detected signal at the output of the receiver.
Solution
i. Let the data stream be denoted as m(t). The baseband spread-spectrum data 𝑚𝑆 (𝑡) can
be represented as:
Direct Sequence SSS/ PN code

𝑚𝑆 (𝑡) = m(t) · C(t) = [01 10 10 01, 10 01 01 10, 01 10 10 01, 01 10 10 01]


Since the data is transmitted as binary PSK, we map 0→-1 and 1→1.
ii. The baseband spread-spectrum signal, 𝑚𝑆 (𝑡) , now modulates a carrier at frequency 𝑤𝑐
and the transmitted signal, 𝑚𝑡 (t), is given by:
𝑚𝑡 (t) = 𝑚𝑆 (t) · cos𝑤𝑐 t.
The received signal 𝑚𝑟 (t) comprised the baseband signal 𝑚𝑡 (t), the interfering tone
I(t), and additive white noise n(t). However in this example we ignore the noise so that
signal plus interference is: 𝑚𝑟 (t) = 𝑚𝑡 (t) + I(t)
The interfering signal is a sinusoidal waveform at frequency 𝑤𝑐 with 30 degrees phase
shift: I(t) = cos(𝑤𝑐 t + 30)
Thus, the received signal 𝑚𝑟 (t)=𝑚𝑡 (t)+cos(𝑤𝑐 t+30)
Direct Sequence SSS/ PN code

iii. The front end stage of the receiver mixes the received signal mr(t) with the local
oscillator by multiplying 𝑚𝑟 (t) by the reference carrier, (cos𝑤𝑐 t) to compose the baseband
signal, 𝑚𝑏 (t). Therefore:
𝑚𝑏 (t) = 𝑚𝑡 ( (t) · cos 𝑤𝑐 t + cos(𝑤𝑐 t + 30) · cos𝑤𝑐 t
= 0.5𝑚𝑆 (t)[1 + cos 2 𝑤𝑐 t] + 0.5[cos 30 + cos(2 𝑤𝑐 t + 30)]
Assume that 2 𝑤𝑐 is removed by filtering and the signal level adjusted to unit by
amplification then:
𝑚𝑏 (t) = 𝑚𝑆 (t) + cos 30
The next stage in the detection provokes the collapse of the spread spectrum into its
original narrowband data. The de-spread signal 𝑚𝑑 (t) is given by multiplying 𝑚𝑏 (t) by
the locally generated code sequence, that is:
𝑚𝑑 (t) = 𝑚𝑏 (t) · C(t) = [𝑚𝑆 (t) + cos 30] · C(t)
= m(t) · C(t) · C(t) + 0.866C(t)
Direct Sequence SSS/ PN code

Now C(t) · C(t) is a constant which can be normalized to one. The detector samples the de-
spread signal at the code sequence rate and adds the samples to be compared with a
threshold level. The summation of the sample of C(t) when sampled at the code rate is
σ7𝑘=0 𝐶(𝑘𝑇𝑐 )=−1 + 1 + 1 − 1 + 1 − 1 − 1 + 1 = 0
Therefore 𝑚𝑑 (t)=m(t)
The output of the receiver is [10 11].
Direct Sequence SSS/ PN code

Example: Consider a DS-BPSK spread spectrum transmitter in the Fig. 1. Let d(t) be a
binary sequence 1101 arriving at a rate of 100 bps, where left most bit is the earliest bit.
Let c(t) be the pseudorandom binary sequence 100110111000 with a clock rate rate of 300
Hz. Assuming a bipolar signaling scheme with a binary ‘0’ and binary ‘1’ represented by a
signal levels ‘-1’ and ‘+1’, respectively: Calculate he following:-
(a) The final transmitted binary sequence corresponding to the bipolar signal sequence,
p(t)
Solution: d(t): 1101
x(t): +1 +1 -1 +1
c(t): 100110111000
g(t): +1 -1 -1 +1 +1 -1 +1 +1 +1 -1 -1 -1
Direct Sequence SSS/ PN code

Spread sequence, p(t) = x(t)g(t):


x(t): +1 +1 +1 +1 +1 +1 -1 -1 -1 +1 +1 +1
g(t): +1 -1 -1 +1 +1 -1 +1+1+1 -1 -1 -1
p(t): +1 -1 -1 +1 +1 -1 -1 -1 -1 -1 -1 -1
Binary sequence corresponding to p(t): 100110000000
(b) The bandwidth of the transmitted spread signal
Solution:
Bandwidth of the transmitted spread signal (DSSS-BPSK) is same as clock rate of
the pseudorandom binary sequence (= 300 Hz).
(c) The processing gain in dB
Solution: Processing gain = (Pseudorandom chip rate)/(data rate)=300/100 = 3 = 10log(3)
dB = 4.77 dB
Direct Sequence SSS/ PN code

(d) Assuming that the spread signal is not corrupted by noise, suppose the estimated
delay at a spread spectrum receiver is too large by one chip time, find the de-spread and
decoded signal sequence (assuming majority logic decoding)
Solution:
De-spread sequence, (p(t))(delayed g(t)) =
p(t): +1 -1 -1 +1 +1 -1 -1 -1 -1 -1 -1 -1
g’(t): -1 +1 -1 -1 +1 +1 -1 +1 +1 +1 -1 -1
r(t): -1 -1 +1 -1 +1 -1 +1 -1 -1 -1 +1 +1
Majority logic decoding (taking 3 bits at a time) yields: 0001
(e) The number of bit errors due to the estimation delay
Solution: In comparison with d(t), we see that the decoded bit sequence differs
in bit positions 1 and 2. Thus, the no. of bit errors in the decoded sequence is 2.
Direct Sequence SSS/ PN code

Example: A DSSS system transmits at a rate of 1000 bits/sec in the presence of a tone
jammer. The average jammer power is 20 dB greater than the average desired signal power
and the required 𝐸𝑏 /𝐽𝑜 to achieve satisfactory performance is 10 dB. Note: 𝐸𝑏 denotes
average bit energy and 𝐽𝑜 denotes jamming power spectral density. Calculate:
(a) The ratio of spreading bandwidth, 𝑊𝑠 , to the transmission rate, R: (Hint: Express
𝐸𝑏 in terms of corresponding average power, and transmission rate.)
Solution:

where 𝑃𝑎𝑣 denotes average transmit power, 𝐽𝑎𝑣 denotes the average jamming power and
1
𝑇𝑏 = denotes bit duration with R being the transmission rate.
𝑅
Thus
Direct Sequence SSS/ PN code

(b) The bandwidth of the spread signal


Solution:
𝑊𝑠
𝑑𝐵 = 30𝑑𝐵 = 103
𝑅
And 𝑅 = 103 (given)
Thus,
𝑊𝑠 = 103 . 103 =106 =1 MHz
Direct Sequence SSS/ PN code

Example: In a DS/BPSK system delivers a processing gain of 20 dB. The system is


required to have a probability of error due to externally generated interfering signals that
does not exceed 10−6 . (Refer Fig. 1 and Fig. 2 for typical BER plot and/or Q-function
table if necessary). Calculate:
(a) The 𝐸𝑏 /𝐼𝑜 ratio for the specified probability of error
Solution:
Probability of error for BPSK modulation:
2𝐸𝑏
𝑃𝑒 = 𝑄
𝑁𝑜

Given that probability of error (bit error rate) = 10−6 , and referring to Fig. 1 (or
alternatively to the table in Fig. 2), we see that the required 𝐸𝑏 /𝑁𝑜 (or 𝐸𝑏 /𝐼𝑜 in this case
since noise is negligible) is approximately 10.5 dB.
Direct Sequence SSS/ PN code

(b) The jamming margin


Solution:
Jamming margin (dB) = 𝐺𝑃 - 𝐸𝑏 /𝐼𝑜
= 20 - 10.5 = 9.5 dB
Direct Sequence SSS/ PN code

.
Direct Sequence SSS/ Gold sequence

 A Gold code, also known as Gold sequence, is a type of binary sequence, used in
telecommunication (CDMA) and satellite navigation (GPS).
 Gold codes have bounded small cross-correlations within a set, which is useful when
multiple devices are broadcasting in the same frequency range.
 A set of Gold code sequences consists of 2𝑛 + 1 sequences each one with a period of
2𝑛 − 1.
 Two maximum length sequences of the same length 2𝑛 − 1 such that their absolute
cross-correlation is less than or equal to 2(𝑛+2)/2 , where n is the size of the linear
feedback shift register used to generate the maximum length sequence (Gold sequence).
 The set of the 2𝑛 − 1 exclusive-Ors of the two sequences in their various phases (i.e.
translated into all relative positions) is a set of Gold codes.
 The highest absolute cross-correlation in this set of codes is 2(𝑛+2)/2 + 1 for even n and
2(𝑛+1)/2 + 1 for odd n.
Direct Sequence SSS/ Gold sequence

 The exclusive or of two different Gold codes from the same set is another Gold code in
some phase.
 Within a set of Gold codes about half of the codes are balanced – the number of ones
and zeros differs by only one.
 For example, take the polynomials: 1 + 𝑥 2 + 𝑥 5 and 1 + 𝑥 1 + 𝑥 2 + 𝑥 4 + 𝑥 5
Direct Sequence SSS/ Gold sequence

 m-sequences gave only one sequence of length 25 − 1 . By combining two of these


sequences, we can obtain up to 31 (25 − 1 ) plus the two m-sequences themselves,
generate 33 sequences (each one length 25 − 1 ) that can be used to spread different
input messages (different users CDMA).
 The wanted property about Gold codes is that they are balanced (i.e. same number of 1
and -1s).
 In addition to their advantage in generating large numbers of codes, the Gold codes
may be chosen so that over a set of codes available from a given generator the
autocorrelation and the cross-correlation between the codes is uniform and bounded.
When specially selected m sequences, called preferred m-sequences, are used the
generated Gold codes have a three valued cross-correlation.
Direct Sequence SSS/ Gold sequence

 Important subset of Gold codes


are the Preferred Pair Gold codes.
Direct Sequence SSS/ Gold sequence

 Predictable cross-correlation properties are necessary in an environment where one


code must be picked from several codes which exist in the spectrum.
 Only part of the generated Gold codes are balanced.
 [5,4,3,2] = -1 -1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1-1 1 1 1-1 1 1 1 1 1-1 -1 1 -1-1 1 1
 [5,3] (0) = -1 -1 -1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 1 1 1 1 -1-1-1 1 1-1 1 1 1 -1 1-1 1
 Gold(0) = -1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 1 -1 1 1-1-1-1-1 1 1-1-1 1 1 1-1 -1 1 1-1
 σ Gold(0) = -19 = not balanced
 [5,4,3,2] = -1 -1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 -1 1 1 1 -1 1 1 1 1 1 -1 -1 1 -1 -1 1 1
 [5,3] (1) = 1 -1 -1 -1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 1 1 1 1 -1 -1 -1 1 1 -1 1 1 1 -1 1 -1
 Gold(1) = 1 -1 -1 -1 1 1 1 1 1 1 1 -1 -1 -1 1 -1 -1 -1 1 1 1 1 -1 -1 -1 1 -1 1 -1 -1 1
 σ Gold(1)= 1 = balanced
Direct Sequence SSS/ Gold sequence
Direct Sequence SSS/ Gold sequence
Direct Sequence SSS/ Gold sequence

Example: Four sequences, 7-bits each, are all chosen from a set of Gold sequences.
Compute the cross-correlation between each pair and suggest a format that eliminates this
cross-correlation. Assume the zero time shift between the sequences.
G1 =[01 01 00 0]
G2 =[00 10 01 0]
G3 =[10 00 00 1]
G4 =[11 11 01 1]
Solution:
Direct Sequence SSS/ Gold sequence

Now let us zero-pad the sequences, we get the following sequences:


G1 =[01 01 00 00]
G2 =[00 10 01 00]
G3 =[10 00 00 10]
G4 =[11 11 01 10]
It can be shown that the cross-correlation between any pair of these sequences is zero.
Direct Sequence SSS/Hadamard-Walsh Codes

 The Hadamard-Walsh codes are generated in a set of N = 2𝑛 codes with length N = 2𝑛 .


The generating algorithm is simple:

 The rows (or columns) of the matrix 𝐻𝑁 are the Hadamard-Walsh codes.
Direct Sequence SSS/Hadamard-Walsh Codes

 In each case the first row (row 0) of the matrix consist entirely of 1s and each of the
other rows contains N/2 0s and N/2 1s. Row N/2 starts with N/2 1s and ends with N/2
0s.
 The distance (number of different elements) between any pair of rows is exactly N/2.
For 𝐻8 the distance between any two rows is 4, so the Hamming distance of the
Hadamard code is 4. The Hadamard-Walsh code can be used as a block code in a
channel encoder: each sequence of n bits identifies one row of the matrix (there are N
=2𝑛 possible rows).
 All rows are mutually orthogonal:
 for all rows i and j. The cross-correlation between any two Hadamard-Walsh codes of
the same matrix is zero, when perfectly synchronized. In a synchronous CDMA system
this ensures that there is no interference among signals transmitted by the same station.
Direct Sequence SSS/Hadamard-Walsh Codes

 Figure below, comprising of a clock, three AND gates, and two toggle flip flops and
OR gate.
 The edge-triggered Toggle Flip Flop (T-FF)
is a standard JK flip flop, with both J and K
connected to high, and each stage divides the
input clock by 2. The input to the generator
is eight bits from the clock 01010101, so the
output from the first T-FF is 00110011 and
from the second T-FF is 00001111.
The binary variables u2 u1 u0 represent a Walsh code index as shown in this table below:
Direct Sequence SSS/Hadamard-Walsh Codes

 The binary variables u2 u1 u0 represent a Walsh code index as shown in this table
below:
 It can be seen that to generate aWalsh code of length 16 bits, we need to use three T
FFs, four ANDs and one OR gate. In general, for a Walsh code of length n, we use n–1
toggled flip flips, n AND gates and one multi-input OR gate.
Direct Sequence SSS/Calculation of autocorrelation function for M- sequences

 Autocorrelation function is calculate using the different code sequences as shown.


From the calculation, we see that the best
sequence is: indata = [1,1,1,-1,-1,1,-1] because the
value is the maximum duration Auto-correlation a chip
and this value is 7 and the value is -1 otherwise.
Sequence, the bad is: indata = [1,1,1,1,1,1,1], which has
The maximum value for the whole autocorrelation sequence
length.
Direct Sequence SSS/Calculation of cross-correlation function for M- sequences

 From the calculations, we see that we get the


best correlation when sequences are balanced (the
number of 1 and -1 differ by one unit). In our case the
best correlation is obtained for:
indata1 = [1,1,1,-1,-1,1,-1] and indata2 = [1,-1,1,-1,1,-1,1].

You might also like