Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are...

32
ECE 633 - HTE Şubat 2013 Sayfa 1 Spread Spectrum Systems HTE - 03.02.2013 1. Basics Up to now, four axes have been discovered and used to multiplex message signals. Basically each uses the idea of orthogonality along one of these axes. These are a) Frequency division multiplexing (FDM), the one of the oldest, it simply corresponds to placing message signals onto different sinusoidal time signals, carriers (orthogonal delta functions along frequency axis). This process can also be regarded as shifting the original spectrums of the message signals to different around frequencies along frequency axis. b) Time division multiplexing (TDM) is achieved by sampling the message signals at different times, thus putting the message signal in orthogonal order along time axis. c) Physical division multiplexing (PDM), considering the diffractive nature of propagation of electromagnetic waves and the reduction of signal intensity with propagation distance, multiplexing can also be achieved along spatial axis by placing message signals far apart. Another way of PDM is electrically isolating the message signals or inserting insulating material between the propagation paths of message signals, like the one in cables d) Code division multiplexing (CDM), this is basically assigning (multiplying) message signals by different (spreading) codes which are assumed to be orthogonal to each other. Spread spectrum (SS) systems are based on CDM. Although for a given communication system, the use of one single multiplexing scheme is sufficient to achieve separation of signals, they can also be combined to increase the number of signals multiplexed, like the combined use of FDM, TDM and PDM in GSM. For spread spectrum systems, since CDM is considered sufficient to establish the desired level of multiplexing (i.e. separation of signal), we will carry out the analysis under the assumption that the message signals are overlaid along frequency, time and physical (spatial) axis. So our SS message signals will be concurrent, coincident and collocated along time, frequency and spatial axes. Another point that needs to be clarified is that, the act of placing our message signal onto a high frequency carrier serves only to shift the spectrum of the message signal or signals so that the transmitted signal or signals are better suitable for antenna dimensions, the communication medium. In this sense, the use of such a carrier has no effect on our analysis and will be excluded from our treatment. Here we concentrate on single carrier spread spectrum systems otherwise called as direct sequence (DS) systems and leave out frequency hopping (FH). We assume a message signal in the form of binary, i.e. two waveform representation of 2 M , amplitude shift keying (ASK) or phase shift keying (PSK) expressed in the following manner (1.1) n b n vt agt nT

Transcript of Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are...

Page 1: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 1

Spread Spectrum SystemsHTE - 03.02.2013

1. Basics

Up to now, four axes have been discovered and used to multiplex message signals. Basically eachuses the idea of orthogonality along one of these axes. These are

a) Frequency division multiplexing (FDM), the one of the oldest, it simply corresponds to placingmessage signals onto different sinusoidal time signals, carriers (orthogonal delta functions alongfrequency axis). This process can also be regarded as shifting the original spectrums of themessage signals to different around frequencies along frequency axis.

b) Time division multiplexing (TDM) is achieved by sampling the message signals at different times,thus putting the message signal in orthogonal order along time axis.

c) Physical division multiplexing (PDM), considering the diffractive nature of propagation ofelectromagnetic waves and the reduction of signal intensity with propagation distance,multiplexing can also be achieved along spatial axis by placing message signals far apart. Anotherway of PDM is electrically isolating the message signals or inserting insulating material betweenthe propagation paths of message signals, like the one in cables

d) Code division multiplexing (CDM), this is basically assigning (multiplying) message signals bydifferent (spreading) codes which are assumed to be orthogonal to each other.

Spread spectrum (SS) systems are based on CDM. Although for a given communication system, theuse of one single multiplexing scheme is sufficient to achieve separation of signals, they can also becombined to increase the number of signals multiplexed, like the combined use of FDM, TDM andPDM in GSM. For spread spectrum systems, since CDM is considered sufficient to establish thedesired level of multiplexing (i.e. separation of signal), we will carry out the analysis under theassumption that the message signals are overlaid along frequency, time and physical (spatial) axis. Soour SS message signals will be concurrent, coincident and collocated along time, frequency andspatial axes.

Another point that needs to be clarified is that, the act of placing our message signal onto a highfrequency carrier serves only to shift the spectrum of the message signal or signals so that thetransmitted signal or signals are better suitable for antenna dimensions, the communicationmedium. In this sense, the use of such a carrier has no effect on our analysis and will be excludedfrom our treatment.

Here we concentrate on single carrier spread spectrum systems otherwise called as direct sequence(DS) systems and leave out frequency hopping (FH).

We assume a message signal in the form of binary, i.e. two waveform representation of 2M ,amplitude shift keying (ASK) or phase shift keying (PSK) expressed in the following manner

(1.1)n bn

v t a g t nT

Page 2: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 2

where na are the symbols of the message signal with 1, 1 or 1n na a indicating that the

message symbols are the binary antipodal waveforms, while g t is the shaping waveform, mostly a

rectangular pulse, scaled to have unit energy in the binary waveform duration bT of the message

signal such that

0.5 0

(1.2)0 otherwiseb bT t T

g t

bg t nT in (1.1) represents the time advance and the delayed versions of g t .

Now, for spreading sequence, also named as signature sequence or PN (pseudo noise) sequence, welimit our time interval zero to bT and define

1

0 0 (1.3)

Lc

i c bi

e t c p t iT t T

where 1, 1 or 1i ic c , /c b cL T T is the length of spreading sequence, also called the

processing gain, with cT indicating the duration of one pulse of the spreading waveform, e t . cT is

also called the chip duration. p t is again a rectangular waveform such that

1 0

(1.4)0 otherwise

ct Tp t

If scaling is important we can revised (1.4) and put it in the form similar to (1.2), thus (1.4) becomes

0.5 0

(1.5)0 otherwisec cT t T

p t

To save on bandwidth, we can convert p t into the (half) sine as shown below

2sin / 0

(1.6)0 otherwise

c ct T t Tp t

Exercise 1.1 : Find the scaled version of (1.6) so that

2

0

Energy in 1 (1.7)Tc

pp t p t dt

Example 1.1. : To prove that (1.6) actually more bandwidth efficient than (1.4), we wish to run asimple MATLAB code, given in ptspectrum.m. By running this code we see that most of the energy in

p t is concentrated around low frequencies, thus p t of (1.6) occupies less bandwidth than p tof (1.4) or (1.5).

Page 3: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 3

Exercise 1.2 : In the m file ptspectrum.m, change p t to the followings and find whether there are

any bandwidth saving improvements

2

2

2 2

1 cos / 0 (1.8)

0 otherwise

exp 0

0

c c

cc

t T t Tp t

t t Tp t A T

(1.9)

otherwise

where A is a factor for the variance of the exponential, examine the bandwidth variation of againstA as well.

Returning to the PN (signature) sequence given in (1.3), we normally express the ic coefficients in the

following vectorial form.

0 1 2 3 1 [ , , , , , ]

Sample PN sequence 1 1 1 1 1

cL

b

c

T

T

c c c c c

c

(1.10)

It is important to realize that the time spacing (decimation) between the elements of vector c is cT ,

while the whole duration of c is bT . To create effective code division multiplexing, we expect the

cross correlations of the PN sequences used for different message signals to approach (normalized)zero. We analyse this subject in more details later.

