Homemade GPS Receiver (2013)
aholme.co.uk
aholme.co.uk
The receiver just correlates the received message by the pseudorandom sequence. The correlation gives me what each bit is and a belief/probability for that bit.
This works really well because the sequence is orthogonal to just about every other sequence (it’s white noise!). It’s even orthogonal to time shifted versions of itself, meaning that it does well at rejecting multipath distortion.
1: https://en.m.wikipedia.org/wiki/Direct-sequence_spread_spect...
Conceptually, what you do is correlate on the incoming signal like normal, this first lock is the dominant path. You take the component that correlated and subtract it from the incoming signal and correlate again on what remains. This lock is the second multipath. You can do this to recover as many multipaths as you want or have dynamic range for. Finally, the relative offsets in the correlations tell you how to re-align all the multipaths in time. Once they are aligned you can sum them together and get more SNR than if there had been no multipath at all.
Third wire does not collect interference in a balanced line. Instead, voltage signalling balanced line uses one ground and two signal lines of opposite polarity and input is difference between these two signal lines. Induced interference is more or less the same on both signal lines, therefore cancels out. At a quick glance this article [1] seems to explain this without delving into electronics. Some differential lines (e.g. RS-485, popular in industrial automation) use current signalling thus requiring two wires per signal.
[0]: http://www.cliffuk.co.uk/products/combijacks/combijacks.jpg [1]: http://www.aviom.com/blog/balanced-vs-unbalanced/
Virtually all high-speed digital communication uses differential signalling.
E.g. PCIe transmitters are HSCL, which is a form of current steering that gives the receiver exactly the voltages it needs to see at nominal currents and termination values.
The receiver inverts -sig and adds it to +sig.
Any noise appears in both lines and is subtracted to zero, leaving 2 * sig.
In fact, he's got a nice little simulation of generating a "gold code", adding noise and multipath distortion to it, feeding it through an I/F mixer, quantising it, and recovering the original code. http://www.aholme.co.uk/GPS/SRC/2011/C++/Simulation.cpp
Problem is the circuit needs very accurate resistors and needs to be carefully balanced, just like an instrumentation amp.
The opposite also exists - a “digital stage box” to convert analog signals from mics and instruments to digital as soon as possible.