Lecture03 Signals
Lecture03 Signals
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]
• 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
𝚹
2𝜋
𝑥(t) = 𝐴sin(𝜃(𝑡)) = 𝐴 sin 2𝜋𝑓𝑡 = 𝐴sin( 𝑡)
𝑇
Waves in time and space
Waves in time and space
𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑓𝑟𝑜𝑚 𝑡ℎ𝑒 𝑠𝑜𝑢𝑟𝑐𝑒 (𝑑)
𝑠𝑝𝑎𝑐𝑒
Amplitude here
A sin(𝜃)
A 𝑐𝑜𝑠(𝜃)
Complex Signals
2𝜋 𝑎𝑛𝑔𝑙𝑒𝑠 𝑝𝑒𝑟 𝑐𝑦𝑐𝑙𝑒
𝑓 𝑐𝑦𝑐𝑙𝑒𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑
A
𝚹
A
𝚹
cos(𝜃)
time = t second
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
𝑒𝑗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)
Time (sec)
Time (sec)
Time (sec)
Time (sec)
Time (sec)
Time (sec)
Time (sec)
Time (sec)
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!