Now a DS spread signal, s t is obtained by multiplying v t from (1.1) by e t of (1.3), hence

1

0 (1.11)

n bn

Lc

n b i cn i

s t v t e t a g t nT e t

a g t nT c p t iT

Assuming g t and p t are both rectangular waveform with unity amplitude during the time

interval of existence, then s t will become

1

0 (1.12)

Lc

n in i

s t a c

Under a single summation covering the message symbols, (1.12) will turn into

Page 4: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 4

0 1 2 1

0 1 2 3

1

2 3

1

n Lcn

n b n b c n b c n b cn

n L b c cc

s t a c c c c

a c p t nT a c p t nT T a c p t nT T a c p t nT T

a c p t nT L T

(1.13)

where on the second and third lines of (1.13), the time shifted copies of p t is reinserted to

demonstrate clearly the time decimation in increments of cT . Thus in a time increment of cT , s tcan only take on the value of 1 , as shown below

1 for 1 (1.14)n i b c b c b cs t a c p t nT iT nT iT t nT i T

It is important to realize that n counts in increments of bT , while i counts in increments of cT and in

practice, b cT T or / 1c b cL T T .

It is instructive to analyse the typical time waveforms of v t , e t and s t and their related

frequency spectrums, i.e. V f , E f and S f . This is done in Fig. 1.1

Fig. 1.1 Time waveforms and frequency spectrums of (sample) message signal, spreading signal andthe spread signal.

As observed from Fig. 1.1, after the spreading operation, i.e. after multiplying v t by e t the

spread signal s t has a bandwidth nearly the same as e t . This means by the spreading operation,

we have expanded the bandwidth of the original message signal.

Bearing in mind the relation b cT T , we approximate the spectrums of V f , E f and S f to

rectangular shape rather than the sinc profiles seen in Fig. 1.1. By assuming such bandwidths (BW)

0 50 100 150-1

0

1

t

v(t

)

Tb

0 50 100 150-1

0

1

t

e(t

)

0 50 100 150-1

0

1

t

s(t

)

Tb

Tc

0 0.02 0.04 0.06 0.08 0.1 0.120

20

40

60

f

V(f

)

0 0.02 0.04 0.06 0.08 0.1 0.120

20

40

f

E(f

)

0 0.02 0.04 0.06 0.08 0.1 0.120

20

40

f

S(f

)

Tb

Tb

Tb

Page 5: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 5

will be given by 1 / , 1 /b b c cB T B T , then V f , E f and S f will become as shown in Fig.

1.2. Note that the spectrum of S f can be deduced from the relations

If , then , : convolution operator (1.15)s t v t e t S f V f E f

Fig. 1.2 Approximated rectangular spectral representations for V f , E f and S f .

Exercise 1.3 : Prove analytically that the spectrum of S f is as shown in Fig. 1.2 via the use of

convolution.

Before we conclude this section, we want to write the mathematical expression of the DS signal with

a carrier. So after multiplying s t by a sinusoidal carrier at frequency of cf , we get

cos 2 (1.16)c cu t A s t f t

Since we know that (1.14) that 1s t in any given cT time interval, then (1.16) can also be

converted into

cos 2

0 when 1 (1.17)

when 1

c cu t A f t t

s tt

s t

(1.17) reveals that DS signal with a carrier is exactly in the form of binary phase shift keying (PSK).

Below we continue without the sinusoidal carrier, since it has no effect on our analysis as statedbefore.

2. Demodulation (Detection) of DS Signal

E ( f )

S ( f )

f

f

f = - Bb= - 1 / Tb

f = - Bc= - 1 / Tc

f = Bb = 1 / Tb

f = Bc= 1 / Tc

BW = 2 / Tc

Narrow band signalTb / 2

V ( f )

f

Tc/ 2

t

v ( t )

e ( t )

t0 Tc

Tb0

1

1

BW = 2 / Tb

BW = 2 / Tc + 2 / Tb

f = Bc + Bb

= 1 / Tc + 1 / Tb

Tc

F

F

Wide band signal

f = - Bc - Bb

= - 1 / Tc - 1 / Tb

f = - 1 / Tc + 1 / Tb f = 1 / Tc - 1 / Tb Wide band signal

Page 6: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 6

We assume that the received signal is r t . To recover the message signal, we first multiply it by the

locally generated PN sequence, that is supposed to be time synchronised (or phase locked) to the

e t used at transmitter. This multiplication corresponds to dispreading operation, then the resultant

is integrated from zero up to bT . As a whole act is called correlating the received signal with the

locally generated PN sequence of the receiver. The output of the correlator is named z , which isconsidered to contain sufficient statistics that will enable a decision on the transmitted messagesignal. For this purpose we feed z to a decision making device, i.e. a detector.

Fig. 2.1 Demodulation of DS signal.

To simplify the description of the operations in Fig. 2.1, we assume an all pass (band unlimited)

channel with time and frequency responses of , 1c t t C f , this means that if we also

exclude additive white Gaussian noise (AWGN), then we receive an exact replica of the transmitted

signal, thus r t will be

(2.1)r t s t v t e t

The output of the correlator will be

2

0 0

(2.2)T Tb b

z r t e t dt v t e t dt

If we are considering the time interval zero up to bT as the integral limits in (2.2) indicate, then

according to (1.1), we can set 0n . In this time interval, we have 00nv t a

, if g t is

rectangular, then

20

0

(2.3)Tb

z a e t dt

Page 7: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 7

In (2.3), the integral is simply the energy in e t . From the definition given underneath (1.3), we

know that in e t , the coefficient 1ic , thus 2 1e t for any cT time interval and also for the

whole duration of bT . Taking into the length of c is cL and we turn the integration (2.3) into a

vector inner product or matrix multiplication with dt being cT , then we get

20 0

0

(2.4)Tb

bz a e t dt a T

Or if we apply normalization, then 0z a . So with all pass channel and without noise (and with the

presence of only one message signal), our correlator is able to recover the transmitted symbolexactly and our decision device will always give the correct decision.

Next we analyse the effect of noise. With noise signal, n t added to s t , r t will become

(2.5)r t s t n t v t e t n t

Then, following the above development, z of (2.4) will in this case turn into

0 0 10

(2.6)Tb

b bz a T n t e t dt a T n

where 1n is the instantaneous noise sample. Noise is statistical, hence it is best to continue with

variance, i.e. noise power, defined by taking the expectation denoted by E over two noise

samples, which will be given by

1 20 0 0 0

20 0 0

0 0 0

(2.7)2 2 2

T T T Tb b b b

T T Tb b b

b

E n n E n t e t dt n e d E n n t e t e dtd

N N Nt e t e dtd e t dt T

Using (2.4) or (2.6) and (2.7), we find the signal to noise ratio (SNR) as

2 2 20 0 0

0 0 0

Energy inSNR (2.8)/ 2 / 2 / 2 Noise spectral density (two sided)b b b

b

a T a T aN T N N

(2.8) shows that the SNR of DS spread spectrum systems is no different from binary PSK (or ASK) in anarrow band system.

Now we consider the interference rejection capability of the spread spectrum systems, so we expressthe received signal as

(2.9)i ir t s t I v t e t I

