Mini-Project #2: PN Sequence Encoder for Echolocation


5/5 - (3 votes)

Mini-Project #2: PN Sequence Encoder for Echolocation
(worth 15 pts total)
This project is designed to help you become intimately familiar with the generation of PN
sequences for encoding/encrypting signals. The technology has a dual use which you will take
advantage of in this project. The cross-correlation properties of the sequences permit you to
detect multipath components and measure multipath differences. This will also correspond to
you detecting the channel impulse response given the test configuration. There are many other
uses in the wireless and security area using these types of signals as the basis which you are
encouraged to explore.
In this mini project, you would design an acoustic echo-location sensor. Consider a 1D array of
an acoustic source (speaker), receiver (mic), and reflector (wall or other) at locations 0, 1, and
1.2 meters respectively on the x-axis. The receiver would receive direct line of sight signals from
the speaker as well as the multipath components from the reflections. If the direct path and the
reflected path possess a path difference of 40cm, you would expect that the channel impulse
response (CIR) would have two peaks separated in time by the equivalent of the propagation
time due to the path length difference and propagation speed associated with the acoustic
You are to design a system that generates a spreads spectrum signal using a PN sequence and
which measures the distance between the reflector and the receiver by performing a PN
sequence detection on the received signal. Naturally, the peaks detected in the CIR correspond
to direct and reflected paths will move relative to each other if the geometric relationship
between the reflector and receiver is changed. You will use Matlab to generate the PN
sequence based upon a chosen characteristic polynomial and an LFSR implementation. You will
use the PN sequence to modulate an acoustic frequency of your choice (choose wisely). You will
use your own laptops and smartphones for generating, transmitting, and receiving the signals
as well as performing the signal detection and distance estimate (this will be a simple
correlation receiver).
Bonus points if you want to generate and transmit an OFDM-based signal for this project rather
than just a single tone as the carrier.
Build the following components in Matlab:
Steps your code must perform:
1. You must implement a PN sequence generator using a binary irreducible primitive
polynomial picked based upon the order you determine to be a best-fit for your project
implementation. You will code up a LFSR implementation in Matlab to generate the PN
2. You will pick a transmit frequency (carrier) for your implementation.
3. You will spread the carrier using the m-sequence you generated and transmit it out of a
speak on your laptop or cell phone.
4. You will build a receiver in Matlab using the built in microphone of your laptop or cell
phone as the receive transducer and grab the data in Matlab.
5. You implement a correlation receiver by performing a correlation with the known PN
sequence against the received signal to determine the CIR.
6. You will calculate the primary path difference and at least one secondary path distance
from the correlation results.
7. You will also generate a second PN sequence at the receiver that is based upon some
other characteristic polynomial (BIPP) other than the one you used to generate the
transmit signal and perform the same correlation approach on the received signal to
compare the results from above.
I will be posting a grading rubric. You will be submitting your code and a short report explaining
your particular implementation, why you chose the f(x) you did, why you picked a particular
LFSR implementation, the correlation results and the calculated distance based on the
correlation graph (CIR) of your received data. You will relate the correlation plot with your
physical test setup (that is, make sure you make accurate physical measurements of where your
transmitter is located and where your receiver is located) and include a sketch of the test setup
in your report. You will also show the resultant plot based upon the second PN sequence and
state any observations you have from comparing the primary and secondary results (that is,
based upon the two correlations you performed at the receiver).
If you implemented the bonus points approach (OFDM-based TX/RX), please discuss that
implementation in the writeup.

Scroll to Top