Вы находитесь на странице: 1из 23

Chapter-2 Spreading Codes 13

CHAPTER-2
SPREADING CODES

This chapter deals with detailed description of spreading codes that include

structure of Walsh codes, generation through fundamental seed, M-sequence codes,

properties, method of generation, Gold codes, properties, method of generation,

proposed Walsh-like codes, method of selecting code set, application of spreading

codes in DS-SS codes.


Chapter-2 Spreading Codes 14

2.1 WALSH CODES

Walsh codes are used to separate individual users while they

simultaneously occupy the same RF band. Walsh codes as used in IS-

95[8] are a set of 64 binary orthogonal sequences [9]. These sequences

are orthogonal to each other, and they are generated by using the

Hadamard matrix. Recursion is used to generate higher order matrices

from lower order ones; that is,

--- 2.1

where HN contains the same but inverted elements of HN . The seed matrix is

--- 2.2

Therefore, to derive a set of four orthogonal Walsh sequences w0, w1, w2, and w3, we only

need to generate a Hadamard matrix of order 4.

--- 2.3

The four orthogonal sequences in this Walsh code set are taken from the rows of the

matrix H4 ; that is,


Chapter-2 Spreading Codes 15

--- 2.4

For DS-SS multiple access[8,9], three conditions that must be met by a set of orthogonal

sequences. The three conditions are:

1. The cross-correlation should be zero or very small.

2. Each sequence in the set has an equal number of 1s and -1s, or the number of 1s differs

from the number of -1s by at most one.

3. The scaled dot product of each code should equal to 1.

By changing the 0s to -1s in each of the four sequences above, that is,

--- 2.5

The calculation of cross products and dot products can be facilitated. In general, the 0th

Walsh sequence consists of all -1s and thus cannot be used for channelization. In the IS-

95 CDMA system, w0 is not used to transmit any baseband information.

Equation (2.1) can be recursively used to generate Hadamard matrices of higher orders in

order to obtain larger sets of orthogonal sequences. For example, 8 orthogonal sequences,

each of length 8, can be obtained by generating H8; 16 orthogonal sequences, each of

length 16, can be obtained by generating H16. The IS-95 forward link uses a set of 64
Chapter-2 Spreading Codes 16

orthogonal Walsh sequences[8], thus the physical limitation on the number of channels on

the forward link is 63 because in an IS-95 system, w0 is not used to transmit any base-

band information.

Equation (2.1) can be used to generate H8, which is

--- 2.6

The eight resulting orthogonal Walsh codes are

--- 2.7
Chapter-2 Spreading Codes 17

2.2 Channelization Using Walsh Codes

The following example illustrates how Walsh codes can be used for DS-SS multiple

access. Suppose that there are three different users, and each user wishes to send a

separate message. The separate messages are

---2.8

Each of the three users is assigned a Walsh code, respectively:

--- 2.9

Each message is spread by its assigned Walsh code. Note that the chip rate of the Walsh

code is four times the bit rate of the message, contributing to a processing gain of 4. For

message one:
Chapter-2 Spreading Codes 18

Note that m1(t)w1(t) is the spread-spectrum signal of the first message. Similarly, for

message two:

For message three:

The spread-spectrum signals for all three messages, m1(t)w1(t), m2(t)w2(t), and m3(t)w3(t),

are combined to form a composite signal C(t); that is,

--- 2.10

The resulting C(t) is


Chapter-2 Spreading Codes 19

C(t) is the composite signal that is transmitted in the single RF band. If there are

negligible errors during the transmission process, the receiver intercepts C(t). In order to

separate out the original messages m1(t), m2(t), and m3(t) from the composite signal C(t),

the receiver multiplies C(t) by the assigned Walsh code for each message:

Then the receiver integrates, or adds up, all the values over each bit period. The functions

M1(t), M2(t), and M3(t) are the results:

A “decision threshold” looks at the integrated functions M1(t), M2(t), and M3(t). The

decision rules used are


Chapter-2 Spreading Codes 20

--- 2.11

After applying the above decision rules, we obtain the results:

2.3 M-SEQUENCES
A simple shift register generator (SSRG) has all the feedback signals returned to a single

input of a shift register (delay line). The SSRG is linear if the feedback function can be

expressed as a modulo -2 sum (XOR).

The feedback function f( x1,x2,…..xn ) is a modulo-2 sum of the contents xi of the shift