Page 8: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 8

where the interference is represented by the term iI which is a DC term, is overlapping with s talong frequency axis (along time axis as well). In this case we calculate the decision statistics, asfollows

20

0 0 0

(2.10)T T Tb b b

i b iz v t e t dt I e t dt a T I e t dt

As we shall see later, the spreading sequence, e t mostly consists of odd length of 2 1cL m ,

out of which m number of ic coefficients will for instance be 1 and 1m number of ic coefficients

will for instance be 1 or the other way round. In any case the integral of e t over the whole

interval of bT will be cT . So after rearrangement (2.10) will become

0 0 000 0 0

1 1 1 (2.11)Tb

i i c ib b b

b b c

I I T Iz a T e t dt a T a Ta T a T a L

(2.11) means that during the demodulation (dispreading) process at the receiver, the transmittedsymbol is recovered without loss, but the interfering signal is reduced in amplitude by factor of cL ,

where 1cL . In other words, the demodulation process at the receiver restores the signal from the

wide band spectrum (extending from 1 / 2 /c bf T T to 1/ 2 /c bf T T ) back to its original

narrow band spectrum (extending from 1 / bf T to 1/ bf T ), without any loss, but this action

will also spread the interfering signal to a wide spectrum (extending from 1 / cf T to 1/ cf T ),

so its power remaining within the message signal bandwidth (extending from 1 / bf T to

1/ bf T ), will be much reduced.

Example 2.1 : Assume that we have a DS system 0 1 Va and an interference of 10 ViI . If

1 msecbT and 1μsec

cT , find the (message) signal power to interference power ratio (SIR) prior

to demodulation (despreading) and after demodulation.

Solution : Normalized power is calculated by taking the square of the voltage, thus beforedemodulation, we will have

2 20

Prior to demodulationSignal power : 1 W , Interference power : 100 W

1SIR 0.01 or 20 dB (2.12)100

s i i

s

i

P a P IPP

We know from (2.11) that after demodulation, the amplitude level of the interference will bereduced by / 1000c b cL T T , thus

Page 9: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 9

22 40

44

After demodulation

Signal power : 1 W , Interference power : / 1 10 W1SIR 10 or 40 dB (2.13)

1 10

s i i c

s

i

P a P I LPP

From the comparison of (2.12) to (2.13), we understand that demodulation (despreading) operationhas resulted in an SIR improvement of 60 dB.

Now we investigate the interference coming from another user (message signal). Such aninvestigation is important in the sense that, DS spread spectrum message signals are overlaid in timeand frequency. Such analysis will also reveal valuable information on the properties on PNsequences. For simplicity, we take the case of two users as illustrated in 2.2.

Fig. 2.2 Block diagram of a DS system consisting of two users.

As seen in Fig. 2.2, we have utilized different PN sequences for the two users. Normally the blockdiagram of Fig. 2.2 would extend to , we have K number of users. As in the case of Fig. 2.1, we haveassumed an all pass channel.

For the configuration of Fig. 2.2, the received signal, r t will become

1 1 2 2 (2.14)r t s t v t e t v t e t

After the correlation, the output on the upper branch, i.e., 1z takes the form of

21 1 1 2 1 2

0 0

(2.15)T Tb b

z v t e t dt v t e t e t dt

If

Page 10: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 10

1 1

2 2 (2.16)

n bn

n bn

v t a g t nT

v t a g t nT

which means, there is no time delay between 1v t and 2v t , i.e. synchronous operation, then in

the zeroth time interval of 0 bt T , (2.15) will be

1 1 0 2 0 1 20

(2.17)Tb

bz a T a e t e t dt

Similarly for the lower branch we obtain 2z as

2 2 0 1 0 1 20

(2.18)Tb

bz a T a e t e t dt

For correct demodulation, we expect that (2.17) delivers 1 0a , while (2.18) delivers 2 0a . For this to

happen, the second terms, i.e. the terms involving integration should go to zero or approximate tozero. For simplification recalling that the symbols of the transmitted signal, in this case, 1 0a and 2 0aare either 1 or 1 , we can rewrite (2.17) and (2.18) as

1 1 2 2 1 20 0

1 11 , 1 (2.19)T Tb b

b bb b

z T e t e t dt z T e t e t dtT T

So we need to examine ( bT normalized) cross correlation of 1e t and 2e t . Ideally we would like

this cross correlation to be zero, which means that 1e t and 2e t should be orthogonal or

maximally dissimilar to each other. Below we analyse different options.

3. Spreading Sequences, Pseudo Noise (PN) Sequences

A PN sequence can be generated, by serially connecting shift registers and having some feedbackarrangement between them. In such an arrangement, we wish to achieve a sequence that repeatsitself every bT interval, but contains no subsection replicas within the interval of bT , meaning that

we should have maximum length sequences in the interval bT , or the maximum number of

nonperiodic chips ( cL ). The time flow of these sequences together with the message symbols is

shown below in Fig. 3.1.

Page 11: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 11

Fig. 3.1 Time flow of PN sequences with message symbols.

Maximal (or maximum) length shift register based PN sequences are based on Hamming codes which

are a class of linear block codes with ,n k arranged as 2 1, 2 1m mn k m , for some

3m , where m n k . Maximum length codes are on the other hand the dual of Hamming

codes which means that , 2 1,mn k m for some 3m . Thus we need m number of shift

registers with feedback connections expressed in the form of a generator polynomial.

Initially, we take the shift register configuration given on page 462 of Proakis 2008 [5] for 3m(number of shift registers) and trace the output with an initial loading of 001.

Fig. 3.2 The shift register configuration given on page 462 of Proakis 2008 [5] for 3m .

Starting the initial loading of 001 as shown in Fig 3.2 and assuming that the contents of the shiftregisters shift to the left at each time increment (decimation) of cT , we get the following output as

time advances

t

0 2 Tb 3 Tb

e ( t - Tb ) e ( t - 2 Tb )e ( t )

a0 a1a2

Same nonperiodic PN sequence

Tb

LcX Tc Tc

decimationTc

increment

0 0 1

+321

Shift registers Initial loading

Modulo - 2 adderStage numberingFeedbackconnections

Output

Page 12: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 12

Content of shift registers Ouput Register 1 Register 2 Register 3At 0 0 0t 0

1

2

1 0At 0 1 1 0At 2 1 1 1 1A

c

c

ct T ct T c

3

4

t 3 1 1 0 1At 4 1 0 1 1At 5 0

c

c

c

t T ct T ct T

5

6

PN sequence with 7

1 0 0At 6 1 0 0 1------------------

c

c

L

ct T c

0

---------------------------------------------------At 7 0 0 1 0At 8 0 1 1

c

c

t T ct T

1 0c

0 1 2 3 4 5 6, , , , , , 0 0 1 1 1 0 1 1 1 1 1 1 1 1 (3.1)c c c c c c c

c

(3.1) shows that the shift register configuration of Fig. 3.1 will produce an PN sequence of2 1 7m

cL . The actual sequence is stated at the bottom of (3.1) both in unipolar (i.e. in terms

of 0s and 1s) and bipolar (i.e. in terms of -1s and 1s) versions.

