0% found this document useful (0 votes)
22 views

Lecture03 Signals

This document provides a summary of basic signal processing concepts for IoT data collection. It discusses what signals are, examples of analog and digital signals, common sinusoidal signals defined by amplitude, frequency and phase, and how complex signals can represent both sine and cosine waves using Euler's formula. The document aims to cover common signal processing topics that may not be covered in typical computer science courses but are useful for understanding IoT data.

Uploaded by

marcel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Lecture03 Signals

This document provides a summary of basic signal processing concepts for IoT data collection. It discusses what signals are, examples of analog and digital signals, common sinusoidal signals defined by amplitude, frequency and phase, and how complex signals can represent both sine and cosine waves using Euler's formula. The document aims to cover common signal processing topics that may not be covered in typical computer science courses but are useful for understanding IoT data.

Uploaded by

marcel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

COMP3516: Data Analytics for IoT

Lecture 3:
Basics of Signals
Chenshu Wu
Department of Computer Science
Contents
• What Are Signals/Data?
• Analog/Digital Signals
• Common Signals: Sinusoids
• Complex Signals
• Sampling
• An Example of Sensing

• LOs: Manage basics of signals and understand things to note for IOT
data collection
• Or, just learn some common things useful but not taught in most CS courses.
What Are Signals?
• Certain physical variables
• Voltage, current…
• Light, temperature, humidity…
• ECG, blood pressure…
• Position, velocity, mass, …
• Price of stocks, interest/exchange rate, …
• Sound, water ripples, WiFi, infrared, …
• …
• Time-series: signals as a function of time (or other variables)
• The physical variable at a set of times
• Data!
• Signal Processing / Data Analytics
• Extract information/contexts from data/signals
Examples
Analog/Digital Signals
• Analog signals: Continuous domain and range
• Continuous-time signals, x(t)
• Digital signals: Discrete (and often finite) domain and range
• Discrete-time signals, x[n]

• Digitalize an analog signal (Why?)


• Sampling: Digitalize the (time) domain
• Quantization: Digitalize the range

• Analog-to-Digital Conversion/DAC
Common Signals: Sinusoids
• x(t) = Asin(ωt) = Asin(2π𝑓𝑡)
• A: amplitude
• ω: radian frequency in radians/s
• f: frequency in Hertz (Hz) / cycles per sec

• x(t) = Acos(2𝜋𝑓t−π/2)
Frequency, Amplitude, and Phase

Time
Frequency, Amplitude, and Phase
2𝜋 𝑎𝑛𝑔𝑙𝑒𝑠 𝑝𝑒𝑟 𝑐𝑦𝑐𝑙𝑒
𝑓 𝑐𝑦𝑐𝑙𝑒𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑
A sin(2𝜋𝑓𝑡 + 𝜙) -- with initial/additional phase 𝜙

A
𝚹

Phase time = t second

2𝜋
𝑥(t) = 𝐴sin(𝜃(𝑡)) = 𝐴 sin 2𝜋𝑓𝑡 = 𝐴sin( 𝑡)
𝑇
Waves in time and space
Waves in time and space
𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑓𝑟𝑜𝑚 𝑡ℎ𝑒 𝑠𝑜𝑢𝑟𝑐𝑒 (𝑑)
𝑠𝑝𝑎𝑐𝑒
Amplitude here

𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑓𝑟𝑜𝑚 𝑡ℎ𝑒 𝑠𝑜𝑢𝑟𝑐𝑒 (𝑑)


𝑠𝑝𝑎𝑐𝑒
is a delayed version of
the amplitude here.
Amplitude here

𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑓𝑟𝑜𝑚 𝑡ℎ𝑒 𝑠𝑜𝑢𝑟𝑐𝑒 (𝑑)


𝑠𝑝𝑎𝑐𝑒
is a delayed version of
the amplitude here.
Amplitude here

The delay depends


on the distance.
𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑓𝑟𝑜𝑚 𝑡ℎ𝑒 𝑠𝑜𝑢𝑟𝑐𝑒 (𝑑)
𝑠𝑝𝑎𝑐𝑒
is a delayed version of
the amplitude here.
2𝜋
𝑥(t) = 𝐴 sin 2𝜋𝑓𝑡 = 𝐴sin( 𝑡)
𝑇
Amplitude here

