CSE 562: Mobile Systems & Applications Quals Course Systems - - PowerPoint PPT Presentation

β–Ά
cse 562 mobile systems applications
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

CSE 562: Mobile Systems & Applications

Quals Course – Systems Area Shyam Gollakota

slide-2
SLIDE 2

2

First Mobile Phone 1973

slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5

Goal of this course

  • Have an understanding of state of the art mobile systems

research

  • Explore applications that are capable with mobile devices

5

slide-6
SLIDE 6

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
slide-7
SLIDE 7

Course material

7

  • 7. Backscatter systems
  • 8. Mobile privacy and security
  • 9. Robotics mobile systems
slide-8
SLIDE 8

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
slide-9
SLIDE 9

Signal processing basics

(Slides by Nirupam Roy)

slide-10
SLIDE 10

Model for a signal (frequency, amplitude, and phase)

slide-11
SLIDE 11

A . sin(πœ„) A . 𝑑𝑝𝑑(πœ„)

Model for a signal (frequency, amplitude, and phase)

slide-12
SLIDE 12
  • cos(πœ„)

1 sin(πœ„) 𝑔 π‘‘π‘§π‘‘π‘šπ‘“π‘‘ π‘žπ‘“π‘  π‘‘π‘“π‘‘π‘π‘œπ‘’ 2𝜌 π‘π‘œπ‘•π‘šπ‘“π‘‘ π‘žπ‘“π‘  π‘‘π‘§π‘‘π‘šπ‘“

πœ„ = 2πœŒπ‘”π‘’ Model for a signal (frequency, amplitude, and phase)

slide-13
SLIDE 13
  • A . sin(πœ„)

A = = A . sin(2πœŒπ‘”π‘’) time = t second

Frequency, Amplitude, and Phase

𝑔 π‘‘π‘§π‘‘π‘šπ‘“π‘‘ π‘žπ‘“π‘  π‘‘π‘“π‘‘π‘π‘œπ‘’ 2𝜌 π‘π‘œπ‘•π‘šπ‘“π‘‘ π‘žπ‘“π‘  π‘‘π‘§π‘‘π‘šπ‘“

Phas e A . sin(2πœŒπ‘”π‘’ + 𝜚) -- with initial/additional phase Ο•

slide-14
SLIDE 14

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

slide-15
SLIDE 15

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

slide-16
SLIDE 16

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

slide-17
SLIDE 17

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
slide-18
SLIDE 18

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

slide-19
SLIDE 19

Analogy: Food coloring chart

Basis for food colors

slide-20
SLIDE 20

Analogy: Food coloring chart

Basis for food colors

slide-21
SLIDE 21

Analogy: Food coloring chart

Basis for food colors

slide-22
SLIDE 22

Analogy: Food coloring chart

Basis for food colors

slide-23
SLIDE 23

= 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

slide-24
SLIDE 24

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

slide-25
SLIDE 25

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?

slide-26
SLIDE 26

Spectrogram

slide-27
SLIDE 27

Spectrogram