Exercise 3.1 : Assume an initial loading of 100 for the shift register configuration of Fig. 3.2 and findthe output by tracing. Comment on its difference from the one written on the last line of (3.1).

Now we come to the representation of the shift register configuration of Fig. 3.2 in Matlab. This isimportant, from the point of establishing equivalence and learning how to generate longer PNsequences which are the ones used practically. In fact, from this point onwards, we deal with the PNsequence generator of Matlab. The first point about the shift register configuration of Fig. 3.2 is thatit is drawn in Matlab notation by rotating everything 1800, as shown in Fig. 3.3.

Shift registers

+

Output001

Modulo - 2 adderFeedbackconnections

23 1 0

Connectionnumbering

Initial loading

Page 13: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 13

Fig. 3.3 Shift register arrangement in Matlab notation for 3m .

The feedback arrangement of Fig. 3.3 is specified in terms of connections numbers and inserted inthe Matlab poly function as follows

Connection number 3 2 1 0poly [ 1 1 0 1]

presence of absence of a connection a connection----------------------------------------------------------------------------------------Alternative representation Connection number 3 2 1 0 poly [ 1 1 0 1] poly [ 3 1 2 1 1 0 0

3 2 0

1] [ 3 2 0]1 1 0 1 (3.2)pg p p p p p

The arrangement of Fig. 3.3 with the initial loading of 100 again produces the same PN sequence onthe last line of (3.1), which is also given below and vectorially named 1c .

1 1 0 1 1 1 2 1 3 1 4 1 5 1 6, , , , , , 0 0 1 1 1 0 1 1 1 1 1 1 1 1 (3.3)c c c c c c c c

The interesting characteristics of the sequence in (3.3) is that no matter what cyclic shift, we subjectit to, we cannot get the original sequence. Furthermore in 1c , there are no repetitions of

subsequences of length 3. This way we say 1c satisfies the maximum length property. For such a PN

sequence, the cyclic autocorrelation would look like the one displayed in Fig. 3.4.

Fig. 3.4 Cyclic autocorrelation of the PN sequence in (3.3).

= 0 = 7Tc

- 1 / Lc

1

Rc1

( )

Page 14: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 14

Deferring the description of cyclic autocorrelation function for the moment, we concentrate on thethree shift register arrangement and try to find what other possible feedback connection wouldgenerate, in particular if maximum length PN sequences other than the one in (3.3) are available.One possible variation from the configuration given in Fig. 3.3 is the one drawn in Fig. 3.5 (note thatto highlight the necessary items, we have implemented simplification in Fig. 3.5.

Fig. 3.5 Another shift register configuration to generate max length PN sequence 3m .

In Fig 3.5, the polynomial in Matlab and in modulu-2 notation is also typed in the figure. The outputfrom the configuration of Fig. 3.5 is (again with the initial loading of 100)

2 2 0 2 1 2 2 2 3 2 4 2 5 2 6, , , , , , 0 0 1 0 1 1 1 1 1 1 1 1 1 1 (3.4)c c c c c c c c

The comments made for 1c are also valid for 2c . Therefore, in 2c , there is no repetitions of

subsequence of length 3, this way the cyclic autocorrelation for 2c will also be like the one shown in

Fig. 3.4.

Two more options of arranging the feedback connections of the three shift register configuration areleft. These are shown respectively drawn in Fig. 3.6 and 3.7.

Output00123 1 0

+poly = [1 0 1 1] or [3 1 0]

gp ( p ) = p3 + p + 1

Page 15: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 15

Fig. 3.6 Third possible arrangement of feedback connections in the shift register configuration of3m .

Fig. 3.7 Fourth possible arrangement of feedback connections in the shift register configuration of3m .

The outputs from PN sequence generators of Fig. 3.6 and 3.7 are given in (3.5).

a sequence of 3 a sequence of 3 a sequence of 3

3 3 0 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8

4 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9

, , , , , , , , [ 1 1 1 1 1 1 1 1 1 ]

, , , , , , , , , 1

L L Lc c c

c c c c c c c c c

c c c c c c c c c c

c

c

a sequence of 4 a sequence of 4

1 1 1 1 1 1 1 1 1 (3.5)L Lc c

As seen from (3.5), there is the repetition of the sequence of -1-11 in 3c and repetition of the

sequence -1-111 in 4c . Therefore they cannot be expected to have maximum length of 3cL and

their cyclic autocorrelation behaviour will not be as displayed in Fig. 3.4.

Output00123 1 0

poly = [1 0 0 1] or [3 0]

gp ( p ) = p3 + 1

Output00123 1 0

+ +

poly = [1 1 1 1] or [3 2 1 0]

gp ( p ) = p3 + p2 + p + 1

Page 16: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 16

Now we investigate what a sequence with a maximum length property. For this we list below allsequences that are generated by three shift register configuration together with their respectivegenerator polynomials.

3 21

32

33

4

In bipolar form1 1 1 1 1 1 1 , poly 1 1 0 1 , 1

1 1 1 1 1 1 1 , poly 1 0 1 1 , 1

1 1 1 1 1 1 1 , poly 1 0 0 1 , 1

1 1

p

p

p

g p p p

g p p p

g p p

c

c

c

c

3 2

1 2

3 4

1 1 1 1 1 , poly 1 1 1 1 , 1In unipolar form

0 0 1 1 1 0 1 , 0 0 1 0 1 1 1

0 0 1 0 0 1 0 , 0 0 1 1 0 0 1

pg p p p p

c c

c c (3.6)

From the inspection of the generator polynomials, we see that the polynomials which can befactored, i.e. those generator polynomials which can be written as the product of polynomials oflower degrees cannot produce maximum length sequences, but those generator polynomials whichcannot be factored, i.e. irreducible, then such polynomials are able to generate maximum lengthsequences. We prove this by taking the generator polynomials of (3.6) as follows

3 21

32

3 23

0 0

3 2 2 3 2 2 3

3 24

: 1 No factorized equivalence

: 1 No factorized equivalence

: 1 1 1

1 1 1

:

p

p

p

p

g p p p

g p p p

g p p p p p

p p p p p p p p p p p

g p p p p

c

c

c

c

31 1 (3.7)p

We discontinue this subject here, the interested reader can consult Refs. 1 or 5.

Fig. 3.7 is plotted to give an idea about the waveform appearance of maximum length sequences 1c

and 2c or 1e t and 2e t in bipolar and unipolar forms.

Page 17: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 17

Fig. 3.8 Time waveform appearance of 1c and 2c or 1e t and 2e t in bipolar form.

Fig. 3.9 Time waveform appearance of 1c and 2c or 1e t and 2e t in unipolar form.

Exercise 3.2 : By using the Matlab files of PNRunExp3.m and PNGenExp3.mdl (together), andinserting the polynomials from(3.6), test that these polynomials to generate 1c , 2c , 3c , 4c also given

in (3.6). Further test that the sequences 1c , 2c have the cyclic autocorrelation displayed in Fig. (3.4),

whereas 3c , 4c do not. Observe on the scope of PNGenExp3.mdl model file that 1c and 2c are indeed

like the ones displayed in Fig. 3.8.

4. Cyclic Autocorrelation, Crosscorrelation

In this section, we give formulations of cyclic autocorrelation, crosscorrelation.

0 10 20 30 40 50 60 70 80 90 100-1

-0.5

0

0.5

1

t ( time )

e 1 (t)

- c 1

0 10 20 30 40 50 60 70 80 90 100-1

-0.5

0

0.5

1

t ( time )

e 2 (t)

- c 2

t = Tc

t = Tb = 7 Tc

Lc = 7

t = Tc

t = Tb = 7 Tc

Lc = 7

-1 -1

-1-1 -1

-1

1 111

1 111

0 10 20 30 40 50 60 70 80 90 100

0

0.5

1

t ( time )

e 1 (t)

- c 1

0 10 20 30 40 50 60 70 80 90 100

0

0.5

1

t ( time )

e 2 (t)

- c 2

t = Tc t = Tb = 7 TcLc = 7

t = Tc t = Tb = 7 TcLc = 7

11 1

1 1 11

1

00 0

00 0

Page 18: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 18

Now given PN sequence e t (in fact any time function), that exists over a time interval of bT , the

autocorrelation is defined as

0

1 (4.1)bT

eb

R e t e t dtT

The natural assumption here is that it is sufficient for to sweep from bT to bT , so that eR

covers a time range of 2 bT . For crosscorrelation, we need two sequences, let those be 1e t and

2e t , then

1 2 1 2

0

1 (4.2)bT

e eb

R e t e t dtT

Another important parameter for PN sequences is the mean (or the DC) value, which can becomputed as

0

1 (4.3)bT

eb

m e t dtT

A desirable PN sequence should have the following characteristics

a) 0em