The delay depends


on the distance.
𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑓𝑟𝑜𝑚 𝑡ℎ𝑒 𝑠𝑜𝑢𝑟𝑐𝑒 (𝑑)
𝑠𝑝𝑎𝑐𝑒
is a delayed version of
the amplitude here.
2𝜋
𝑥(t) = 𝐴 sin 2𝜋𝑓𝑡 = 𝐴sin( 𝑡)
𝑇
𝑥(t, d) = 𝐴sin(2𝜋𝑓𝑡 − 𝜃(𝑑))
w𝑎𝑣𝑒𝑙𝑒𝑛𝑔𝑡ℎ = λ

𝑓 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑦𝑐𝑙𝑒𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑


𝐶 𝑚𝑒𝑡𝑒𝑟𝑠 𝑜𝑓 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑝𝑒𝑟 𝑠𝑒𝑐
(𝑠𝑝𝑒𝑒𝑑 𝑜𝑓 𝑡ℎ𝑒 𝑤𝑎𝑣𝑒)
𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑝𝑒𝑟 𝑐𝑦𝑐𝑙𝑒 = λ = 𝐶 / 𝑓
𝑤𝑎𝑣𝑒𝑛𝑢𝑚𝑏𝑒𝑟 = 1/𝜆
𝑐𝑦𝑐𝑙𝑒𝑠 𝑝𝑒𝑟 𝑢𝑛𝑖𝑡 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒
Complex Signals
Complex Signals

A sin(𝜃)

A 𝑐𝑜𝑠(𝜃)
Complex Signals
2𝜋 𝑎𝑛𝑔𝑙𝑒𝑠 𝑝𝑒𝑟 𝑐𝑦𝑐𝑙𝑒
𝑓 𝑐𝑦𝑐𝑙𝑒𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑

A
𝚹

Phase time = t second

A sin(2𝜋𝑓𝑡 + 𝜙) -- with initial/additional phase 𝜙


Complex Signals
2𝜋 𝑎𝑛𝑔𝑙𝑒𝑠 𝑝𝑒𝑟 𝑐𝑦𝑐𝑙𝑒
𝑓 𝑐𝑦𝑐𝑙𝑒𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑 How to incorporate both Sine
and Cosine in the equation?
sin(𝜃)

A
𝚹
cos(𝜃)
time = t second

A sin(2𝜋𝑓𝑡 + 𝜙) -- with initial/additional phase 𝜙


