Paul B. Webster wrote: >Ken Webster wrote: > >> Oh .. actually I just thought about it .. I suppose that XORing with a >> pseudorandom sequence would probably just add a lot of noise but still >> allow the voice to be heard if it was loud enough > > I don't think so. XORing with a PR sequence should be pretty >effective - at scrambling. You see, the PR sequence *fills* the >bandwidth with noise - the desired signal cannot be louder than this, in >effect the signal modulates the noise rather than the other way around, >and modulated noise is - still noise! Well, if this is true (and it does sound reasonable to me after thinking about it), then wouldn't this do the trick? Simply XOR with a pseudorandom sequence on the transmitting end and then XOR with the same sequence on the receiving end to cancel most of the noise. Sampling errors would merely add a little noise (or perhaps a lot of noise .. I just realized that some small errors could cause the result of the XOR on the receiver to wrap around from near zero to near 0xff or vice-versa .. depending on how frequently this happens the recovered signal could be quite noisy). What about limiting the amplitude of the voice signal to a signed 7-bit value and likewise limiting the amplitude of the PRN to 7-bits and adding the two (rather than XORing) so that the noise is superposed and never causes low values to wrap around to high values or vice-versa? Then on the receiver you subtract the PRN and end up with a somewhat noisier version of the signal you started with. If large errors are introduced by the bandwidth limits of the channel (limits on slew-rate, etc.) then couldn't you run the PRN through a lowpass filter and still get good results? > ... (snip) > In the case of the PRBNG sequences used to hash data, there is a trick >to resynchronise the register, but I haven't figured it out yet. Anyone >seen a good explanation of this? If you did the above (adding PRN at transmitter and subtracting it at receiver) then the signal amplitude should be continuously very high unless you are synchronized. As long as your original data has some silent or quiet parts then you should be able to slew the phase of the PRN at the receiver until the average amplitude drops .. when your recovered signal has a low amplitude (even for just a brief interval) then you must be in phase. If you can't guarantee that your signal has quiet intervals but you have some bandwidth to spare then you could group data into packets consisting of signal sent at a higher sample rate with a period of silence inserted. Then when you get your PRN generator in phase on the receiving end you should see near-silence at regular intervals. The only "tricks" I am aware of are to try many phases of the PRN sequence simultaneously, processor time permitting, by keeping a window of the PRN sequence and trying multiple indexes within the window simultaneously. Otherwise it could take a long time to find the correct phase if the PRN sequence is long. This sounds fun to try! I'd be interested in hearing about the results if anyone tries this. Cheers, Ken