b) 1 , , 1, 0, 1,0

be

b

nT nR

nT

c)

1 20e eR

d) For an m (number of shift registers) value, it should be possible to get the largest number ofmaximum length PN sequences.

We know from the above developments that m number of shift registers is able to generatesequences of 2 1m

cL , additionally these sequences will contain 12m number of 1 s and12 1m number of 1s or vice versa. As m increases, em will approach zero more rapidly. So this

satisfies condition a). It is also know that, if the generated PN sequence is maximum length, thencondition b) is also satisfied. We also know that getting the largest number of maximum length PNsequences depends on the number of irreducible polynomials that exist for a given m . But we havethe cross correlation properties stated c). Below we study this together with the computation ofautocorrelation and crosscorrelation for the discrete forms of the PN sequences as we have for DSspread spectrum systems.

It is well know that integration of the continuous world corresponds to approximating the interval torectangles, then finding the area of each and finally summing these individual rectangular areas toarrive at the result. So bearing in mind that

Page 19: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 19

1

0 1 2 3 10

[ , , , , , ] (4.4)Lc

i c Lci

Tb

Tce t c p t iT c c c c c

c

Then at 0 (4.1) will turn into

0

1

2

30 1 2 3 1

1

2 2 2 2 20 1 2 3 1

10 , , , , ,

1

c

c

c

te L

b

L

c cL c

b b

cccc

R r c c c c cT

c

T Tc c c c c LT T

c c c

(4.5)

where the subscript t denotes the transpose operation. In order to create the shifts in , i.e. for0 , we have to cyclically shift tc at intervals of cT to obtain the complete cyclically shifted

autocorrelation function. For a general shift of cjT times, cr jTc will be given by

1 1

0 , 0 1 (4.6)

L j Lc c

c i i j i i j L cci i L jc

r jT c c c c j L

c

Assuming 1 or 2 1c cj L j j L , then the corresponding coefficients (elements) of 0c c

and cjTc would be aligned for multiplication to be performed in (4.6) as shown below in (4.7)

00 1 2 3 1 1 1

1 2 3 1 0

c c c

c

c

L j L j j L

jTj j j j L

c c c c c c c c

c c c c c c

c

c 2 1 (4.7)cj L jc c

In the end, we will obtain the discrete equivalent, i.e. cyclic autocorrelation of eR by placing

cr jTc in a row array as follows

0 , , 1 (4.8)e c c c cR r r T r jT r L T c c c c cR

In matrix form, (4.8) can be visualized as

Page 20: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 20

0

0 1 0 1

0 1

Rows are

c c

c

L j L

L

c c c c c

c c

c

c

R

1 1 2

Columns are for 0 1

c c

jTcc

L j L

j L

c c c

c

(4.9)

Now taking the simple case of 1c c from (3.6), below we perform a sample calculation of 3 cr Tc

0 1 2 3 4 5 6

3

4

50 3

0 1 2 3 4 5 6 6

0

1

2

[ 1 1 1 1 1 1 1]

1 1 , , , , , ,

c

ct Tc

b b

c c c c c c c

Tccc

r jT c c c c c c c cT T

ccc

c

c

c c

1 1

11 1 1 1 1 1 1 1 1 1 (4.10)

711

1

bT

Continuing in this manner, we will find

0 2 3 4 5 6

1 1

7 8 9

17 7

c c c c c c cc c r T rr r T r T r T r T r T r T T r T

c c c c c c c

c

c c c

R 1 1 1 1 1 1 1 (7

4.11)7 7 77 7

bT

Expressed in the usual manner, we have the following representation

Page 21: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 21

1 0: 0 6 (4.12)1 1 1

7

c

c cc c c

c

TR T

T L TL

So the plot of (4.11) or (4.12) will look exactly like the one given in Fig. 3.4. This is the typicalbehaviour of auto correlation of a PN code which has maximum length. Therefore Fig. 3.4 will alsoapplicable for 2c of (3.6). But since 3c and 4c are not maximum length, they will have the

autocorrelation behaviour as shown in Fig. 4.1. As seen from this figure, 3c and 4c do not have the

desirable property as that of 1c and 2c as PN sequences in practical life.

Fig. 4.1 Autoccorelations of 3c and 4c of (3.6).

Now we come to crosscorrelation. Since at 3m , we only have two PN sequences with desirableproperties, namely 1c and 2c then we can only talk about one crosscorrelation function, that is

0 1 2 3 4 5 6-0.2

0

0.2

0.4

0.6

0.8

1

1.2

Time ( in increments of Tc )

Rc ,

auto

corre

latio

n fo

r PN

seq

uenc

ec 3

0 1 2 3 4 5 6-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Time ( in increments of Tc )

Rc ,

auto

corre

latio

n fo

r PN

seq

uenc

ec 4

Page 22: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 22

1 2

1 2

1 20

1

0 , , 1 (4.13)

bT

e eb

e e c c c c

R e t e t dtT

R r r T r jT r L T

1 2 1 2 1 2 1 2 1 2c c c c c c c c c cR

For the particular case of 1c and 2c of (3.6), the graph of1 2c cR becomes as shown in Fig. 4.2. As

indicated before, this crosscorrelation function is not flat and does not have values close to zero, butsome minimum and maximum peaks.

Fig. 4.2 Crosscorrelation of 1c and 2c of (3.6)

It is known from the literature that PN sequences of maximum length will have three distinct crosscorrelation values, these are

2 / 2 2 / 21 2 1 1 2 , ,

2 1 , : number of shift registers , : integral (integer) part (4.14)

m m

c c c

mc

L L LL m