Complex Signals
omplex numberreader
he suspicious using should
that strange expression
now be asking, "Why isof it
thevalid
basetoofrepresent
the nat
ogarithms, e,using
omplex number raised tostrange
that an imaginary power?"
expression of theWebase
can of
validate Eq. (
the natural
ogarithms,
orld's
orld's
or
Euler’s Formula
e, raised
greatest
z ingreatest
to an
expert
expert
the series
onimaginary
infinitepower?"
on infinite
expansion
series,
series, Herr
definition of
WeHerr
e
can validate
z
Leonard Eq.
Leonard
in theEuler,
top
(7) as
Euler, by
by pluggin
line of F
z
or z in the series
ubstitution expansion
is shown on thedefinition of e in the top line of Figure 3
second line.
ubstitution is shown on the second line.
2 3 4 5
z z 2 3z 4 z 5 z z+6 z6
ez = 1 + z + z + z +z z
+
e = 1 + z + 2!2! + 3!3!+ 4! 4! + 5! 5!+ 6! 6!...+ ...
+
2 3 4 5 6
j
j (j(j
)2 ) (j (j
)3 ) (j )(j
4 ) (j )5(j ) (j )6 (j )
e == 11 ++ jj + + 2!2! + + 3! 3! + +4! 4!+ +5! 5!+ +
6! 6!... + ..
+

2 2 3 3 4 4 5 5 6 6
== 11 ++ j j - - 2! - j- j
3! 3!+ + j +5!j
+4! 4! - + ... + ...
2! 5! 6! - 6!

𝑐𝑜𝑠 ∅ 𝑗 𝑠𝑖𝑛 ∅
j
e j= cos( ) + jsin( )
Complex Signals
Complex Signals

𝑐𝑜𝑠 𝜃 + 𝑗 sin 𝜃 = 𝑒 !" = 𝑒𝑗 2π𝑓𝑡


Complex Signals
• The most basic complex-valued signal is the complex
exponential 𝑒 !"# .

𝑒 !$%&# = 𝑐𝑜𝑠 2πft + 𝑗 sin 2πft

𝑒 '!$%&# = 𝑐𝑜𝑠 2πft − 𝑗 sin 2πft


How about real sinusoids?
𝑐𝑜𝑠 𝜃 = ?
𝑠𝑖𝑛 𝜃 = ?
Complex Signals

𝑒𝑗2πft
Complex Signals

e j2 fot
Imaginary
axis ( j )
2
𝑒𝑗2πft sin(2 fot)

Real axis
1
0o 90 o

Imag axis
0
_𝑗2πft
180 o
–1 𝑒
–2
o
360 –
1 0
o
270
2
1 1
Time 0 xi s
2 –1 Re al a
Time –2
3 cos(2 fot)
(a) (b)

Figure 6. The motion of the ej2 fot


phasor (a), and phasor 's tip (b).
Sampling
Amplitude

Time (sec)

0.00 0.25 0.50 0.75 1.00 1.25

T = Sampling interval fs= 1/T = Sample rate (or sampling frequency)


Amplitude

Time (sec)

0.00 0.25 0.50 0.75 1.00 1.25


Sampling
Amplitude

Time (sec)

0.00 0.25 0.50 0.75 1.00 1.25

T = Sampling interval fs= 1/T = Sample rate (or sampling frequency)


Amplitude

Time (sec)

0.00 0.25 0.50 0.75 1.00 1.25


Sampling
Amplitude

Time (sec)

0.00 0.25 0.50 0.75 1.00 1.25

Aliasing: Two signals become


indistinguishable after sampling
Amplitude

Time (sec)

0.00 0.25 0.50 0.75 1.00 1.25


Sampling
Amplitude

Time (sec)

0.00 0.25 0.50 0.75 1.00 1.25

Aliasing: Two signals become


indistinguishable after sampling
Amplitude

Time (sec)

0.00 0.25 0.50 0.75 1.00 1.25


Sampling
• Nyquist sampling theorem:
• In order to uniquely represent a signal x(t) by a set of samples, the
sampling rate must be more than twice the highest frequency
component present in x(t).
• If sample rate is fs and the maximum frequency of interest is fmax
, then fs > 2fmax
Nyquist frequency: Maximum alias-free
frequency for a given fs

Nyquist rate: Minimum sample rate for a


given signal = twice the highest frequency
Aliasing in Real Life

https://www.youtube.com/watch?v=B8EMI3_0TO0
Aliasing in Real Life

https://www.youtube.com/watch?v=QOwzkND_ooU
Time and Frequency Domain
Why Frequency Domain?
Why Frequency Domain?
A simple example of sensing

Absorption
+
Reflection

echo
A simple example of sensing
Time = t1
A simple example of sensing
Time = t1
Absorption
+
Reflection
A simple example of sensing
Time = t1
Absorption
+
Reflection

echo
t2
A simple example of sensing
Time = t1
Absorption
+
d Reflection

echo
t2
Sound
travelled (2d)
distance
A simple example of sensing
Time = t1
Absorption
+
d Reflection

echo
t2
Sound
travelled (2d)
distance
A simple example of sensing
Time = t1
Absorption
+
d Reflection

echo
t2
Sound
d=c(t2-t1)/2 travelled (2d)
distance
A simple example of sensing
Time = t1
Absorption
+
d Reflection

echo
t2
Sound
d=c(t2-t1)/2 travelled (2d)
distance
Any problems?
A simple example of sensing
• Echolocation

Contact Tracing
• Thank you!

You might also like