1 / 46

# DIGITAL SPREAD SPECTRUM SYSTEMS - PowerPoint PPT Presentation

DIGITAL SPREAD SPECTRUM SYSTEMS. ENG-737. Wright State University James P. Stephens. AUTOCORRELATION OF PN SEQUENCES. A very important property of PN sequences is the periodic auto correlation function Recall that autocorrelation is defined as:

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

ENG-737

Wright State University

James P. Stephens

AUTOCORRELATION OF PN SEQUENCES
• A very important property of PN sequences is the periodic auto correlation function
• Recall that autocorrelation is defined as:
• Simply stated, it is a comparison of a sequence to a time-shifted version of itself
• The equation asks “For an offset of m chips, how similar is the sequence to inself?”

PN SEQUENCE AUTOCORRELATION FUNCTION

Normalized

Rbb()

NTc

1.0

1/N

Tc

Sc(f)

N + 1

sinc2(f Tc)

N2

1/NTc

f

2/Tc

-1/Tc

1/Tc

-2/Tc

POWER SPECTRAL DENSITY FOR M-SEQUENCE

Chip Duration Tc and Period NTc

+

DISCRETE AUTOCORRELATION Example

n = 3

N = 2n – 1 = 7

Initial Fill = 0 0 1

The periodic autocorrelation:

. . . 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 -1 1 1 m=0

1 1 1 1 1 1 1 = 7

1 -1 -1 1 -1 1 1 m=1

-1 1 -1-1 -1 1 1 = -1

and so on . . . . . . .

Sequence  1 0 0 1 0 1 1

Convert to {-1, 1}  1 -1 -1 1 -1 1 1

DISCRETE AUTOCORRELATION Example

Discrete Time Plots

In the limit as m  

Approaches that of White Noise

BINARY SYMBOL CONVERSION
• Consider an m-sequence [ck]

Where, ck {0, 1} for all k

• Now define the m-sequence [bk]  {-1, 1}
• By letting bk = 2ck -1, this translates 0  -1 and 1  1
• This is a useful MatLab conversion necessary for many MatLab computations:

Note: In GF(2) arithmetic, multiplication of 1 and -1 is the same as addition of 0 and 1.

Example:

Exclusive OR

Multiplication

MATLAB IMPLEMENTATION
• The following files are found on my web site at http://www.cs.wright.edu/~jstephen/
• pnf.m
• oct2bin.m
• masseyf.m
• Example:
• pn1=pnf(6,103,1,1500,1,1);
• pn2=pnf(6,103,1,63,1,1);
• pn1=(pn1*2)-1;
• pn2=(pn2*2)-1;
• auto=xcorr(pn2,pn1);
• plot(auto)

MATLAB IMPLEMENTATION (Cont.)

• auto=auto(100:400);
• plot(auto)
M-SEQUENCE SECURITY ISSUES
• How secure are m-sequences? Even if they do not repeat for years?
• Massey’s Algorithm can determine the generating polynomial, at most, in ‘2 times n’ error free chips
• Example:
• Generate m-sequence where N=7, i.e. n=3
• Fill up matrix using only 2*n = 6 chips
• Obtain system of equations that can be solved simultaneously
• Thus, a code that uses 89 stages that will not repeat for 73,000 years (1 Mcps chip rate) can be determined by only processing 2 * 89 = 178 chips
CODE SEQUENCE DETERMINATION
• Berlekamp-Massey linear feedback shift register prediction algorithm
• Gold’s Frequency Agile Predictor
• B-M requires (at most) 2n error-free chips to determine generating polynomial
• Gold’s based on relative times of arrival of single frequency
• Demonstrated on Workstation with MATLAB
MASSEY ALGORITHM EXAMPLE

a(k)

Code sequence of period N=7 (n=3):

a = a(0), a(1), a(2), a(3), a(4), a(5), . . . .

a = 1 1 1 0 1 0 0 1 1 1 0 1 0 0 (14 chips)

a(k) = C1 a(k-1) + C2 a(k-2) + C3 a(k-3)

a(3) a(2) a(1) a(0) = 0 1 1 1

a(4) a(3) a(2) a(1) = 1 0 1 1

a(5) a(4) a(3) a(2) = 0 1 0 1

We obtain the system of equations:

(1) 0 = 1 C1 + 1 C2 + 1 C3

(2) 1 = 0 C1 + 1 C2 + 1 C3

(3) 0 = 1 C1 + 0 C2 + 1 C3

MASSEY ALGORITHM EXAMPLE