if they are preferred sequences. As we will see later, not all maximum length PN sequences will bethe preferred ones. It is easy to see that as m increases, then the three distinct values given in (4.14)will rapidly fall in magnitude. Such the relevant plot can be found in Fig. 4.3.

0 1 2 3 4 5 6-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6X: 0Y: 0.4286

Time ( in increments of Tc )

Rc 1

c 2 c

ross

corr

elat

ion

betw

een

PN s

eqeu

nce

c 1 and

c2

X: 1Y: -0.1429

X: 3Y: -0.7143

X: 4Y: 0.4286

X: 5Y: 0.4286

X: 6Y: -0.1429

- 1 / Lc

- { 1 + 2[(m+2)/2] } / Lc

- 1 / Lc

{ 2[(m+2)/2] -1 } / Lc

{ 2[(m+2)/2] -1 } / Lc

Page 23: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 23

Fig. 4.3 The change in magnitude (absolute value) of the three distinct crosscorrelation values againstm .

Exercise 4.1 : On the course webpage, you will find the Matlab files, named PNrun_Exp3.m,PNGenExp3.mdl. When PNrun_Exp3.m is used as a running file, this couple will generate PNsequences of any m (number of shift registers and any feed back connection arrangements). To getthe maximum length PN sequences and appropriate generator polynomial, i.e., an irreduciblegeneration polynomial as described above (3.7) must be supplied. Several of such polynomials arealready incorporated in the m file PNrun_Exp3.m. Using these m files, perform the following tasks

a) Verify that at 3m , you are able to generate 1c and 2c which are maximum length and 3c and

4c which are not maximum length, using the generator polynomials given in (3.6). Observe the

autocorrelation and crosscorrelation plots, verify that they conform to Figs. 3.4, 4.1 and 4.2.Particularly read the various peak values of the crosscorrelation function,

1 2c cR are those

displayed in Fig. 4.2.b) Experiment with other m values of generator polynomials. Try to find generator polynomials

other than those written in PNrun_Exp3.m that will yield maximum length PN sequences. Test thevalidity of these PN sequences with Figs. 3.4 and 4.2.

c) Describe your experience with larger values of m .d) Try to obtain all maximum length sequences for 5m . Note all sequences in the form of

generator polynomial, pg p . These should be other than those given PNrun_Exp3.m, which are

2 3 4 5 6 7 8 9 10 11 120

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

m

Mag

nitu

de 1 / Lc

{ 2[(m+2)/2] -1 } / Lc

{ 1 + 2[(m+2)/2] } / Lc

Page 24: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 24

5 21

5 32

Maxlength polynomial 1 for 5 : 1 5 2 0 1 0 0 1 0 1 (X:5)

Maxlength polynomial 2 for 5 : 1 5 3 0 1 0 1 0 0 1 (X:9) (4.15)----------------------------------

p

p

m g p p p

m g p p p

3

--------------------------------------------------------------Additional maxlength polynomials found Xilinx runs

2 2

2 1 0

5 3 23

5 4 24

2 2 15

1 5 3 2 1 0 1 0 1 1 1 1 (X:15)

1 5 4 2 1 0p

p

g p p p p p

g p p p p p

5 4 35

5 4 3 26

1 1 0 1 1 1 (X:23)

1 5 4 3 1 0 1 1 1 0 1 1 (X:27)

1 5 4 3 2 0 1 1 1 1 0 1 (X:29)p

p

g p p p p p

g p p p p p

61

6 4 32

6 53

Maxlength polynomials for 6, found by running Autocorr.m and DenLFSR in Xilinx1 6 1 0 1 0 0 0 0 1 1 (X:3)

1 6 4 3 1 0 1 0 1 1 0 1 1 (X:27)

1 6

p

p

p

mg p p p

g p p p p p

g p p p

6 5 24

6 5 3 25

6 5 46

5 0 1 1 0 0 0 0 1 (X:33)

1 6 5 2 1 0 1 1 0 0 1 1 1 (X:39)

1 6 5 3 2 0 1 1 0 1 1 0 1 (X:45)

1 6 5 4 1 0 1 1 1 0 0 1 1 (X:51)

p

p

p

g p p p p p

g p p p p p

g p p p p p

1 2

1 4

2 6

3 5

(4.16)

and are preferred max length PN sequences

and are preferred max length PN sequences

and are preferred max length PN sequences

and are preferred max len

p p

p p

p p

p p

g p g p

g p g p

g p g p

g p g p

3 6

1 3

1 5

1 6

gth PN sequences

and are preferred max length PN sequences

and are nonpreferred max length PN sequences

and are nonpreferred max length PN sequences

and are nonpref

p p

p p

p p

p p

g p g p

g p g p

g p g p

g p g p

2 4

2 5

erred max length PN sequences

and are nonpreferred max length PN sequences

and are nonpreferred max length PN sequencesp p

p p

g p g p

g p g p

Page 25: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 25

71

7 32

7 4 3 23

Maxlength polynomials for 7, found by running Autocorr.m and DenLFSR in Xilinx1 7 1 0 1 0 0 0 0 0 1 1 (X:3)

1 7 3 1 0 1 0 0 1 0 0 1 (X:9)

1

p

p

p

mg p p p

g p p p

g p p p p p p

6 5 24

6 5 3 25

6 5 46

7 5 4 3 2 1 0 1 0 0 1 1 1 1 1 (X:15)

1 7 4 0 1 0 0 1 0 0 0 1 (X:17)

1 7 4 3 2 0 1 0 0 1 1 1 0 1 (X:29)

1 6 5 4 1 0 1 1 1 0 0 1 1 (X:51)

p

p

p

g p p p p p

g p p p p p

g p p p p p

1 2

1 4

Incorrect (4.16)To be included 17, 29, 39, 43, 57, 63, 65, 75, 83, 85, 101,111, 113, 119,125

and are preferred max length PN sequences

and are preferred max length PN sp p

p p

g p g p

g p g p

3 5

3 6

1 3

1 5

equences

and are preferred max length PN sequences

and are preferred max length PN sequences

and are nonpreferred max length PN sequences

and are nonpreferred max l

p p

p p

p p

p p

g p g p

g p g p

g p g p

g p g p

1 6

2 4

ength PN sequences

and are nonpreferred max length PN sequences

and are nonpreferred max length PN sequencesp p

p p

g p g p

g p g p

e) Test that the autocorrelations and the crosscorrelations of (4.15) and (4.16) and observe thatautocorrelations are as given in (4.12) and crosscorrelations are as given in (4.14).

f) Observe the waveforms from the scope of PNrun_Exp3.mdl file, check that 3m , thewaveforms displayed for 1c and 2c exactly conform to sequences given in (3.6).

5. Gold Sequences

As the experiments with PN sequences show that PN sequences are quite restrictive in the sense thatit is not possible to construct a reasonable number of maximum length PN sequences for a given m .For this reason, we may turn to Gold sequences. They are obtained by combining two maximumlength PN sequences in modulo two adding format. By using (3.6) we do this initially for 3m .From (3.6) the unipolar version of 1c and 2c and their modulo two added result is given below

1 1

02 2

01

1 1 1 1 1 1 1 , 0 0 1 1 1 0 1

1 1 1 1 1 1 1 , 0 0 1 0 1 1 1

