Gold codes solve the problem of multiple transmitters sharing spread-spectrum bandwidth without mutual interference. A single maximum-length PRBS fails when used across multiple transmitters because path delays, multipath, and asynchronous operation cause periodic phase alignment and high cross-correlation. Gold codes are constructed from 'preferred pairs' of m-sequences whose cross-correlation is bounded to a three-valued function with maximum amplitude of 2^((N/2)+1)+1, regardless of relative phase. The post derives the Three-Valued Cross-Correlation Theorem, shows how to find preferred polynomial pairs via decimation ratios, and demonstrates empirically in Python that up to 32767+2 distinct Gold sequences can be generated from a 15-bit LFSR pair. A working UART DSSS demo encodes 8 simultaneous messages using different Gold codes and decodes all of them with zero errors at a spreading ratio of 128.

1h 0m read timeFrom embeddedrelated.com
Post cover image
Table of contents
Spread-spectrum: A RecapSchrödinger’s Highway: Let’s Talk About Traffic FlowBack from FantasylandLooking Again at a Common PRBSGold Codes, at Last!Spread-Spectrum Showcase with Gold CodesDueling Signals: Common PRBS vs. Gold CodesUse of Gold Codes in the Global Positioning System (GPS)WrapupReferencesAppendix: How Did We Calculate Traffic Density?