1 = 1 C1 + 0 C2 + 0 C3

C1 = 1

Substitute in equation (3)

0 = 1 (1) + 0 C2 + 1 C3

C3 = 1

Substitute C1 = 1, C3 = 1, into (1) gives

0 = 1(1) + 1 C2 + 1(1)

C2 = 0

Solution is: X3 + X + 1

Frequency Taps

Feedback Taps

MODEL FREQUENCY HOPPER

Code-of-the-day

Binary Register

FH Output

Mapper

GOLDS TIME-OF-ARRIVAL ALGORITHM

Code-of-the-day

Code Generator

Binary Output Register

Output Hopping Sequence

00 > a

01 > b

10 > c

11 > d

Frequency Mapper

Times-of-arrival: 4,5,8,9,10,13,14,23,24,25,26,27,31

PERFORMANCE
• Importance of real-time implementation:
• Rapidly changing battle scenario
• Typically short message bursts
• Ability to change code-of-the-day
• Data collection time
• Probability of correct synchronization
• Prediction algorithm run time

For 64-stage register and 128 hop frequencies a sequence of 64 X 128 = 8192 hops need to be collected

• At 100K hops/sec this will take 8192/100K = 0.08192 seconds
DATA COLLECTION TIME

31 correct detections of key frequency

• 31-stage register
• 128 hop frequencies
• SNR - 12 dB
• Prob correct sync = .9
PROBABILITY OF CORRECT SYNCHRONIZATION
ALGORITHM TIME

Based on 32-stage shift register

PARTIAL CORRELATION
• The important random properties of m-sequences are the result of usually very long sequences
• However, it is not possible to perform full length correlation in a receiver
• Also, if the duration of a message bit is less than that of the period of the PN sequence, then to decode the message, we need to correlate over something less that a full code period
• In these cases, the correlation function we just looked at does not apply
• The ‘Partial Correlation’ function is written:

PARTIAL CORRELATION (Cont.)

• We can treat the am’s as random variables { 1}

So,

• The variance is:

PARTIAL CORRELATION

M-sequence Autocorrelation

M-sequence Partial Correlation

63 chips

50 chips

PARTIAL CORRELATION (Cont.)

50 chips

40 chips

30 chips

20 chips

MATLAB IMPLEMENTATION OF PARTIAL CORRELATION
• To perform a full autocorrelation of an m-sequence of length 63:

pn1=pnf(6,103,1,1500,1,1);

pn2=pnf(6,103,1,63,1,1);

pn1=(pn1*2) -1;

pn2=(pn2*2) -1;

auto=xcorr(pn2,pn1);

auto=auto(100:400);

plot(auto)

• To perform a partial autocorrelation for this sequence, change line 2:

pn2=pnf(6,103,1,50,1,1);

Try different values here !

Note: Each time you change line 2, be sure to re-enter lines 4, 5, 6, and 7 since these values must be re-computed.

PERIODIC VS. APERIODIC CORRELATION

1

4

2

3

PN Code Reference

Periodic

1

PN Code Reference

Aperiodic

APERIODIC AUTOCORRELATION OF AN M-SEQUENCE
• Determine the Aperiodic autocorrelation of m-sequence [45]o

n = 5, N = 31

pn1=pnf(5,45,1,31,1,1);

pn2=pnf(5,45,1,31,1,1);

pn1=(pn1*2)-1;

pn2=(pn2*2)-1;

x=xcorr(pn2,pn1);

plot(x)

APERIODIC AUTOCORRELATION

Peak Value

Approximately 15 side lobe values

Index of discrimination

G(x) = 45o

CROSSCORRELATION
• Whereas autocorrelation compares a code with itself, ‘crosscorrelation’ compares one code to another
• Example: Determine the periodic and aperiodic crosscorrelation of [45]o and [75]o
• Note the number of sidelobe values
• Periodic sidelobes are 3-valued
• Aperiodic is very random looking
• Refer to the handout from Robert Gold’s publication on Linear Code Sequences
COMPOSITE CODES
• Although m-sequences are quite desirable for many applications, there is considerable research in finding new codes that offer improved performance in area
• Composite codes are generated by a combination of linear maximal sequences
• The following are examples of composite codes:
• Gold Codes CDMA Applications
• JPL Codes Rapid synchronization
• Kasami Codes Length construction and CDMA Applications
GOLD CODES
• Many details regarding Gold Codes are explained in Appendix 7 of Dixon text
• To be assured of good performance in CDMA applications, a system must have:
• Low crosscorrelation properties among codes
• Low partial crosscorrelation properties among codes
• From Gold’s report:

Length 25 – 1 = 31 Fixed Polynomial [45]o

Bound N Spectrum Polynomial

31 1 31(1) -1(30) 45

11 1 7(5) 3(10) 51

-1(5) -5(5)

-9(5)

9 4 7(10) -1(15) 75

-9(6) 67

53 73

REGARDING M-SEQUENCES FOR CDMA APPLICATIONS
• There is no general bound on the cross-correlation properties of m-sequences
• There is a limited number of available code for a large number of users within the family of m-sequences
GOLD CODE CONSTRUCTION

LRS 1 and LRA 2 must have same length

Code 1

LRS 1

+

Clock

LRS 2

Code 2

Output = Gold Code ( Code 1 xor Code 2)

+

+

+

1

2

3

4

5

1

2

3

4

5

GOLD CODE CONSTRUCTION

x5 + x3 + 1 = [51]o

Gold Code

x5 + x4 + x3 + x2 + 1 = [75]o

GOLD CODE CONSTRUCTION

[51]o xor [75]o = ( x5 + x3 + 1)(x5 + x4 + x3 + x2 + 1)

= x10 + x9 + x8 + x7 + x5

x8 + x7 + x6 + x5 + x3

+ x5 + x4 + x3+ x2 + 1

= x10 + x9 + x6 + x5 + x4 + x2 + 1

= [3165]o non-maximal

MAXIMUM NUMBER OF GOLD CODES
• Normally, you fix one register and change the fill of the other to generate a family of Gold Codes
• Since there are 2n – 1 initial fills, you can generate 2n – 1 Gold Codes from each configuration
• The code length will be N = 2n – 1, where n is the length of the individual registers which must be of equal size
• For the 5-stage registers shown in the previous chart, N = 31
• Since the generating polynomial for the Gold Code is degree-10, an m-sequence would be 210 – 1 = 1023
• 1023 / 31 = 33 codes
• This comes from 31 initial fills plus the m-sequence generated from each separate register alone
• Recall from Table 3.3 in Dixon’s text, the number of possible m-sequences given n is tabulated in the next chart
MAXIMUM NUMBER OF GOLD CODES

n # of m-sequences. # of Gold Codes

5 6 31 + 2

6 4 63 + 2

7 18 127 + 2

8 16 255 + 2

9 48 511 + 2

. . .

. . .

. . .

15 1800 32767 + 2

Not only do Gold Codes provide a larger ensemble of codes, but they provide uniformly low-cross correlation properties while exhibiting good autocorrelation properties

CHOSING A SET OF ‘PREFERRED PAIRS’
• M-sequences used to generate Gold Codes must be of the same length and chosen according to a process of “preferred pairs” selection (Details are in Appendix 7 of Dixon text)
• Table A7.3 says there are no preferred pairs for n=6. Not true! [103]o and [147]o are a preferred pair
• Arbitrary selection of code pairs can result in very poor correlation performance
• Table A7.1, page 501, shows that for n=5, a ‘preferred pair’ yields a peak value of cross correlation of 9 for a preferred pair, but 11 for a non-preferred pair
• The selection of ‘preferred pairs’ will always give 3-valued autocorrelation which will bound the correlation to:
CHOSING A SET OF ‘PREFERRED PAIRS’

The algorithm for choosing ‘preferred pairs’ is as follows:

• Select n and a polynomial
• Find k associated with the polynomial (polynomial root)
• If n is odd, then calculate 2k + 1, if n is even then calculate 2(n+2)/2 + k
• The number calculated is the polynomial root (k) associated with the second code that completes a ‘preferred pair’

CHOSING A SET OF ‘PREFERRED PAIRS’

Example:

• Let n=8, then choose 435(1)
• k=1
• n is even therefore, 2(8+2)/2 + 1 = 33

None listed

• Try n=8, then choose 747(11)
• k=11
• N is even therefore, 2(8+2)/2 + 11 = 43  [703]o
JPL RANGING CODES
• JPL Codes are constructed by modulo-2 addition of 2 or more m-sequences whose lengths are relatively prime to one another
• Very long codes can be generated which are useful for unambiguous ranging over long distances
• May be generated easily with a small number of short registers
• Synchronization can be more easily accomplished by separate operation on each of the component codes
• Relatively prime means no common factors among numbers

2m - 1

2n - 1

2p - 1

JPL CODE CONSTRUCTION

a

a xor b xor c

b

c