register cells with ci being the feedback connection coefficients (ci=0 is open, ci=1 is

connect). An SSRG with L flip-flops produces sequences that depend upon register length

L, feedback tap connections and initial conditions. When the period (length) of the

sequence is exactly Nc =2L -1, the PN sequence is called maximum-length sequence of

simply an m-sequence. An m-sequence generated from a linear SSRG has an even

number of taps. If an L-stage SSRG has feedback taps on stages L, k,m and has

sequence……ai, ai+1, ai+2,…… then the reverse SSRG has feedback taps on L, L-k, L-

m and sequence….., aj+2, aj+1, aj,……


Chapter-2 Spreading Codes 21

figure: 2.1 Simple Shift Register Generator (SSRG)

Figure: 2.2 5-Stage Simple Shift Register Generator

[5,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
Chapter-2 Spreading Codes 22

2.4 PROPERTIES[10]

1 Balance:
For an m-sequence there is one more “one” then, “zero” in a full m-period of the

sequence. Since all states but the ‘all zero’ state are reached in an m-sequence, there must

be 2L-1 “ones” and 2L-1-1 “zeroes”.

2 Run-Length distribution:
For every m-sequence period, half the runs (of all 1’s or all 0’s) have length 1, one fourth

have length 2, one eight have length 3, etc. for each of the runs there are equally many

runs of 1’s and 0’s.

3 Autocorrelation:
The autocorrelation function of the m-sequence is -1 for all values of the chip phase shift

τ except for the [-1, +1] chip phase shift area in which correlation varies linearly from the

-1 value to 2L-1=Nc (the sequence length).

4 Cross-correlation:
The cross-correlation is the measure of agreement between two different codes.

Unfortunately, cross-correlation is not so well behaved as autocorrelation. When large

numbers of transmitters, using different codes, are to share a common frequency band

(multi-user environment), the code sequences must be carefully chosen to avoid

interference between users.


Chapter-2 Spreading Codes 23

5 Security:
The m-sequences codes are linear, and thus not usable to secure system. The linear codes

are easily decipherable once a short sequential set of chips (2L+1) from the sequence is

known.( The overall system could still be secure if the information itself where encoded

by a encoded by a cryptographically secure technique).

2.5 GOLD CODES

The autocorrelation properties of the m-sequences cannot be bettered. But a multi-user

environment (CDMA) needs a set of codes with the same length and with good cross-

correlation properties.

Gold code sequences are useful because a large number of codes (with the same length

and with controlled cross-correlation) can be generated, although they require only one

pair of feedback tap sets.

Gold codes are product codes achieved by the exclusively OR-ing (modulo-2 adding) of

two maximum length sequences with the same length (factor codes). The code sequences

are added chip by chip by synchronous clocking. Because the m-sequences are of the

same length as the two base codes which are added together, but are non maximal (so the

auto-correlation function will be worse then that of m-sequences). Every change in phase

position between the two generated m-sequences causes a new sequence to be generated.
Chapter-2 Spreading Codes 24

figure: 2.3 Two stage Gold Code generator

figure: 2.4 Practical Two stage Gold Code generator


Chapter-2 Spreading Codes 25

Any two register gold code generator of length L can generate 2L-1 sequences (length

2L-1) plus the two base m-sequences, giving a total of 2L+1 sequences.

In addition to their advantage in generating large number of codes the gold codes may be

chosen so that over a set of codes available for a given generator the autocorrelation and

the cross-correlation between the codes is uniform and bounded. When spatially selected

m-sequences are used, the generated gold codes have a three valued cross-correlation.

2.6 ORTHOGONAL WALSH-LIKE CODES

The binary sample space for the design of the proposed new orthogonal codes[3,4] is

limited only to the zero mean (except DC sequence) and linear phase codes in this study.

Hence, for the case of 8-bit (length 8) codes, binary sample space consists of 22 unique

codes, and for 16-bit codes there are only 326 candidate codes, and similarly, for 32-bit

codes there are about 38,000 potential codes[3,4]. Brute force search is performed in order

to identify available orthogonal sets out of all possible binary codes.

Walsh codes perform poorly in AWGN channels for asynchronous communications when

the circular shift of the second code (following code in a stream of codes) matches with

the first code or the complement of the first code for any particular chip delay (high

cross-correlation). Note that the decimal values of all n-bit (size n) Walsh codes in a set

are multiples of 2(n/2) - 1 or 2(n/2) +1. For example, the codes of size 16 Walsh set are

multiples of 255 or 257 in decimals. In our orthogonal code design and brute force

search[3,4], we avoided such strict code conditions and the number of codes in the set that

are multiples of 2(n/2) -1 or 2(n/2) +1 is minimized.

Orthogonal code sets with linear phase are iteratively searched and selected from the

binary sample space for the given dimension. In any n-bit sample space (n-dimensional
Chapter-2 Spreading Codes 26

space), n-1 orthogonal sets can be formed and the DC code is added in order to make it a

complete binary set. Using this brute force search method, a number of independent

binary code sets are obtained from the sample space. Note that the degree of freedom is

very limited when the dimension of the space is low, i.e. short codes or small values of n.

The Walsh family of sequences is limited to power of two in their sizes

(dimensionality) although there are binary code sets (orthogonal or near-orthogonal) of

other sizes like 7, 11, 15 and many more. Near orthogonal refers to the code sets having

their in-phase cross correlation value of -1. For near orthogonal code set design, instead

of limiting the code space to linear phase codes, entire binary space is considered. The

flexibility in code size is a significant advantage in implementation of emerging spread

spectrum radio applications like dense sensor networks with low power and low

complexity constraints. Similar limitations also exist in the Gold family of binary codes

and the size and the number of available codes is very strict and limited due to their

nature. Similarly, a typical set of size 32 binary sequences for the proposed family along

with the Walsh set of the same size are also displayed in Table 4.2. Note that except the

first sequence, which is DC, none of the basis functions of the new orthogonal binary set

is common with the Walsh set for 32-bit codes. There are several other 32 dimensional

unique orthogonal binary sets available in the binary sample space.

Aperiodic cross-correlation sequence between a typical pair of codes (2-user case with

codes x (n) and y (n)) of length N is defined as

C xy (m) = Σn x (n) y ( n+m ), – (N-2) < m < (N-2)--- 2.12


Chapter-2 Spreading Codes 27

C xy (m) for positive values of m is displayed in Figure 4.4 for the three binary families

under consideration. It is observed from the figure that the Gold and the proposed

orthogonal codes have similar cross-correlation (inter-code correlation) sequences while

sample Walsh pair has worse correlation properties.

Even (periodic) cross correlation is the cyclic correlation between the code vectors and it

is defined as

Θxy even ( m )= C xy ( m ) + C xy ( m - N ), 0 m N-1 --- 2.13

Similarly, odd correlation is defined as

Θxy Odd ( m )= C xy ( m ) - C xy ( m -N ) --- 2.14

where m belongs to 0 to m-1. It is noted that

Θxy even ( N-m ) = Θyx even ( m), and --- 2.15

Θxy Odd ( N-m ) = - Θyx odd ( m). --- 2.16

2.7 Multiple Access Using Spread Spectrum

Traditional ways of separating signals in time (i.e., time division multiple access,

(TDMA)), or in frequency (i.e., FDMA) are relatively simple ways of making sure that

the signals are orthogonal and noninterfering. However, in CDMA, different users occupy

the same bandwidth at the same time, but are separated from each other via the use of a

set of orthogonal waveforms, sequences, or codes. Two real-valued waveforms x and y

are said to be orthogonal if their cross-correlation Rxy(0) over T is zero, where


Chapter-2 Spreading Codes 28

--- 2.17

In discrete time, the two sequences x and y are orthogonal if their cross-product Rxy(0) is

zero. The cross product is defined as

--- 2.18

where

--- 2.19

--- 2.20

Note that T denotes the transpose of the column vector, which is another representation of

a sequence of numbers. For example, the following two sequences or codes, x and y, are

orthogonal:

--- 2.21

--- 2.22

because their cross-correlation is zero; that is,

--- 2.23

In order for the set of codes to be used in a multiple access scheme, we need two

additional properties. In addition to the zero cross-correlation property, each code in the

set of orthogonal codes must have an equal number of 1s and –1s[11]. This second property
Chapter-2 Spreading Codes 29

gives that particular code the pseudorandom nature. The third property is that the dot

product of each code scaled by the order of the code must equal to 1. The order of the

code is effectively the length of the code, and the dot product is defined as a scalar

obtained by multiplying the sequence by itself and summing the individual terms; that is,

the dot product of the code x is

--- 2.24

The two orthogonal codes in the previous example also satisfy the second and the third

conditions. Both x and y have an equal number of 1s and –1s, and the scaled dot products

are

---2.25

---2.26

The properties of the set of orthogonal codes to be used in DS-SS multiple access:

1. The cross-correlation should be zero or very small.

2. Each sequence in the set has an equal number of 1s and –1s, or the number of 1s differs

from the number of –1s by at most 1.

3. The scaled dot product of each code should be equal to 1.

Figure 1.1 shows the waveforms and spectrums for the two messages m1(t) and m2(t), the

two orthogonal codes c1(t) and c2(t), and the two spread messages m1(t)c1(t) and m2(t)c2(t).

While we do not go into the details of calculating the spectrums of these time waveforms,

it suffices for our purposes to state that the bandwidth of a random digital waveform is

limited to 1/T, where T is the bit interval of the random digital waveform. We further
Chapter-2 Spreading Codes 30

make the distinction between Tb and Tc , where Tb is the bit interval (in seconds) of the

message and Tc is the chip interval of the running orthogonal code. In this example, the

chip rate (1/Tc ) of the orthogonal code is running at four times the bit rate (1/Tb ).

Therefore, we have an effective bandwidth expansion factor of four. The bandwidth

expansion factor is sometimes called the processing gain or (W/R), where W is the final

bandwidth of the spread message and R is the bandwidth of the baseband message. Note

that in this example, W is equivalent to (1/Tc ), R is equivalent to (1/Tb), and the

processing gain (W/R) is 4, or 6 dB. For an excellent treatment of power spectra of

different digital waveforms[12].

Note that after spreading by the orthogonal codes, the spread messages m1(t)c1(t) and

m2(t)c2(t) now occupy a larger bandwidth than the original messages.

Figure 2.5 shows the waveforms at different points of the receiver. The signal at point A

is the result of the summation of the two spread messages. The spectrum at A now

contains two separate signals. In order to recover the two separate messages from the

composite spectrum, the signal at A is multiplied by the two respective orthogonal codes

to obtain B1 and B2. This example only serves to illustrate the principle of DS-SS multiple

access. It has been explained that, using DS-SS techniques, separate messages can be sent

through the same channel in the same frequency band at the same time, and the messages

can be successfully recovered at the receiver. However, there are many real-world

phenomena, especially in a mobile communications environment, that degrade the

performance of such a DS-SS multiple


Chapter-2 Spreading Codes 31

Time waveforms and frequency spectra for the baseband messages


m1( t) and m2( t).
Chapter-2 Spreading Codes 32

Figure 2.5 Time waveforms and frequency spectra for the base-band messages m1( t)
and m2( t), orthogonal codes c1( t) and c2( t), and spread messages m1( t) c1( t) and
m2( t) c2( t).
Chapter-2 Spreading Codes 33

Figure 2.6 Time waveforms and frequency spectra for the signals at different points

of the receiver.
Chapter-2 Spreading Codes 34

There are two problems: the near-far problem, and the partial

correlation problem[11-13].

In mobile communications, each user is geographically dispersed but

transmitting in the same frequency spectrum using DS-SS. Some users

are closer to the base station than others. The result is that powers

received from those users that are close by are higher than powers

received from users that are farther away. Because all users are

transmitting in the same band, the higher received powers from users

nearby constitute an interference that degrades the general

performance of the system. In order to combat this near-far

phenomenon, power control is utilized to make sure that the powers

received at the base station are the same for all users.

The second problem is partial correlation. This problem comes when

there is no attempt to synchronize the transmitters sharing the same

band. Even when the transmitters are synchronized, there is still the

problem of propagation delay, which is inherent in a mobile channel. For example, the

two codes mentioned previously are orthogonal when they are perfectly aligned:

However, if yi suffers a delay of one chip as a result of propagation delay in a mobile

channel, then
Chapter-2 Spreading Codes 35

If the codes are not orthogonal due to synchronization or channel impairment, then

multiple access messages in the same band can no longer be separated from one another

via code-orthogonality. The results are correlation crosstalk and mutual interference. In

essence, an additional condition needs to be adhered to; that is,

--- 2.27

--- 2.28

Therefore, simple orthogonality between two aligned codes is not enough the above two

partial correlations must also be zero, or at least small, for any value of t likely

encountered in the system [12].

Вам также может понравиться