• No results found

Types of Sequences and Their Properties

In document Software Radio (Page 171-178)

DAC H3> Output •

4.10 Generation of Random Sequences

4.10.1 Types of Sequences and Their Properties

The most common technique for generating PN sequences is the use of a binary digital linear feedback shift register as shown in Figure 4.13. D represents a single-stage delay element. The operation of the adders is equivalent to the exclusive OR (XOR) operation since the carry bit is ignored. If the input to the shift register x(n) is zero, the output y(n) is given by

hk is 0 or 1 depending on whether there is a connection between the delay line and the adder. Different sets of (hk, k = 1 , . . . , m) give rise to different connection polynomials h(D) expressed as

m

(4.11)

Section 4.10 Generation of Random Sequences 151

y(n-m)

>y(n)

Figure 4.13: PN Sequence Generator Using Linear Feedback Shift Register.

m

h(D) = l + Y^hkDk. (4.12)

fc=i

The power of D of each term corresponds to the number of delays for that term, and m is the degree of the polynomial. The state of the PN sequence generator is defined as the contents of the shift register s(n).

s ( n ) = [y(n - l)y(n - 2) .. .y{n - m)] (4.13) Based on s(n) and h(D), the output of the PN sequence generator can be computed using

Equation 4.11.

M a x i m a l Length Sequences

Sequences with a maximum period are called maximal length sequences (m-sequences) [58]. A shift register can be shown to generate a maximal length sequence with length 2m1 only if its connection polynomial h(D) is primitive. For a connection polynomial h(D) of degree m to be primitive, it must be irreducible, a necessary but insufficient condition. A polynomial is said to be irreducible if it cannot be factored into the product of polynomials with binary coefficients and degrees of at least 1 . For example, h(D) = 1 + D + D4 is irreducible. However, h(D) = 1 — D5 is reducible [59]. Different settings of h give rise to different kinds of sequences. Table 4.4 gives the tap settings for various m-sequences.

Maximum length sequences have the following properties.

1. The number of I s in a period of the sequence is 2m _ 1, and the number of 0s in a period of the sequence is 2m_1 — 1.

2. In a period of the sequence, there should be a sequence of consecutive m I s , a sequence of consecutive ( m — 1 ) 0s, and 2m~k~2 sequences of consecutive k I s and 0s for 1 < k < m — 2. There are no sequences of consecutive ( m — 1) I s or consecutive m 0s.

152 Digital Generation of Signals Chapter 4

m Stages connected to m Stages connected to modulo-2 adder modulo-2 adder

2 1,2 19 1, 15,18,19

Table 4.4: Tap Settings for Generating Maximum Length Sequences.

3. If N = 2m — 1 is the period of the sequence y(n), then the periodic autocorrelation function is

R(n) = i , forn = 0 R(n) = 0, otherwise.

G o l d C o d e s

Gold codes are a type of composite code with good and well-defined cross-correlation prop-erties. Gold codes are generated by a combination of a special kind of linear m-sequences called preferred m-sequences, maximum length sequences that have certain specific desir-able correlation properties. Though Gold codes are constructed from m-sequence codes, they are not maximal sequence codes. Gold codes are constructed by forming the modulo-2 sum of two preferred m-sequences of equal length as shown in Figure 4.14. The code sequences are added bit by bit by synchronous clocking, and the two code generators main-tain the same phase relationship. The codes generated are thus of the same length as the two base codes, which are added but are non-maximal length. A different Gold code is generated by shifting one of the sequences relative to the other. Thus, Gold codes allow construction of families of 2m — 1 codes from pairs of m-stage shift registers [58].

Section 4.10 Generation of Random Sequences 153

Figure 4.14: Gold Code Generator.

Gold code sequence generators are useful because of the large number of codes they supply although they require only one pair of feedback tap sets. A multiple register Gold code generator can generate ( 2m — l )r non-maximum length sequences of length 2m - 1 plus r maximum length sequences of the same length where r is the number of registers and m is the register length. Gold codes can be chosen so that over a set of codes available from a given generator, the cross-correlation between the codes is uniform and bounded.

When m is odd, the maximum value of the cross-correlation function between any pair of Gold sequences is Rmax = V2N, and when m is even, Rmax = where TV is the period of each of the maximum sequences given by N = 2m — 1. Figure 4.15 shows the autocorrelation of a Gold code sequence generated using [5, 3] and [5, 4, 3, 2] generators.

4 . 1 0 . 2 R a n d o m i z a t i o n w i t h t h e W h e a t l e y P r o c e d u r e

One of the main problems associated with a DDS system is the harmonic spurs in the output signal. Even if these extraneous harmonic signals cannot be eliminated, it is advantageous to spread the energy in the spurs uniformly over the entire range of frequencies rather than concentrating at a few harmonic frequencies. This generates a high noise floor rather than strong harmonic signals. The Wheatley procedure is an optimal process in which the energy in the spurs is spread evenly across the frequencies.

The Wheatley procedure reduces the discrete spurs by randomly varying or dithering the periods of the output while keeping the average of these periods unchanged [60]. The method consists of adding a sequence of random numbers to the contents of the accumu-lator in a prescribed manner to convert the harmonic signals into a continuous noise floor, whose level is much lower than that of the harmonic signals.

Figure 4.16 shows the block diagram of Wheatley's procedure. At each overflow of the accumulator, a random number X is added to the contents of the accumulator, which ranges uniformly from 0 to ( Ar — 1). At the same time, the previous value of X is subtracted. The subtraction is performed so that the average of X(i) — X(i — 1) is zero and the average output frequency does not change from the value to which it was originally set. However, any one period is not exactly the true desired duration, which introduces uncorrelated phase noise. Even if adjacent errors were originally correlated, adding the random value X causes

154 Digital Generation of Signals Chapter 4

Autocorrelation of a Gold C o d e S e q u e n c e Generated Using [5, 3] and [5, 4, 3, 2] Generators

1 2 , 1 1 1 i 1 1 1

1 0 h

8 h

6 h

4 h

2 h

0

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

Figure 4.15: Autocorrelation of a Gold Code Sequence.

adjacent accumulator resets to be independent, thus reducing the harmonic signals present due to this correlation. The penalty is a continuous noise spectrum due to the random choice between the two reset times of the accumulator. This method is, however, difficult to implement in high-speed digital logic.

Example: The Effect of the \ \ hentley Procedure

Consider a DDS system with the following parameters: FcUc = I, N = 9,W = 5, Ar = 7, and Fout = 0.0137. Figure 4.17 shows the spectrum of the DDS system using MATLAB simulations. Figure 4.18 shows the spectrum after Wheatley's procedure is used. The new system shows a few decibels of improvement in the levels of the highest spurs. However, a

noise floor is generated. •

^ ROM

Random Number Generator

Figure 4.16: Wheatley's Procedure.

Spectral Characteristics (or N = 9, W = 5, na = 32, and A = 7

Figure 4.17: Spectrum of the Basic DDS.

Spectral Characteristics (or N = 9, W = 5, na = 32, and &r = 7 (Wheatley's Procedure)

° n 1 1 1 1 1

-Figure4.18: Spectrum When the Wheatley Procedure Is Applied.

Section 4.11 ROM Compression Techniques 157

In document Software Radio (Page 171-178)