CSE 561: Computer Networks, Spring 2016
  CSE Home   About Us   Search   Contact Info 
Home
Course email
Homework Turnin
Class GoPost Forum
Gradebook CSE561
Schedule
Hw/Project Schedule
   

 
Assignment 1


Due Date: 4/27/2016

Design a wireless acoustic communication channel on an android phone with

  • Data rate – number of bits communicated per second – at least 500 bps
  • Bit error rate – Ratio of the number of bits correctly received to the number of bits sent – less than 2%

 
Components

  • Sender: An android app that
    • Takes a file or a short message as input and convert it to actual bits
    • Modulates the bits to a signal that can sent
    • Send the signal over an acoustic channel
  • Receiver: An android app that
    • Receives the acoustic signal
    • Decodes the signal to bits
    • Display the message

 
Prerequisites

(Skip if you already have android programming platform setup in your machine)

Set up a machine for android programming: For people new to android programming, I suggest that you first try writing a basic app to understand the android programming structure:

http://developer.android.com/training/basics/firstapp/creating-project.html

This link is a sample tutorial that takes you step by step in writing your first app and installing it on your phone. You can also debug your app while it is running on the phone.

http://www.i-programmer.info/programming/android/5887-androidadventures-getting-started-with-android-studio.html

This is another tutorial, which explains the android programming structure.

 
Project Implementation Steps

  • Sender app:

    Add a textbox to your app to enter a message or filename as input. Have a send button which will invoke a send function on click:

    • The send function should first convert the message or file to a bit array of 0's and 1's, and add a header. The header in this case will have the source, destination, and length of the message.

    • Then choose a frequency in which you are going to operate. The frequency available to you is 0-20 KHz, as the speaker and microphone in your phone will support only this range. However, it is wise to check the frequency response of the speaker/microphone pair and choose an appropriate frequency. Usually a frequency from 1-12 KHz will be suitable. Generate a carrier wave (Sine wave) of this frequency.

    • Write a modulate function which modulates the data bits using a modulation scheme like ASK, PSK, etc. The modulation scheme will determine your data rate.

    • You can just send the resulting signal using the speaker. However, to identify the start of the data at the receiver, your data should be preceded by a preamble. A preamble is a sequence of bits known by both the sender and the receiver. The receiver looks for the preamble and once it identifies the preamble, it decodes the data that proceeds it. A preamble is a signal that can be easily identified at the receiver. So, choose an appropriate pattern of some length as your preamble.

    • Now use the AudioTrack api to send the signal through the speaker.

  • Receiver app:

    • Write a recorder using the AudioRecord api. It should record samples from the microphone and store it in a buffer.

    • Process the samples in the buffer to identify the preamble.

    • Once you identify the start of the preamble, you can start decoding the data that proceeds it. Decoding the header gives the length of the data. Then decode the entire data.

    • Convert the bits to a string and display it in a textbox.

  • Sophisticated Techniques:

    The above steps detail the basic components for your communication channel. However, you can use more sophisticated techniques to make your channel more efficient. Here are some suggestions:

    At the sender:

    • Use a preamble that has a high detection accuracy, but a shorter length

    • Use a good modulation scheme to increase your data rate

    • Use better coding techniques to reduce the bit error rate at the receiver as you increase your data rate

    At the receiver:

    • You can design some filtering techniques to filter the environment noise

    • Do some channel estimation to improve the decoding process

 
Report

Now, perform two tasks with the app:

Task 1: Send a 1Kb file repeatedly for 10 times from one phone to another when they are placed next to each other. Find the average bit error rate achieved.

Task 2: Now increase the distance between the two phones by 10cm and find the average bit error rate each time. Plot a graph of the average BER with respect to the distance between the two phones.

Report the following in a document:
  • Modulation scheme used

  • Number of bits per symbol used

  • Data rate achieved

  • Bit error rate

  • The maximum distance between the phones at which the BER is still less than 2%
Also report any design decisions or sophisticated techniques you used implementing the communication channel.


 
Extra Credit

Extra credit for the team with the maximum bit rate, and for the team that achieves the maximum distance of communication with a bit error rate less than 2%.

Computer Science & Engineering
University of Washington
Box 352350
Seattle, WA  98195-2350
(206) 543-1695 voice, (206) 543-2969 FAX
[comments to gshyam at cs.washington.edu]