(The content on these pages may be freely used for educational, noncommercial purposes provided appropriate references are provided. Commericial users are kindly asked to contact me first. Be aware that in any case, they come with no warantee: use at your own risk!)
Opportunistic imaging
System requirements and installation
- Python 2.5 or newer
- GTK and python bindings
- GStreamer and python bindings
- the Python numpy and scipy libraries
- Python WAV file import (should be standard)
- python-numpy
- python-scipy
Demonstrations using acoustic sounders
This experiment demonstrates the signal space embedding theorem (see "Topological localization via signals of opportunity") for acoustic signals. The basic idea is that a collection of simple transmitters (special hardware used, but it's not crucial) emit signals received by a single receiver (laptop computer sound card). In order to provide some discrimination of which received signal corresponds to which transmitter, the transmitters emit short pulses, one after the other. The transmit sequence is enforced by a simple one-wire handshake. As it happens, the software framework for receiving supplied below loses synchronization frequently, so we can only identify transmitters up to a cyclic permutation. Even in spite of this, the signal embedding theorem guarantees unique signal response for each receiver location if enough transmitters are present. Downloadable items for conducting the experiment:
- rx_tdma_chirp.py which runs the receive and decode process on the receiver laptop. This produces an output text file in which each row corresponds to a measurement.
- projectPoints.py which is a real-time display of points projected from high dimensional Euclidean space to the plane. It uses the output of rx_tdma_chirp as its input.
- Schematic and directions for the acoustic sounder
- The sounder contains a PIC16F88 microcontroller. Here is the source code for it.
Step-by-step instructions for conducting the experiment:
- Apply power to each individual sounder
- Connect the signaling wires between each sounder
- Start the sounders emitting chirps by briefly grounding one of the signaling wires on one of the sounder. Reattach it before the active transmitter returns to the one you started.
- Start the receive thread using the command "rx_tdma_chirp -m level -t number of transmitters"
- Start the display thread using the command "projectPoints number of transmitters out.txt"
Software to work with anything that can play sound files
Instead of using special hardware for transmitting signals, anything that can play a sound file can be used. Matched filters can be used to discriminate between the different choices of signals, though as in the previous experiment, several transmitters can emit the same signal. Rather than conducting the experiment in real time, this experiment collects data on request for offline processing. This can enable more experiments that are more carefully controlled.
- matfilter.py implements a simple bank of 8 matched filters. Each filter can have a reference signal taken from a recording taken just before the experiment (while the program is running), or from an uncompressed WAV file.
- Here are several chirp files in WAV and MP3 format, though you could use anything, really. These particular ones have mutual isolation of better than 10 dB.
Step-by-step instructions for conducting the experiment:
- Start up the matched filter program
- Load each reference file, either by playing a clip and pressing the Capture button, or by typing in a filename of a WAV file containing the reference. Press Enter after each filename to trigger it to load.
- Set up and activate the transmitters
- Once everything is in order, press the Store button to take data
- Repeat collection of data (pressing the Store button for each datapoint). If you make a mistake, you can delete datapoints.
- Once complete, press the Save button to save your datafile.
Here is some sample data, and at right is a screenshot of the program in action.
Imaging with wireless access points
Thanks goes out to Daniel Muellner and Mikael Vejdemo-Johansson for the scripts used in this demo!
Instead of acoustic sounders, you can use wireless access points to generate the ambient signals for localization. Here are two scripts that read data (under Linux or Mac OS) from a wireless card and format it appropriately for projectPoints.py.
- ssidcollect_linux.py which collects the ethernet (MAC) addresses of wireless access points in range and their signal strengths. On my computer at least, it requires you to be connected to one of them in order to get data. Your mileage may vary. I ran this on my Nokia n900 phone using a slightly modified script ssidcollect_maemo.py, and a Mac OS version: ssidcollect_macos.py.
- ssidaccumulate.py which formats the output of ssidcollect_linux.py into a CSV file, similar to the data from the acoustic experiments above.
Step-by-step instructions for conducting the experiment:
- Connect your computer to a wireless network (may be optional depending on your wireless drivers)
- Make sure the collection works: "ssidcollect_os.py". You may have to use "sudo" to run this depending on your system. Press Control-C or equivalent to stop the collection.
- Acquire data "ssidcollect_os.py > data.log"
- Reformat it into a CSV file for later useage "ssidaccumulate.py < data.log > data.csv"
Asynchronous circuits
Asynchronous circuits are very easy to see when the logic gates aren't very fast. Although one could use delay circuits to show this with transistorized electronics, it is trivial to make slow asynchronous circuits using relays. Here are the schematics for two example circuits: a Glitch generator and an RS flip-flop.
Thanks goes out to Daniel Muellner and Mikael Vejdemo-Johansson for the scripts used in this demo!
Instead of acoustic sounders, you can use wireless access points to generate the ambient signals for localization. Here are two scripts that read data (under Linux or Mac OS) from a wireless card and format it appropriately for projectPoints.py.
- ssidcollect_linux.py which collects the ethernet (MAC) addresses of wireless access points in range and their signal strengths. On my computer at least, it requires you to be connected to one of them in order to get data. Your mileage may vary. I ran this on my Nokia n900 phone using a slightly modified script ssidcollect_maemo.py, and a Mac OS version: ssidcollect_macos.py.
- ssidaccumulate.py which formats the output of ssidcollect_linux.py into a CSV file, similar to the data from the acoustic experiments above.
- Connect your computer to a wireless network (may be optional depending on your wireless drivers)
- Make sure the collection works: "ssidcollect_os.py". You may have to use "sudo" to run this depending on your system. Press Control-C or equivalent to stop the collection.
- Acquire data "ssidcollect_os.py > data.log"
- Reformat it into a CSV file for later useage "ssidaccumulate.py < data.log > data.csv"
Asynchronous circuits
Asynchronous circuits are very easy to see when the logic gates aren't very fast. Although one could use delay circuits to show this with transistorized electronics, it is trivial to make slow asynchronous circuits using relays. Here are the schematics for two example circuits: a Glitch generator and an RS flip-flop.