Analog & Digital Signals1
Analog & Digital Signals1
Analog Digital
Continuous function V of Discrete function Vk of
continuous variable t (time, discrete sampling variable tk,
space etc) : V(t). with k = integer: Vk = V(tk).
0.3 0.3
0.2 0.2
Voltage [V]
Voltage [V]
0.1 0.1
0 0
-0.1 -0.1 ts ts
-0.2 -0.2
0 2 4 6 8 10 0 2 4 6 8 10
time [ms] sampling time, tk [ms]
Uniform (periodic) sampling.
Sampling frequency fS = 1/ tS
Advantages Limitations
DOMAIN
ANALOG
General scheme ms Filter
V Antialiasing
DOMAIN
DIGITAL
(ex: economics);
k
- D/A + filter Digital
A
Processing
(ex: digital output wanted).
k
V
D/A
DOMAIN
ANALOG
ms
V Filter
Reconstruction
ms
Antialiasing
Filter • Pass / stop bands.
1
• Sampling rate.
A/D
• No. of bits. Parameters. 2
Digital
Processing • Digital format. 3
What to use for processing?
See slide “DSPing aim & tools”
DIGITAL OUTPUT
Why?
Frequency misidentification due to low sampling frequency.
1
__ s(t) = sin(2πf t)
0.8 0
0.6
0.4
s(t) @ fS
0.2
0
f0 = 1 Hz, fS = 3 Hz
-0.2 tt
-0.4
-0.6
-0.8
__ s (t) = sin(8πf t)
1 0
-1
-1.2
__ s (t) = sin(14πf t)
2 0
Naming gets
confusing ! Nyquist frequency (rate) fN = 2 fMAX or fMAX or fS,MIN or fS,MIN/2
Example
s(t) = 3 ⋅ cos(50 π t) + 10 ⋅ sin(300 π t) − cos(100π t) Condition on fS?
F1 F2 F3
fMAX
• Bandwidth:
Bandwidth indicates rate of change of a signal.
High bandwidth signal changes fast.
-B 0 B f
Discrete spectrum
(c) Aliasing & corruption
(c) fS 2B aliasing !
-B 0 B f
(c) Antialiasing filter
(b) Passband: depends on bandwidth of
interest.
V FSR
1 Quantization step q =
0 2N
-4 -3 -2 -1 0 1 2 3 4
-1 V Ex: VFSR = 1V , N = 12 q = 244.1 µV
010
-2
001
-3 Voltage ( = q)
000
-4
VFSR LSB Scale factor (= 1 / 2N )
1
0.5
q/2
Percentage (= 100 / 2N )
0
-4 -3 -2 -1 0 1 2 3 4
Quantisation error
-0.5
-q/2
-1
0.1
-0.2
• Higher resolution means
time [ms]
lower eq.
General Transform as
problem-solving tool
analysis
time, t frequency, f
F
s(t), S(f) :
s(t) S(f) = F[s(t)] Transform Pair
synthesis
1.5
1
T
1
Periodic c k = ⋅ ∫ s(t) ⋅ e − j k ω t dt
0.5
FS Discrete
0
0 1 2 3 4 5 6 7 8
time, t T
(period T) 0
2.5
Continuous − j2 π f t
+∞
FT S(f) = ∫ s(t) ⋅ e
2
1.5
1
Aperiodic Continuous −∞
dt
0.5
0
0 2 4 6 8 10 12
time, t
N −1 2πkn
−
DFS** Discrete
j
2.5
~ 1
ck = ∑ s[n] ⋅ e N
2
Periodic
1.5
1
N
0.5
n =0
0
0 1 2 3
time, tk
4 5 6 7 8
(period T)
+∞
Discrete S(f) = ∑ s[n] ⋅ e− j 2 π f n
2.5 DTFT Continuous
n= −∞
Aperiodic
2
2πkn
1.5
0.5
0
~
ck = ∑ s[n] ⋅ e N
time, tk
0 2 4 6 8 10 12
N
n =0
¾ 1669:
1669 Newton stumbles upon light spectra (specter = ghost) but fails to
recognise “frequency” concept (corpuscular theory of light, & no waves).
¾ 18th century:
century two outstanding problems
→ celestial bodies orbits: Lagrange, Euler & Clairaut approximate observation data
with linear combination of periodic functions; Clairaut,1754(!) first DFT formula.
→ vibrating strings: Euler describes vibrating string motion by sinusoids (wave
equation).
¾ 1807:
1807 Fourier presents his work on heat conduction ⇒ Fourier analysis born.
→ Diffusion equation ⇔ series (infinite) of sines & cosines. Strong criticism by peers
blocks publication. Work published, 1822 (“Theorie Analytique de la chaleur”).
CONTINUOUS
→ Fourier extends the analysis to arbitrary function (Fourier Transform).
→ Dirichlet, Poisson, Riemann, Lebesgue address FS convergence.
→ Other FT variants born from varied needs (ex.: Short Time FT - speech analysis).
T Rate of convergence
Example:
if s(t) discontinuous then
square wave
|ak|<M/k for large k (M>0)
s(t)
⎧π 2π ⎫
1 ⎪ ⎪
- bk = ⋅ ⎨ ∫ sin kt dt − ∫ sin kt dt ⎬ = ... =
2
⋅ { 1− cos kπ } = * Even & Odd functions
π ⎪ ⎪⎭ k ⋅ π
⎩0 π s(x)
⎧ 4 Even :
⎪ k ⋅ π , k odd
⎪ s(-x) = s(x)
= ⎨ x
⎪ 0 , k even
⎪
⎩
s(x)
Odd :
4 4 4
sw(t) = ⋅ sin t + ⋅ sin 3 ⋅ t + ⋅ sin 5 ⋅ t + ... x
π 3⋅π 5⋅π s(-x) = -s(x)
sw1 (t)===∑
(t)
9(t)
7
3
5
11 ∑∑[[--[b-bkbkk⋅⋅sin(kt)
⋅sin(kt)
sin(kt) ]]]]
sin(kt)
0
kkk==1=11
-0.5
-1
-1.5
0 2 4 6 8 10
t
Overshoot exist @ 1
each discontinuity
0
79
sw 79 (t) = ∑ [- bk ⋅ sin(kt)] -0.5
k =1
-1
-1.5
0 2 4 6 8 10
t
0.5
0
a 0= 0 (zero average) 0 2 4 6 8 10
t
-0.5
⎧ 4 -1
⎪ k ⋅ π , k odd, k = 1, 5, 9...
⎪ -1.5
⎪
ak = ⎨ − 4 , k odd, k = 3, 7, 11...
⎪ k⋅π rk
⎪ 4/π
⎪
e
⎩ 0 , k even.
ud
it
4/3π
pl
- bk = 0 (even function) am
θk f1 3f1 5f1 7f1 f
π
Note: amplitudes unchanged BUT
phases advance by k⋅π/2.
e
as
ph
Then ck = (1/√T) s(t) ⊗ uk i.e. (1/√T) times projection of signal s(t) on component uk
T 10
-2
10
-3 kf
t 0 50 100 150 200
bk = 0 a0 = δ sMAX W0 = (δ sMAX)2 ⎧⎪ ∞ W ⎫
⎪
W = W0 ⋅ ⎨1+ ∑ k ⎬
ak = 2δsMAX sync(k δ) sync(u) = sin(π u)/(π u) ⎪⎩ k =1 W0 ⎪⎭
s
esi
th N−1 2π k n
n j N consecutive samples of s[n]
sy s[n] = ~
∑
ck ⋅ e N completely describe s in time
k =0 or frequency domains.
Synthesis: finite sum ⇐ band-limited s[n]
1-Volt square-wave
e
ud
1 1
⎧ L ~
it
⎪ , k = 0, + N, ± 2N,... 0.6 0.6 ck 0.6 0.6
pl
N
⎪
am
⎪ 0.24 0.24 0.24 0.24
⎪ 0.2
~
ck = ⎨ π k (L −1) ⎛ π kL ⎞
⎪ −j sin ⎜ ⎟
⎪e N ⎝ N ⎠ 0 1 2 3 4 5 6 7 8 9 10 k
⎪ ⋅ , otherwise
N ⎛π k⎞
⎪ sin ⎜ ⎟
⎝ N ⎠ θk
e
⎩ 0.4π
as
0.4π
ph
0.2π 0.2π
-0.4π -0.4π
1 N−1
Multiplication * s[n] ·u[n] ⋅ ∑ S(h)U(k - h)
N h=0
N−1
Convolution * ∑ s[m] ⋅ u[n − m] S(k)·U(k)
m =0
2π k ⋅m
Time shifting s[n - m] −j
T
e ⋅ S(k)
2π h t
Frequency shifting +j S(k - h)
e T ⋅ s[n]
Sampled sequence
Non
windowed
Windowed
NB: Strong DC component can shadow nearby small signals. Remove it!
Drawback: increased
DFT AVERAGING
total processing time.
1.967
1.966 0.976
1.965
1.964
0.975
1.963
1.962
198 199 200 201 202 203 0.974
199 200 201 202 203 204
∞
x[n] h[n] y[n] = x[n] ∗ h[n] = ∑ x[n − m] ⋅ h[m] y[n] predicted from { x[n], h[t] }
m =0
It is a check on
H(f) validity!