0 0 0 1 0 1 0 1 1 1 1 1 1 1 (5

2

2

c c

c c c

c c .1)

By continuing with the cyclicly shifted version of 2c , we obtain the other sequences. 11 2c c ,

21 2c c and 3

1 2c c are shown below.

Page 26: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 26

1

1

11

1

2

21

0 0 1 1 1 0 1

0 1 0 1 1 1 0

0 1 1 0 0 1 1 1 1 1 1 1 1 1

0 0 1 1 1 0 1

1 0 1 1 1 0 0

1 0 0 0 0 0 1 1 1 1

2

2

2

2

c

c

c c

c

c

c c

1

3

31

1 1 1 1

0 0 1 1 1 0 1

0 1 1 1 0 0 1

0 1 0 0 1 0 0 1 1 1 1 1 1 1 (5.2)

2

2

c

c

c c

When this process is terminated we obtain a set of seven sequences, which we call Gold sequences.As seen and understood from the above developments, both the cyclic autocorrelation and thecrosscorrelation properties of these Gold sequences will be like the crosscorrelation properties of 1c

and 2c . The autocorrelation and crosscorrelation plots of the Gold sequences found in (5.1) and (5.2)

are exhibited in Figs. 5.1 and 5.2.

Fig. 5.1 Autocorrelation and crosscorrelation plots of 01 2c c and 1

1 2c c .

0 1 2 3 4 5 6-0.5

0

0.5

1

X: 1Y: -0.1429

Time ( in increments of Tc )

auto

corr

elat

ion

of c

1

c2

X: 5Y: 0.4286

0 1 2 3 4 5 6-1

-0.5

0

0.5

1

X: 2Y: -0.7143

Time ( in increments of Tc )

auto

corr

elat

ion

of c

1

c(1

)2

X: 1Y: -0.1429

X: 4Y: 0.4286

0 1 2 3 4 5 6-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

X: 2Y: -0.1429

Time ( in increments of Tc )

cros

scor

rela

tion

of c

1

c2 a

nd c

1

c(1

)2

X: 3Y: 0.4286

- 1 / Lc

- 1 / Lc

- 1 / Lc

- { 1 + 2[(m+2)/2] } / Lc

{ 2[(m+2)/2] -1 } / Lc

{ 2[(m+2)/2] -1 } / Lc

{ 2[(m+2)/2] -1 } / Lc

Page 27: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 27

Fig. 5.2 Autocorrelation and crosscorrelation plots of 21 2c c and 3

1 2c c .

Figs. 5.1 and 5.2 show that the newly obtained sequences (Gold sequences) do not have maximumlength property, but have their cyclic autocorrelation and crosscorrelation values are fixed by (4.14).

As Fig. 4.3 proves, in order to increase the number of usable sequences we must go to higher mvalues. For convenience, we choose 5m . and rely on Matlab m and model files for theirgeneration of sequences, since at such sequence lengths, it becomes difficult to carry outcomputations by hand. To carry out the same operation as done for 3m in (5.1), we take two

maximum length PN sequences having the generator polynomials 1pg p and 6pg p from (4.15) .

Then by running the Matlab files PNrun_Exp3.m together with PNGenExp3.mdl, at 5m with

1pg p and 6pg p , we get the following plots as shown in Fig. 5.3. Note that plots are obtained

from a different m file.

0 1 2 3 4 5 6-0.5

0

0.5

1

X: 2Y: -0.1429

Time ( in increments of Tc )

auto

corr

elat

ion

of c

1

c(2

)2

X: 6Y: 0.4286

0 1 2 3 4 5 6-0.5

0

0.5

1

X: 1Y: -0.1429

Time ( in increments of Tc )

auto

corr

elat

ion

of c

1

c(3

)2

X: 3Y: 0.4286

0 1 2 3 4 5 6-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

X: 3Y: -0.1429

Time ( in increments of Tc )

cros

scor

rela

tion

of c

1

c(2

)2

and

c1

c(3

)2

X: 4Y: 0.4286

- 1 / Lc

- 1 / Lc

- 1 / Lc

{ 2[(m+2)/2] -1 } / Lc

{ 2[(m+2)/2] -1 } / Lc

{ 2[(m+2)/2] -1 } / Lc

0 50 100 150 200 250 300-1

-0.5

0

0.5

1

t ( time )

e 1 (t)

- c 1

0 50 100 150 200 250 300-1

-0.5

0

0.5

1

t ( time )

e 2 (t)

- c 2 Tc

t = Tb = 31 Tc

Lc = 31

Tc

t = Tb = 31 Tc

Lc = 31

gp1 ( p ) = p5 + p2 + 1

gp6 ( p ) = p5 + p4 + p3 + p2 + 1

Page 28: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 28

Fig. 5.3 Two maximum length PN sequences at 5m with generator polynomials 1pg p and

6pg p .

It is difficult to assess from Fig. 5.3 whether 1c and 2c are maximum length or not. Thus we find their

cyclic autocorrelation and crosscorrelation and display them in Fig. 5.4

Fig. 5.4 The cyclic autocorrelation and crosscorrelation of two maximum length PN sequences at

5m with generator polynomials 1pg p and 6pg p .

Fig. 5.4 proves that, PN sequences of Fig. 5.3 are indeed maximum length sequences. Of course ourobjective here is to obtain Gold sequences. As done in (5.1), in (5.1) and (5.2) for 3m , we now

compute 1

j 2c c , where 0, 1, 2 30j to get the remaining 31 Gold sequences. Here we use

Matlab files Goldrun.m and GoldgenECE633.mdl available on the course webpage, where the cyclic

shifting of j2c and its modulo two addition with 1c is arranged by changing the parameter seq_index

on the fourth line of Goldrun.m. The first two (seq_index = [0 1] or gkt(:,3) and gkt(:,4)) such

sequences are 1 2c c and 11 2c c and they are illustrated in Fig. 5.5, while the corresponding cyclic

autocorrelation and crosscorrelation graphics are presented in Fig. 5.6.

0 5 10 15 20 25 300

0.5

1

X: 1Y: -0.03226

Time ( in decimations of Tc )

auto

corr

elat

ion

ofc 1

0 5 10 15 20 25 300

0.2

0.4

0.6

0.8

1

X: 1Y: -0.03226

Time ( in decimations of Tc )

auto

corr

elat

ion

ofc 2

0 5 10 15 20 25 30

-0.3

-0.25

-0.2

-0.15

-0.1

-0.05

0

0.05

0.1

0.15

0.2

X: 19Y: -0.03226

Time ( in decimations of Tc )

cros

scor

rela

tion

ofc 1 a

ndc 2

Lc = 31

Lc = 31

gp1 ( p ) = p5 + p2 + 1

gp6 ( p ) = p5 + p4 + p3 + p2 + 1

X: 17Y: -0.2903

X: 4Y: 0.2258

- { 1 + 2[(m+2)/2] } / Lc

- 1 / Lc

- 1 / Lc

{ 2[(m+2)/2] -1 } / Lc

- 1 / Lc

Page 29: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 29

Fig. 5.5 Gold sequences obtained from 1 2c c and 11 2c c at 5m .

