Maximum length sequence

From Wikipedia, the free encyclopedia

A maximum length sequence (MLS) is a pseudorandom binary sequence used for measuring impulse responses (e.g., of room reverberation). They are also used as a basis for deriving pseudo-random sequences in digital communication systems that employ direct-sequence spread spectrum and frequency-hopping spread spectrum transmission systems.

They are polynomial rings generated using maximal linear feedback shift registers and are so called because they are periodic and reproduce every binary sequence that can be reproduced by the shift registers (i.e., for m registers they produce a sequence of length 2m − 1). They are also sometimes called n-sequences or m-sequences. Maximum length sequences are spectrally flat, with the exception of a near-zero DC term, and are used instead of a short pulses because, being longer, they inject more energy into a system; extracted impulse responses thus have a higher signal-to-noise ratio (SNR).

Contents

[edit] Generation of maximum length sequences

Figure 1: The next value of register a3 in a feedback shift register of length 4 is determined by the modulo-2 sum of a0 and a1.
Enlarge
Figure 1: The next value of register a3 in a feedback shift register of length 4 is determined by the modulo-2 sum of a0 and a1.

MLS are generated using maximal linear feedback shift registers. An MLS-generating system with a shift register of length 4 is shown in Fig. 1. This can be expressed using the recursive relation,

a3(n + 1) = a0(n) + a1(n).

Because MLS are periodic and shift registers cycle through every possible binary value (with the exception of the zero vector), registers can be initialized to any state, with the exception of the zero vector.

MLS are inexpensive to implement in hardware or software, and relatively low-order feedback shift registers can generate long sequences; a sequence generated using a shift register of length 20 is 220 − 1 samples long, which is equivalent to approximately 23.8 seconds if played back as audio with a sampling rate of 44.1 kHz.

[edit] Properties of maximum length sequences

Maximum Length Sequences are pseudorandom binary sequences and have the following properties, as formulated by Solomon Golomb (1967).

1. Balance Property.

The number of 1s in the sequence is one greater than the number of 0s in the sequence.


2. Run Property.

Of all the 'runs' in the sequence of each type (i.e. runs consisting of 1s and runs consisting of 0s)

  • One half of the runs are of length 1.
  • One quarter of the runs are of length 2.
  • One eighth of the runs are of length 3.

....

A 'run' is a sub-sequence of 1s or 0s inside the ML that is being concerned. The number of 'runs' is the number of such subsequences.

3. Correlation Property.

The autocorrelation and cross-correlation of the ML sequence is periodic and binary valued.

[edit] Example

Take the following sequence which is 31 bits long:

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


1. Number of 1s = 16, number of 0s = 15; therefore 'balance property' is fulfilled.

2. runs consisting of 0s = 8

length 1 runs = 4 (have to have 1/2 * 8 = 4)

length 2 runs = 2 (have to have 1/4 * 8 = 2)

length 3 runs = 1 (have to have 1/8 * 8 = 1)

length 4 runs = 1 (have to have 1/16 * 8 = 0.5 => 1)


runs consisting of 1s = 8

length 1 runs = 4 (have to have 1/2 * 8 = 4)

length 2 runs = 2 (have to have 1/4 * 8 = 2)

length 3 runs = 1 (have to have 1/8 * 8 = 1)

length 4 runs = 0 (have to have 1/16 * 8 = 0.5)

length 5 runs = 1 (have to have 1/32 * 8 = 0.25 => 1)

[edit] Extraction of impulse responses

If a linear time invariant (LTI) system's impulse response is to be measured using a MLS, the response can be extracted from the measured system output y(n) by taking its circular cross-correlation with the MLS sequence. This is because the autocorrelation of a MLS is 1 for zero-lag, and nearly zero (−1/N where N is the sequence length) for all other lags; in other words, the autocorrelation of the MLS can be said to approach unit impulse function as MLS sequence length increases.

If the impulse response of a system is h(n) and the MLS is s(n), then

y(n) = (h*s)(n).\,

Taking the cross-correlation with respect to s(n) of both sides,

{\phi}_{sy} = h(n)*{\phi}_{ss}\,

and assuming that φss is an impulse (valid for long sequences)

h(n) = {\phi}_{sy}.\,

[edit] Relationship to Hadamard transform

Cohn and Lempel (1977) showed the relationship of the maximum length sequence to the Hadamard transform. This relationship allows the correlation of a maximum length sequence to be computed in a fast algorithm similar to the FFT.

[edit] References

  • Golomb, S. Shift Register Sequences, San Francisco, Holden-Day, 1967.
  • Cohn, M. and Lempel, A. On Fast M-Sequence Transforms,IEEE Trans. Information Theory, vol. IT-23, pp. 135-137, January, 1977.

[edit] See also