Professional Documents
Culture Documents
Analog & Digital Signals
Analog & Digital Signals
Analog
Digital
Discrete function Vk of
discrete sampling variable tk,
with k = integer: Vk = V(tk).
0.3
0.3
0.2
0.2
Voltage [V]
Voltage [V]
Continuous function V of
continuous variable t (time,
space etc) : V(t).
0.1
0
-0.1
-0.2
0.1
0
ts ts
-0.1
-0.2
4
6
time [ms]
10
6
8
2
4
sampling time, tk [ms]
10
Limitations
Obsolescence (analog
electronics has it, too!).
More flexible.
Reproducibility.
ms
Antialiasing
ms
A
(ex: economics);
- D/A + filter
(ex: digital output wanted).
A
k
V
Digital
Processing
D/A
Filter
Reconstruction
ms
ANALOG
DOMAIN
ms
A/D
DIGITAL
DOMAIN
- Filter + A/D
Filter
ANALOG
DOMAIN
Antialiasing
Filter
Sampling rate.
A/D
Digital
Processing
DIGITAL OUTPUT
Digital format.
What to use for processing?
See slide DSPing aim & tools
2
3
Sampling
wheels go clockwise.
Train accelerates
wheels go counter-clockwise.
Why?
Frequency misidentification due to low sampling frequency.
discrete.
Sampling - 2
1.2
__ s(t) = sin(2f t)
0
0.8
0.6
s(t) @ fS
0.4
0.2
f0 = 1 Hz, fS = 3 Hz
tt
-0.2
-0.4
-0.6
__ s (t) = sin(8f t)
0
1
-0.8
-1
__ s (t) = sin(14f t)
0
2
-1.2
Example
s(t) = 3 cos(50 t) + 10 sin(300 t) cos(100 t)
F1
F2
Condition on fS?
F3
fS > 300 Hz
fMAX
Slides adapted from ME Angoletta, CERN
Bandwidth:
Bandwidth indicates rate of change of a signal.
High bandwidth
signal changes fast.
(a)
-B
(b)
Discrete spectrum
No aliasing
frequency
repetition.
fS > 2 B
-B
B fS/2
Discrete spectrum
Aliasing & corruption
(c)
fS/2
no aliasing.
(c) fS
f
2B
aliasing !
Antialiasing filter
1
(a)
Signal of interest
Out of band
noise
Out of band
noise
-B
(b)
-B
B fS/2
Passband
frequency
-B
1113
2
Quantization step q =
1
0
-4
-3
-2
-1
Ex: VFSR = 1V , N = 12
-1
V FSR
2N
q = 244.1 V
010
-2
001
-3
Voltage ( = q)
000
-4
LSB
VFSR
Scale factor (= 1 / 2N )
Percentage (= 100 / 2N )
q/2
0.5
-4
-3
-2
-1
-0.5
-q/2
Quantisation error
-1
2
0.3
Quantisation Error eq in
[-0.5 q, +0.5 q].
Voltage [V]
0.2
0.1
0
0
-0.1
-0.2
time [ms]
10
time, t
analysis
General Transform as
problem-solving tool
frequency, f
F
S(f) = F[s(t)]
s(t)
s(t), S(f) :
Transform Pair
synthesis
Slides adapted from ME Angoletta, CERN
Frequency spectrum
2.5
2
1.5
1
Periodic
0.5
0
0
time, t
Continuous
2.5
(period T)
Aperiodic
2
1.5
1
FS
Discrete
FT
Continuous
T
1
c k = s(t) e j k t dt
T
0
j2 f t
+
S(f) = s(t) e
dt
0.5
0
0
time, t
10
12
2.5
2
Periodic
1.5
1
0.5
(period T)
0
0
time, tk
Discrete
2.5
Aperiodic
2
1.5
1
0.5
0
0
time, tk
6
10
12
2kn
N
1
j
1
~
N
ck = s[n] e
N
n =0
DFS** Discrete
DTFT
Continuous
DFT** Discrete
S(f) =
s[n] e j 2 f n
n=
j
1 N1
~
ck = s[n] e
N
n =0
**
2kn
N
A little history
Astronomic predictions by Babylonians/Egyptians likely via trigonometric sums.
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).
A little history -2
19th / 20th century:
century two paths for Fourier analysis - Continuous & Discrete.
CONTINUOUS
Other FT variants born from varied needs (ex.: Short Time FT - speech analysis).
1965 - IBMs Cooley & Tukey rediscover FFT algorithm (An algorithm for
the machine calculation of complex Fourier series).
Other DFT variants for different applications (ex.: Warped DFT - filter design &
signal compression).
s
si
y
T
al
n
1
(signal average over a period, i.e. DC term &
a a = s(t)dt
0
zero-frequency component.)
T
0
T
2
ak = s(t) cos(k t) dt
Note: {cos(kt), sin(kt) }k
T
0
form orthogonal base of
T
function space.
2
- bk = s(t) sin(k t) dt
T
0
* see next slide
FS convergence
Dirichlet conditions
(a) s(t) piecewise-continuous;
(b) s(t) piecewise-monotonic;
In any period:
s(t) dt <
Example:
square wave
Rate of convergence
(a)
(b)
(c)
FS analysis - 1
T = 2 = 1
2
a0 =
dt + ( 1)dt = 0
2
0
2
ak = cos kt dt cos kt dt = 0
(zero average)
(odd function)
2
1
{ 1 cos k } =
- bk = sin kt dt sin kt dt = ... =
k
4
k , k odd
=
0 , k even
4
4
4
sw(t) = sin t +
sin 3 t +
sin 5 t + ...
3
5
1.5
1
0.5
0
-0.5
10
-1
-1.5
Even :
s(-x) = s(x)
x
s(x)
Odd :
s(-x) = -s(x)
FS synthesis
Square wave reconstruction
from spectral terms
1.5
7
3
15
911
sw1
(t)
sin(kt)
(t)===
sin(kt)
sin(kt)
]]]]
[[--[b-bkbkksin(kt)
7
3
5
11
9(t)
kkk==1=11
1
0.5
0
-0.5
-1
-1.5
0
10
Gibbs phenomenon
1.5
sw 79 (t) =
79
[- bk sin(kt)]
k =1
Overshoot exist @
each discontinuity
0.5
0
-0.5
-1
-1.5
0
10
FS time shifting
4
k , k odd, k = 1, 5, 9...
ak = 4
, k odd, k = 3, 7, 11...
k
0
, k even.
- bk = 0
(even function)
(zero average)
1
0.5
0
-0.5
10
-1
-1.5
rk
4/
4/3
f1
3f1
5f1
7f1
f1
3f1
5f1
7f1
ph
as
e
a 0= 0
1.5
am
pl
it
ud
e
FS of even function:
/2-advanced square-wave
Complex FS
Eulers notation:
e-jt = (ejt)* = cos(t) - jsin(t)
phasor
e jt + e jt
cos(t) =
2
e jt e jt
sin(t) =
2 j
s
T
si
1
y
l
a c k = s(t) e - j k t dt
n
a
T
is
s
he
t
n
sy s(t) =
jk t
c
e
k
k =
z=re
Note:
Note c-k = (ck)*
Link to FS real coeffs.
c 0 = a0
ck =
1
1
(ak + j bk ) = (a k j b k )
2
2
r = a2 + b2
= arctan(b/a)
FS properties
Time
Homogeneity
as(t)
Additivity
s(t) + u(t)
Linearity
as(t) + bu(t)
Time reversal
Multiplication *
Convolution *
Time shifting
Frequency
aS(k)
S(k)+U(k)
aS(k)+bU(k)
s(-t)
S(-k)
s(t)u(t)
T
1
s(t t ) u( t ) dt
T
0
s(t t )
Frequency shifting e
+j
2 m t
T s(t)
S(k m)U(m)
m =
S(k)U(k)
e
2 k t
T
S(k)
S(k - m)
FS - oddities
Orthonormal base
Fourier components {uk} form orthonormal base of signal space:
T
*
uk = (1/T) exp(jkt) (|k| = 0,1 2, +) Def.: Internal product : uk um = uk um
dt
uk um = k,m (1 if k = m, 0 otherwise).
Then ck = (1/T) s(t) uk i.e. (1/T) times projection of signal s(t) on component uk
FS - power
Average power W :
1
W =
T
Parsevals Theorem
W=
ck
k =
1
= a0 2 +
2
FS convergence ~1/k
Example
Pulse train, duty cycle = 2 / T
s(t)
2
T
bk = 0
a0 = sMAX
ak = 2sMAX sync(k )
ak 2 + bk 2
k =1
2
1
10
-1
10
-2
10
-3
Wk/W0
Wk = 2 W0 sync2(k )
kf
0
50
W0 = ( sMAX)2
sync(u) = sin( u)/( u)
100
150
200
W = W0 1+ k
k =1 W0
FS of main waveforms
1
l
j
a
1
N
an ~
ck =
s[n] e
n =0
~
~
Note: ck+N = ck same period N
i.e. time periodicity propagates to frequencies!
s
si
e
2 k n
th
N
1
j
n
~
sy s[n] =
ck e N
k =0
1
j
1
N
e
= k,m
N
n =0
Kroneckers delta
DFS analysis
DFS of periodic discrete
1-Volt square-wave
s[n]: period N, duty factor L/N
0 1 2 3 4 5 6 7 8 9 10
0
L
N
am
pl
it
ud
e
-5
ck
0.24
0.24
0.2
0.6
0.6
0.6
0.6
0.24
0.24
0 1 2 3 4 5 6 7 8 9 10
ph
as
e
,
k = 0, + N, 2N,...
~
ck =
k (L 1)
kL
j
sin
N
N
e
, otherwise
N
k
sin
s[n]
0.4
0.2
0.4
0.2
4 5 6 7 8 9 10
-0.2
-0.4
n
-0.2
-0.4
DFS properties
Time
Homogeneity
as[n]
Additivity
s[n] + u[n]
Linearity
as[n] + bu[n]
Multiplication *
s[n] u[n]
N1
Frequency
aS(k)
S(k)+U(k)
aS(k)+bU(k)
1 N1
S(h)U(k - h)
N h=0
s[m] u[n m]
Convolution *
S(k)U(k)
m =0
Time shifting
s[n - m]
Frequency shifting
+j
2 h t
T s[n]
2 k m
T
S(k)
S(k - h)
Leakage amount depends on chosen window & on how signal fits into the window.
(1) Resolution: capability to distinguish different tones. Inversely proportional to mainlobe width. Wish: as high as possible.
(2)
(1)
(3)
Rectangular window
Windowed
-3 dB Mainlobe width
-6 dB Mainlobe width
[bins]
1.21
Max sidelobe
level
Sidelobe roll-off
[dB/decade]
Rectangular
[bins]
0.89
Hamming
1.3
1.81
- 41.9
20
Hanning
1.44
- 31.6
60
Blackman
1.68
2.35
-58
60
Observed signal
[dB]
-13.2
20
NB: Strong DC component can shadow nearby small signals. Remove it!
Solution:
sliding (overlapping) DFTs.
Attenuated inputs get next
windows full gain & leakage
reduced.
DFT #2
DFT #3
Drawback: increased
total processing time.
DFT AVERAGING
Hanning window
1.968
0.977
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]
DIGITAL LTI
SYSTEM
[n]
y[n]
h[n]
x[n]
h[n]
DIGITAL
LTI
SYSTEM
h[n]
0
x[n m] h[m]
m =0
X(f)
H(f)
Estimating H(f)
G xx (f) = X(f) X* (f)
G yx (f) = Y(f) X* (f)
(hints)
Transfer Function
(ex: beam !)
It is a check on
H(f) validity!
Slides adapted from ME Angoletta, CERN