View Single Post
  #16 (permalink)  
Old 07-06-2009, 05:55 PM
Nicholas Kinar
Guest
 
Posts: n/a
Default Re: Generating Maximum Length Sequence using Galois LFSR


> i forgot to mention that to get a virtually zero-mean MLS signal for
> the purposes of measuring impulse response (or just for some noise
> that is guaranteed to be "white" in some sense of the word), then you
> take that bit, (we'll call it a[n] where n is discrete time) which is
> 0 or 1 and create this signed MLS signal:
>
> x[n] = (-1)^a[n]
>
> so, it's nearly zero mean. there are L/2 ones and L/2-1 zeros in a[n]
> (because the zero state in the shift register is the only state
> missing and if it were included, there would be an equal L/2 ones and
> zeros, but it's not). then there is one more -1 than +1 in x[n] over
> L samples. the mean is -1/L
>
> this way, when you autocorrelate, you get
>
>
> Rx[k] = MEAN{ x[n] * x[n+k] }
>
> ( "*" means simple multiplication.)
>
> which is
>
> Rx[k] = MEAN{ (-1)^a[n] * (-1)^a[n+k] }
>
> = MEAN{ (-1)^(a[n] + a[n+k]) }
>
> which happens to be the same as
>
> Rx[k] = MEAN{ (-1)^(a[n] XOR a[n+k]) }
>
>
> now it turns out that if you take that periodic MLS bit sequence, copy
> it, circularly rotate one of the copies by k samples, and XOR the two
> MLSes together, it turns out that you can show that the same recursive
> generating algorithm that produces the MLS also governs that XOR
> product of two with a lag in between. except, we know for MLS, the
> zero state gets mapped back to the zero state. for an MLS, those are
> the two loops; zero goes straight to zero, but any non-zero state of
> the shift register goes through the whole MLS, which are all the other
> non-zero states, before it gets back to your original non-zero state.
> so that MEAN above for k not a multiple of L (nor zero), is -1/L. but
> the mean for k=0 or any other integer multiple of L is the mean of a
> sequence of ones.
>
>


Thanks, Robert! I had read before that the binary sequence is converted
to -1 and +1, but this really explains why it is beneficial to do this
operation.


> it's similar to a recent experience i had where i missed that the
> simplest and obvious way to display the step response of a filter (IIR
> or FIR), assuming you know the coefficients, is to simple bang a step
> input to a simulated filter with the same coefficients. somebody at
> music-dsp had to point that out to me, where i was thinking of doing
> Heaviside partial fraction expansion of the transfer function times 1/
> (z-1), inverse Z transform, and getting it from there.
>


Ah - what a good idea!


>
> BTW, if you Google "Maximum Length Sequence" and look at the link
> right below the one you referred to, there is a Little MLS Tutorial
> that explains the math behind most of this. it doesn't derive
> primitive polynomials, but does prove how MLS can get your time-
> aliased impulse response from where you can get your frequency
> response.
>


There are a lot of good links on the web, and these do a terrific job of
quickly informing the reader. For more in-depth stuff concerning the
mathematics, it is probably best to turn to a book such as the one by
Golomb, which is infused with proofs.

Nicholas

Reply With Quote