Giter Site home page Giter Site logo

dtc-doppler-illustrator's Introduction

dtc-doppler-illustrator

License: MITย  Codacy Badge

Illustrating acoustic Doppler effect using Android phones

Two phones are required: one for emitting inaudible sounds and the other for calculating and displaying Doppler

Screenshot

screenshot

(Screenshot from Huawei Mate 20)

Code Structure

It has mainly two components. One for transmitting signals, and the other one for analyzing received signals. Parts of codes are copied from my other two repositories dtc-frequency-player and dtc-acoustic-spectrumer. You could refer to these repositories for some details.

Sender

The sender part is implemented in the PlaySound.java class, which emits sounds of a single frequency. The phone sends out sounds of 19 KHz. You can easily change to other frequencies if you like. See my repo dtc-frequency-player

Receiver

The receiver part is implemented in the AnalyzeFrequency.java class. The acoustic signals go through the following processing

  1. receive sounds. See my repo dtc-acoustic-spectrumer

  2. filtering. We apply a bandpass filter that only allows signals within [18KHz, 21KHz]. There is a very convenient Android app named FIR Filter Designer that can generate Java code for you. The higher order of filters causes greater computation overhead.

  3. undersampling and overlapping. Undersampling is applied to increase the frequency resolution and overlapping is used to increase temporal fidelity. We use 8X undersampling and 0.875 overlapping.

  4. window function. We apply Blackman-Harris window to smooth the spectrum. You can try other window functions as well. https://en.wikipedia.org/wiki/Window_function

  5. Fast-Fourier Transform (FFT). See my repo dtc-acoustic-spectrumer

  6. calculate Doppler shift. Since we know that the sender's signal is 19 KHz, we only need to calculate the received frequency (with the strongest magnitude) minus 19 KHz.

  7. draw Doppler shift on screen. See my repo dtc-acoustic-spectrumer

More Details

This repo is part of my project. For more technical details please refer to my paper

  • [Paper 1] DopEnc: Acoustic-based Encounter Profiling Using Smartphones, published in ACM Conference on Mobile Computing and Networking (MobiCom), 2016
  • [Paper 2] An Acoustic-Based Encounter Profiling System, published in IEEE Transactions on Mobile Computing (TMC), 2018

Please also consider to cite my papers. Thank you.

Phones Tested

  • Huawei Mate 20
  • Google Pixel 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.