Lecture 1 - Spread Spectrum2
Lecture 1 - Spread Spectrum2
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
A Seminar
By: :Qasim Hadi Kareem
Tus. 26/02/2019
Fundamentals of Spread-Spectrum Techniques
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
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
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
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:
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
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
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
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
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
This recurrence relation is useful to find the taps if 2n successive bits are known to the
cryptanalyst.
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
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
(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
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
.
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
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
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