Fig. 5.6 The cyclic autocorrelation and crosscorrelation of Gold sequences of Fig. 5.5.

Comparing Figs. 5.3 to 5.6, we see that for a given maximum length generator polynomial pair of PNsequences, it is possible to obtain Gold sequences from the modulo two addition of first sequencewith the cyclicly shifted version of the second sequence. These new sequences will not have thedesirable autocorrelation properties as those of the original maximum length (PN) sequences, buttheir and corosscorelation will not be any worse than original maximum length (PN) sequences,additionally the cyclic autocorrelation and crosscorrelation values will be confined to the threedistinct values stated in (4.14)

Exercise 5.1 : By using the Matlab files Goldrun.m and GoldgenECE633.mdl available on the coursewebpage, test all Gold sequences that can be generated at 5m . Investigate their autocorrelation

0 50 100 150 200 250 300-1

-0.5

0

0.5

1

t ( time )

c 1

c2

0 50 100 150 200 250 300-1

-0.5

0

0.5

1

t ( time )

c 1

c(1

)2

Tc

t = Tb = 31 Tc

Lc = 31

Tc

t = Tb = 31 TcLc = 31

0 5 10 15 20 25 30-0.5

0

0.5

1

X: 3Y: 0.2258

Time ( in decimations of Tc )

auto

corr

elat

ion

ofc 1

c

2

X: 20Y: -0.03226

X: 10Y: -0.2903

0 5 10 15 20 25 30-0.5

0

0.5

1

X: 30Y: -0.03226

Time ( in decimations of Tc )

auto

corr

elat

ion

ofc 1

c

(1)

2

X: 3Y: 0.2258

X: 11Y: -0.2903

0 5 10 15 20 25 30

-0.3

-0.25

-0.2

-0.15

-0.1

-0.05

0

0.05

0.1

0.15

0.2 X: 7Y: 0.2258

Time ( in decimations of Tc )

cros

scor

rela

tion

ofc 1

c

2 and

c 1

c(1

)2

Lc = 31

Lc = 31

Lc = 31

X: 8Y: -0.03226

X: 12Y: -0.2903

- 1 / Lc

- 1 / Lc

- { 1 + 2[(m+2)/2] } / Lc

{ 2[(m+2)/2] -1 } / Lc

Page 30: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 30

and crosscorrelation properties. Develop a metrics to measure their performances. Compare thoseperformances to those of PN sequences at 5m .

6. Walsh Hadamard Sequences

Walsh (Hadamard) sequences are based on the basic building block of 2 2 Hadamard matrix whichis

1

1 1 (6.1)

1 1

H

2H is then obtained from 1H as follows

1 12

1 1

1 1 1 11 1 1 1

(6.2) 1 1 1 1

1 1 1 1

H HH

H H

So in general

1 (6.3)n nn

n n

H HH

H H

We presume that the rows of the nH (Hadamard matrix) are the spreading sequences, orthogonal to

each other. A nH Hadamard matrix with the dimensions of 2 2n n generate rise to 2n spreading

sequences as shown below

11 0 1 2 1

22 0 2 2 1

2 0 2 2 1 2

c

n

n

n

n n n n

L

e tc ce tc c

c c e t

H

(6.4)

By applying the following, we see that for Walsh Hadamard sequences

0

0

0

0 if

if or

1 1 if (6.5)

Tb

i j

Tb

i j b

Tb

i jb

e t e t dt i j

e t e t dt T i j

e t e t dt i jT

Page 31: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 31

But from (4.1) and (4.2), we know that (6.5) is limited to the instance of 0 . To find the cyclicautocorrelation and the crosscorrelation, as shown in (4.9) or (4.11), we have to span a time interval

of at least 0 1 or 0c c b cT L T T . Below we do it for 2H

1 1

2 22

3 3

4 4

1 1 1 11 1 1 1

(6.6)1 1 1 11 1 1 1

e te te te t

cc

Hcc

Using the Matlab files WHadautocross.m and Hwalsh_gen.mdl (independently or together), we getplots given in Fig. 6.1 and 6.2 for the autocorrelation and crosscorrelation of Walsh Hadamardsequences of (6.6).

Fig. 6.1 Autocorrelation plots of Walsh Hadamard sequences given in (6.6).

0 10 20 30 40-1

-0.5

0

0.5

1

t ( time )

Rc 1

(

)

0 10 20 30 40-1

-0.5

0

0.5

1

t ( time )

Rc 2

(

)

0 10 20 30 40-1

-0.5

0

0.5

1

t ( time )

Rc 3

(

)

0 10 20 30 40-1

-0.5

0

0.5

1

t ( time )

Rc 4

(

)

0 20 40-1

-0.5

0

0.5

1

t ( time )

Rc 1

-2 (

)

0 20 40-1

-0.5

0

0.5

1

t ( time )

Rc 1

-3 (

)

0 20 40-1

-0.5

0

0.5

1

t ( time )

Rc 1

-4 (

)

0 20 40-1

-0.5

0

0.5

1

t ( time )

Rc 2

-3 (

)

0 20 40-1

-0.5

0

0.5

1

t ( time )

Rc 2

-4 (

)

0 20 40-1

-0.5

0

0.5

1

t ( time )

Rc 3

-4 (

)

Page 32: Spread Spectrum Systems - Çankaya Üniversitesi · ECE 633 - HTE ^ubat 2013 Sayfa2 where n a are the symbols of the message signal with ð{1, 1 or 1ð} n n a að˛ ð- ð=ð–indicating

ECE 633 - HTE Şubat 2013 Sayfa 32

Fig. 6.2 Crosscorrelation plots of Walh Hadamard sequences given in (6.6).

Writing the results of Figs. 6.1 and 6.2 ini jc cR notation, we find the following

1 1 2 2 3 3 4 4

1 2 1 3 1 4 2 3 2 4 3 4

1 1 1 1 , 1 1 1 1 , 1 0 1 0

0 0 0 0 , 0 1 0 1 (6.7)

c c c c c c c c

c c c c c c c c c c c c

R R R R

R R R R R R

Exercise 6.1 : Verify (6.7) by running WHadautocross.m and Hwalsh_gen.mdl (independently ortogether).

Exercise 6.2 : By using WHadautocross.m together with Hwalsh_gen.mdl try to find the distinct the(cyclic) autocorrelation and crosscorrelations values of Walsh Hadamard sequences. Comment on thesuitability of Walsh Hadamard sequences by taking into the four criteria listed under (4.3).

These notes are based on

1) Michael B. Pursley, “Introduction to Digital Communications”, International Edition, Prentice Hall2005, ISBN : 0-13-123392-0.

2) S. Verdu, “Multiuser Detection ”, Cambridge University Press 2005, ISBN : 0-521-59373-5.3) John G. Proakis, Masoud Salehi, “Communication Systems Engineering” 2nd Ed. 2002, ISBN : 0-13-

061793-8.4) John G. Proakis, Masoud Salehi, “Fundamentals of Communication Systems”, Prentice Hall 2005,

ISBN : 0-13-147135-X.5) John G. Proakis, Masoud Salehi, “Digital Communications”, McGraw Hill 2008, ISBN : 978-007-

126378-8.6) MATLAB help files.7) My own Lecture Notes.