Aim of the Experiment
In this experiment, you will generate pseudo-random binary sequences using linear feedback shift registers. You will also learn about the self-synchronizing digital data scrambler and descrambler. These binary sequences will be used to simulate binary data sources for the remaining experiments. Please check out the DSP boards as per usual.
Applications of Pseudo-Random Binary Sequences
Pseudo-random binary sequences are also known as pseudo-noise (PN) sequences because the sequences resemble noise. These binary sequences appear to be random but instead have structure. They have all frequencies present; i.e., there are no nulls in the magnitude spectrum.
PN sequences are widely used to
The first application is to use a PN sequence to estimate an impulse response of an unknown subsystem, e.g. the cascade of a source, empty chamber, and receiver in a biomedical instrument. Once the impulse response is known, calibration of the system can proceed by means of a linear time-invariant filter in the transmitter (known as a predistorter) or receiver (known as an equalizer) to compensate for the distortion in the subsystem.
As a training signal, the PN sequence would be the digital data to be transmitted over the unknown communication channel. The receiver knows the bits that had been transmitted, and can use that knowledge to adapt receiver settings to improve communication performance (signal quality). The receiver can also estimate the impulse response of the communication channel if needed.
In data scramblers, PN sequences are used to prevent long strings of 0's and 1's. For baseband transmission, during a long string of 0's or 1's, the primary frequency component in the signal would be at DC, and DC does not get passed by some communication channels (e.g. voiceband and acoustic channels). For bandpass transmission, during a long string of 0's or 1's, the primary frequency of the message signal (DC) would be upconverted to sit at the carrier frequency. This presents at least two problems:
The primary application of PN sequences in lab #4 is for data scrambling and descrambling.
The WWM book also mentions a legacy application of the PN sequences in 2G cell phones that used code division multiple access (CDMA) pioneered by Qualcomm in 1990s. In 2G CDMA cell phones, PN sequences are used in the uplink direction (from mobile to basestation) to enable the basestation to distinguish one user from another. See reading assignments below.
Recitation Slides by Ms. Debarati Kundu and Mr. Andrew Mark, The University of Texas at Austin
Lab #4 instructions by Mr. Yeong Choo and Mr. Sam Kanawati, The University of Texas at Austin
Example autocorrelation code in MATLAB by Prof. Brian L. Evans, The University of Texas at Austin
LabVIEW transmitter demonstration by Dr. Zukang Shen to show how labs 1-6 fit together
Overview Slides by Prof. Steven Tretter, University of Maryland (from Jan. 2008 lab manual)
Data scrambling in voiceband modems
Using Mathematica to analyze connection polynomials
A connection polynomial is irreducible if it cannot be factored into simpler polynomials over modulo-2 arithmetic. We can test whether or not the following polynomial is irreducible
2 3 4 1 + x + x + x + xby using the following Mathematica command:
In:= Factor[ 1 + x + x^2 + x^3 + x^4, Modulus -> 2 ] 2 3 4 Out= 1 + x + x + x + xSo, it is irreducible.
A polynomial of order m is primitive if the smallest value of N for which the polynomial xN - 1 is divisible by the connection polynomial equals 2m - 1. So, we can search over all N from 1 to 2m - 1 inclusive.
The connection polynomial above is not primitive because it divides x5 - 1:
In:= Factor[ x^5 - 1, Modulus -> 2 ] 2 3 4 Out= (1 + x) (1 + x + x + x + x )
The scrambler and descrambler will be used in the remaining labs. In later labs, a different (longer) polynomial will be used.
Put the scrambler and descrambler in separate functions. Each should process a single bit at a time. An extremely modular program would also use separate functions for initializing the states of each.
Debugging and Troubleshooting Tips
All x86 processors have a timer called the Time Stamp Counter (TSC) that increments on every clock cycle, starting at zero for any given process. You can use the C function rdtsc to determine the clock cycles passed at two points, and take their difference to measure the execution time. More information, along with some copy-and-paste code can be found in Wikipedia. (contributed by Michael Graczyk).
Submitting this assignment is optional, but doing it would be useful with your QUIZ preparations
Back to the course home page