[ [ [ [

FFT FFT FFT FFT

FFT of overlapping windows

  • f samples

(Spectrogram)

slide-28
SLIDE 28

Spectrogram

slide-29
SLIDE 29

Physical signal (voice) Time varying voltage signal Spectrogram plot

  • n computer

FFT A collection of numbers

Analog Digital

slide-30
SLIDE 30

Temperature Thermo-couple

Time Voltage

Analog vs Digital World

Analog Digital

slide-31
SLIDE 31

Physical signal (voice) Time varying voltage signal Spectrogram plot

  • n computer

FFT A collection of numbers

Analog Digital

?

slide-32
SLIDE 32

Physical signal (voice) Time varying voltage signal Spectrogram plot

  • n computer

FFT A collection of numbers

Analog Digital

ADC

Analog-to-Digital Converter

slide-33
SLIDE 33

Amplitud e

0.2 5 0.5 0.7 5 1.0 1.2 5

Time (sec)

0.0

Sampling theorem

slide-34
SLIDE 34

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

slide-35
SLIDE 35

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

slide-36
SLIDE 36

1-dimensional sampling

slide-37
SLIDE 37

1-dimensional sampling 2-dimensional sampling

slide-38
SLIDE 38

1-dimensional sampling 2-dimensional sampling 3-dimensional sampling

slide-39
SLIDE 39

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

slide-40
SLIDE 40

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

slide-41
SLIDE 41

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

slide-42
SLIDE 42

Aliasing

slide-43
SLIDE 43

Aliasing in real life

https://www.youtube.com/watch?v=QOwzkND_ooU

slide-44
SLIDE 44

How to find a good sample rate?

slide-45
SLIDE 45

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

slide-46
SLIDE 46

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

slide-47
SLIDE 47
slide-48
SLIDE 48

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

slide-49
SLIDE 49

Commonly, the maximum frequency in human voice is 4 kHz, what sample rate will you use in your audio recorder?

slide-50
SLIDE 50

10k 20k 30k 40k 50k 60k 70k 80k 90k 100k

Frequency spectrum

Amplitud e

Nyquist frequency

Aliasing: A real life scenario

slide-51
SLIDE 51

10k 20k 30k 40k 50k 60k 70k 80k 90k 100k

Frequency spectrum

Amplitud e

Nyquist frequency

Aliasing: A real life scenario

slide-52
SLIDE 52

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

slide-53
SLIDE 53

10k 20k 30k 40k 50k 60k 70k 80k 90k 100k

Frequency spectrum

Sensor ADC

Amplitud e

Anti-aliasing Filter

Anti-aliasing filter

Nyquist frequency

slide-54
SLIDE 54

10k 20k 30k 40k 50k 60k 70k 80k 90k 100k

ADC

Amplitud e

Sensor

Frequency spectrum

Anti-aliasing Filter

Anti-aliasing filter

Nyquist frequency

slide-55
SLIDE 55

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

slide-56
SLIDE 56

A . sin(πœ„) A . 𝑑𝑝𝑑(πœ„)

Model for a signal (frequency, amplitude, and phase)

slide-57
SLIDE 57
  • cos(πœ„)

1 sin(πœ„)

Model for a signal (frequency, amplitude, and phase)

How can we incorporate both Sine and Cosine in the equation?

slide-58
SLIDE 58
  • cos(πœ„)

1 sin(πœ„)

Model for a signal (frequency, amplitude, and phase)

𝑑𝑝𝑑 πœ„ + sin(πœ„) 1.

slide-59
SLIDE 59
  • cos(πœ„)

1 sin(πœ„)

Model for a signal (frequency, amplitude, and phase)

𝑑𝑝𝑑 πœ„ + sin(πœ„) < 𝑑𝑝𝑑 πœ„ , sin πœ„ > 1. 2.

slide-60
SLIDE 60
  • cos(πœ„)

1 sin(πœ„)

Model for a signal (frequency, amplitude, and phase)

𝑑𝑝𝑑 πœ„ + sin(πœ„) < 𝑑𝑝𝑑 πœ„ , sin πœ„ > 𝑑𝑝𝑑 πœ„ + π‘˜ sin πœ„ 1. 2. 3.

slide-61
SLIDE 61

Complex numbers

π‘˜ = βˆ’1

Imaginary

slide-62
SLIDE 62

Complex numbers

slide-63
SLIDE 63

Complex numbers

slide-64
SLIDE 64
  • –8

8

Imaginary

axis j8

  • j8

Real axis

= multiply by "j"

  • β€”
  • Complex numbers
slide-65
SLIDE 65

Complex numbers and Natural exponential

slide-66
SLIDE 66
  • ej = 1 + j + (j)2

2! + (j)3 3! + (j)4 4! + (j)5 5! +

  • Complex numbers and Natural exponential
slide-67
SLIDE 67
  • 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
slide-68
SLIDE 68
  • 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

slide-69
SLIDE 69

Complex numbers and Natural exponential

slide-70
SLIDE 70

Model for a signal (frequency, amplitude, and phase) 𝑑𝑝𝑑 πœ„ + π‘˜ sin πœ„

π‘“π‘˜πœ„

=

slide-71
SLIDE 71

Model for a signal (frequency, amplitude, and phase) 𝑑𝑝𝑑 πœ„ + π‘˜ sin πœ„

π‘“π‘˜πœ„

= =

π‘“π‘˜ 2Ο€ft

slide-72
SLIDE 72

Model for a signal (frequency, amplitude, and phase)

π‘“π‘˜ 2Ο€ft

slide-73
SLIDE 73

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

slide-74
SLIDE 74

Model for a signal (frequency, amplitude, and phase) 𝑑𝑝𝑑 πœ„ + π‘˜ sin πœ„ =

π‘“π‘˜πœ„ How about real sinusoids?

𝑑𝑝𝑑 πœ„

=

?

=

?

π‘‘π‘—π‘œ πœ„

𝑑𝑝𝑑 πœ„ βˆ’ π‘˜ sin πœ„ =

𝑓

_π‘˜πœ„

slide-75
SLIDE 75

Presenting real signal with the complex model

𝑑𝑝𝑑 πœ„

=

π‘“π‘˜πœ„ 𝑓

_π‘˜πœ„

+

2

π‘‘π‘—π‘œ πœ„

=

π‘“π‘˜πœ„ 𝑓

_π‘˜πœ„

βˆ’

2j

𝑑𝑝𝑑 πœ„ + π‘˜ sin πœ„ =

π‘“π‘˜πœ„

𝑑𝑝𝑑 πœ„ βˆ’ π‘˜ sin πœ„ =

𝑓

_π‘˜πœ„

slide-76
SLIDE 76

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

slide-77
SLIDE 77

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

slide-78
SLIDE 78

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

slide-79
SLIDE 79

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

?

slide-80
SLIDE 80

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

?

slide-81
SLIDE 81

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

slide-82
SLIDE 82

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

slide-83
SLIDE 83

Plotting the DFT spectrum

Magnitud e

|zm|

2 m = 0 3 4 1 N-1 N-2

…

Frequency

slide-84
SLIDE 84

DFT (Discrete Fourier Transform)

slide-85
SLIDE 85

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

slide-86
SLIDE 86

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”

slide-87
SLIDE 87

2 m = 0 3 4 1 N-1 N-2

…

+

  • +
  • +

Frequency

The Curious Case of β€œNegative frequency”

slide-88
SLIDE 88

2 m = 0 3 4 1

  • 3
  • 2
  • 1
  • 4

Frequency

The Curious Case of β€œNegative frequency”

slide-89
SLIDE 89

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|

slide-90
SLIDE 90

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|

slide-91
SLIDE 91

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 # , … ,

slide-92
SLIDE 92

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?

slide-93
SLIDE 93

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

!

slide-94
SLIDE 94

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

# &' (() *&+,-.

slide-95
SLIDE 95

What should be the sample rate?

Amplitude

4

Frequency (kHz)

6 8 2

Downsampling 𝑓ECFG$H 𝑓ECFG%H X 𝑓IECFG$H

slide-96
SLIDE 96

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