CSE 562: Mobile Systems & Applications Quals Course Systems - - PowerPoint PPT Presentation
CSE 562: Mobile Systems & Applications Quals Course Systems - - PowerPoint PPT Presentation
CSE 562: Mobile Systems & Applications Quals Course Systems Area Shyam Gollakota First Mobile Phone 1973 2 Goal of this course Have an understanding of state of the art mobile systems research Explore applications that are
2
First Mobile Phone 1973
Goal of this course
- Have an understanding of state of the art mobile systems
research
- Explore applications that are capable with mobile devices
5
Course material
6
- 1. Signal processing fundamentals
- 2. Acoustic device and device-free tracking
- 3. Physiological sensing using phones and
speakers
- 4. IMW tracking and GPS localization
- 5. Wi-Fi localization and sensing
- 6. Designing and building IoT device hardware
Course material
7
- 7. Backscatter systems
- 8. Mobile privacy and security
- 9. Robotics mobile systems
Grading
8
3 hands-on assignments (20+20+20% in all)
- One every two weeks
- Requires programming phones, microcontroller, etc.
Class presentation of one paper (10%) Final research project (30%)
- Proposal due on May 1
- 2-3 person project
Signal processing basics
(Slides by Nirupam Roy)
Model for a signal (frequency, amplitude, and phase)
A . sin(π) A . πππ‘(π)
Model for a signal (frequency, amplitude, and phase)
- cos(π)
1 sin(π) π ππ§ππππ‘ πππ π‘πππππ 2π ππππππ‘ πππ ππ§πππ
π = 2πππ’ Model for a signal (frequency, amplitude, and phase)
- A . sin(π)
A = = A . sin(2πππ’) time = t second
Frequency, Amplitude, and Phase
π ππ§ππππ‘ πππ π‘πππππ 2π ππππππ‘ πππ ππ§πππ
Phas e A . sin(2πππ’ + π) -- with initial/additional phase Ο
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Frequency: 4Hz Frequency: 2Hz
Frequency, Amplitude, and Phase
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Frequency: 2Hz
Frequencies of an arbitrary signal
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
The concept of the Fourier series
Time Domain and Frequency Domain
1 . sin 2πππ’ 1 3 . sin 2π. 3ππ’ 1 5 . sin 2π. 5ππ’ 1 7 . sin 2π. 7ππ’
- Approx. square wave
Time Domain and Frequency Domain
T i m e d
- m
a i n v i e w F r e q u e n c y d
- m
a i n v i e w
Analogy: Food coloring chart
Basis for food colors
Analogy: Food coloring chart
Basis for food colors
Analogy: Food coloring chart
Basis for food colors
Analogy: Food coloring chart
Basis for food colors
= A1 . sin 2ππ1π’ + B1 . πππ‘(2ππ1π’) + A2 . sin 2ππ2π’ + B2 . πππ‘(2ππ2π’) + A3 . sin 2ππ3π’ + B3 . πππ‘(2ππ3π’) + β¦
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Time Domain and Frequency Domain
Time Domain and Frequency Domain
Amplitude
0.2 5 0.5
Time
0.0
Amplitude
4
Frequency (Hz)
6 8 2
IFFT FFT
Fourier Transform
Time domain Frequency domain FFT = Fast Fourier Transform IFFT = Inverse Fast Fourier Transform
Frequency band
Amplitude
4
Frequency (kHz)
6 8 2
A 4 kHz frequency band starting at 2 kHz What is bandwidth? What is center frequency?
Spectrogram
Spectrogram
[ [ [ [
FFT FFT FFT FFT
FFT of overlapping windows
- f samples
(Spectrogram)
Spectrogram
Physical signal (voice) Time varying voltage signal Spectrogram plot
- n computer
FFT A collection of numbers
Analog Digital
Temperature Thermo-couple
Time Voltage
Analog vs Digital World
Analog Digital
Physical signal (voice) Time varying voltage signal Spectrogram plot
- n computer
FFT A collection of numbers
Analog Digital
?
Physical signal (voice) Time varying voltage signal Spectrogram plot
- n computer
FFT A collection of numbers
Analog Digital
ADC
Analog-to-Digital Converter
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Sampling theorem
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
[ 0.34 0.22 0.09 0.21 0.30 0.08 0.09 ] Sampling theorem
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Clock T = Sampling interval fs= 1/T = Sample rate (or sampling frequency)
Sampling theorem
1-dimensional sampling
1-dimensional sampling 2-dimensional sampling
1-dimensional sampling 2-dimensional sampling 3-dimensional sampling
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Sampling theorem
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Aliasing: Two signals become indistinguishable after sampling Sampling theorem
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Aliasing
Aliasing
Aliasing in real life
https://www.youtube.com/watch?v=QOwzkND_ooU
How to find a good sample rate?
How to find a good sample rate?
Nyquist sampling theorem: In order to uniquely represent a signal F(t) by a set of samples, the sampling rate must be more than twice the highest frequency component present in F(t).
If sample rate is fs and maximum frequency we want record is fmax , then
fs > 2fmax
Nyquist frequency = Maximum alias-free frequency for a given sample rate. Nyquist rate = Lower bound of sample rate for a signal
Amplitud e
0.2 5 0.5 0.7 5 1.0 1.2 5
Time (sec)
0.0
Nyquist
Amplitude
4
Frequency (kHz)
6 8 2
A 4 kHz frequency band starting at 2 kHz fmax = 6000 Hz
Amplitude
8
Frequency (Hz)
12 16 4
fmax = 12 Hz
Commonly, the maximum frequency in human voice is 4 kHz, what sample rate will you use in your audio recorder?
10k 20k 30k 40k 50k 60k 70k 80k 90k 100k
Frequency spectrum
Amplitud e
Nyquist frequency
Aliasing: A real life scenario
10k 20k 30k 40k 50k 60k 70k 80k 90k 100k
Frequency spectrum
Amplitud e
Nyquist frequency
Aliasing: A real life scenario
Frequency spectrum Nyquist frequency
10k 20k 30k 40k 50k 60k 70k 80k 90k 100k
Amplitud e
We need a βLow-pass filterβ to remove unwanted high frequency signals Aliasing: A real life scenario
10k 20k 30k 40k 50k 60k 70k 80k 90k 100k
Frequency spectrum
Sensor ADC
Amplitud e
Anti-aliasing Filter
Anti-aliasing filter
Nyquist frequency
10k 20k 30k 40k 50k 60k 70k 80k 90k 100k
ADC
Amplitud e
Sensor
Frequency spectrum
Anti-aliasing Filter
Anti-aliasing filter
Nyquist frequency
Anti-aliasing filter 10k 20k 30k 40k 50k 60k 70k 80k 90k 100k
Anti-aliasing Filter ADC
Amplitud e
Sensor
Frequency spectrum
Anti-aliasing filter
A . sin(π) A . πππ‘(π)
Model for a signal (frequency, amplitude, and phase)
- cos(π)
1 sin(π)
Model for a signal (frequency, amplitude, and phase)
How can we incorporate both Sine and Cosine in the equation?
- cos(π)
1 sin(π)
Model for a signal (frequency, amplitude, and phase)
πππ‘ π + sin(π) 1.
- cos(π)
1 sin(π)
Model for a signal (frequency, amplitude, and phase)
πππ‘ π + sin(π) < πππ‘ π , sin π > 1. 2.
- cos(π)
1 sin(π)
Model for a signal (frequency, amplitude, and phase)
πππ‘ π + sin(π) < πππ‘ π , sin π > πππ‘ π + π sin π 1. 2. 3.
Complex numbers
π = β1
Imaginary
Complex numbers
Complex numbers
- β8
8
Imaginary
axis j8
- j8
Real axis
= multiply by "j"
- β
- Complex numbers
Complex numbers and Natural exponential
- ej = 1 + j + (j)2
2! + (j)3 3! + (j)4 4! + (j)5 5! +
- Complex numbers and Natural exponential
- ej = 1 + j + (j)2
2! + (j)3 3! + (j)4 4! + (j)5 5! +
- = 1 + j - 2
2! - j 3 3! + 4 4! + j 5 5! - 6 6!
- Complex numbers and Natural exponential
- ej = 1 + j + (j)2
2! + (j)3 3! + (j)4 4! + (j)5 5! +
- = 1 + j - 2
2! - j 3 3! + 4 4! + j 5 5! - 6 6!
- β¦
β¦ β¦
πππ‘ β π π‘ππ β Complex numbers and Natural exponential
Complex numbers and Natural exponential
Model for a signal (frequency, amplitude, and phase) πππ‘ π + π sin π
πππ
=
Model for a signal (frequency, amplitude, and phase) πππ‘ π + π sin π
πππ
= =
ππ 2Οft
Model for a signal (frequency, amplitude, and phase)
ππ 2Οft
Model for a signal (frequency, amplitude, and phase)
- 180
270 360
- 90
Imaginary Real axis Time
- axis ( j )
- sin(2fot)
β2 β1 1 2 β 1 1 2 3 β2 β1 1 2 Time Real axis Imag axis
e j2fot
cos(2fot)
- β
- ππ 2Οft
π
_π 2Οft
Model for a signal (frequency, amplitude, and phase) πππ‘ π + π sin π =
πππ How about real sinusoids?
πππ‘ π
=
?
=
?
π‘ππ π
πππ‘ π β π sin π =
π
_ππ
Presenting real signal with the complex model
πππ‘ π
=
πππ π
_ππ
+
2
π‘ππ π
=
πππ π
_ππ
β
2j
πππ‘ π + π sin π =
πππ
πππ‘ π β π sin π =
π
_ππ
Presenting real signal with the complex model
πππ‘ 2Οft
=
ππ 2Οft π
_π 2Οft
+
2
π‘ππ 2Οft
=
ππ 2Οft π
_π 2Οft
β
2j
πππ‘ 2Οft + π sin 2Οft =
ππ 2Οft
πππ‘ 2Οft β π sin 2Οft =
π
_π 2Οft
Time Domain and Frequency Domain
Amplitude
0.2 5 0.5
Time
0.0
Amplitude
4
Frequency (Hz)
6 8 2
IFFT FFT
Fourier Transform
Time domain Frequency domain FFT = Fast Fourier Transform IFFT = Inverse Fast Fourier Transform
Time Domain and Frequency Domain
Amplitude
4
Frequency (Hz)
6 8 2
FFT
Fourier Transform
Time domain Frequency domain FFT = Fast Fourier Transform IFFT = Inverse Fast Fourier Transform
ππ 2Ο4t
Time Domain and Frequency Domain
Amplitude
4
Frequency (Hz)
6 8 2
FFT
Fourier Transform
Time domain Frequency domain FFT = Fast Fourier Transform IFFT = Inverse Fast Fourier Transform
πππ‘ 2Οft
?
Time Domain and Frequency Domain
Amplitude
4
Frequency (Hz)
6 8 2
FFT
Fourier Transform
Time domain Frequency domain FFT = Fast Fourier Transform IFFT = Inverse Fast Fourier Transform
πππ‘ 2Οft
= ππ 2Οft π
_π 2Οft
+ 2
?
Time Domain and Frequency Domain
Amplitude
4
Frequency (Hz)
6 8 2
Fourier Transform
Time domain Frequency domain FFT = Fast Fourier Transform IFFT = Inverse Fast Fourier Transform
πππ‘ 2Οft
= ππ 2Οft π
_π 2Οft
+ 2
- 6
- 4
- 2
FFT
Time Domain and Frequency Domain
Amplitude
4
Frequency (Hz)
6 8 2
Fourier Transform
Time domain Frequency domain FFT = Fast Fourier Transform IFFT = Inverse Fast Fourier Transform
πππ‘ 2Ο4t
= ππ 2Οft π
_π 2Οft
+ 2
- 6
- 4
- 2
FFT
Plotting the DFT spectrum
Magnitud e
|zm|
2 m = 0 3 4 1 N-1 N-2
β¦
Frequency
DFT (Discrete Fourier Transform)
Plotting the DFT spectrum
Magnitud e
|zm|
2 m = 0 3 4 1 N-1 N-2
β¦
Phase
⦨ zm
2 m = 0 3 4 1 N-1 N-2
β¦
Frequency Frequency
2π π 2π π (π β 1)2π π = 2π β 2π π (π β 1)2π π = 2π β 2π π
Positive rotation with
!" #
radian angle per step Negative rotation with !"
#
radian angle per step
The Curious Case of βNegative frequencyβ
2 m = 0 3 4 1 N-1 N-2
β¦
+
- +
- +
Frequency
The Curious Case of βNegative frequencyβ
2 m = 0 3 4 1
- 3
- 2
- 1
- 4
Frequency
The Curious Case of βNegative frequencyβ
2 m = 0 3 4 1
- 3
- 2
- 1
- 4
Frequency
The Curious Case of βNegative frequencyβ
Real signalβs magnitude spectrum is symmetric. Why? Magnitud e
|zm|
2 m = 0 3 4 1
- 3
- 2
- 1
- 4
Frequency
The Curious Case of βNegative frequencyβ
Complex signalβs magnitude spectrum may or may not be symmetric. Why? Magnitud e
|zm|
Estimating the real-world frequencies
Sampling frequency = fs (i.e., fs samples per second) Slowest frequency (!"
# radians per step) = N samples per rotation
= (N/ fs) seconds per rotation Therefore, the slowest frequency = (fs /N) Hz Higher frequencies are integer multiple of (fs /N) Hz 0, fs
# , 2fs # , 3fs # , 4fs # , β¦ ,
The resolution and the highest frequency
fs
$ Resolution = minimum observable frequency difference =
2 m = 0 3 4 1
- 3
- 2
- 1
- 4
Frequency Magnitude/ Phase of zm
What if the actual frequency falls in between two frequency bins?
The resolution and the highest frequency
2 m = 0 3 4 1
- 3
- 2
- 1
- 4
Frequency Magnitude/ Phase of zm
fs
C
Highest frequency =
β fs
!
The resolution and the highest frequency
How can we increase the resolution? How can we increase the range of the spectrum?
[β fs
C , fs C ]
fs π = sample rate
# &' (() *&+,-.
What should be the sample rate?
Amplitude
4
Frequency (kHz)
6 8 2
Downsampling πECFG$H πECFG%H X πIECFG$H
Downsampling
Amplitude
4
Frequency (kHz)
6 8 2
What should be the sample rate?
Amplitude
4
Frequency (kHz)
6 8 2
Frequency down-conversion
Generally, bandwidth of the signal determines the sample rate.
X πIECFG$H