Professional Documents
Culture Documents
DSP Slides
DSP Slides
Markus Kuhn
Computer Laboratory
http://www.cl.cam.ac.uk/Teaching/2003/DigSigProc/
Textbooks
A.V. Oppenheim, R.W. Schafer: Discrete-time signal processing. 2nd ed., Prentice-Hall, 1999. (47)
J. Stein: Digital signal processing a computer science perspective. Wiley, 2000. (74)
K. Steiglitz: A digital signal processing primer with applications to digital audio and computer music. Addison-Wesley,
1996. (40)
geophysics
astronomy
experimental physics
communication systems
aviation
music
sensor-data evaluation
modulation/demodulation, channel
equalization, echo cancellation
medical diagnostics
consumer electronics
security
engineering
ECG,
EEG,
MEG,
computer tomography,
resonance imaging
audiology,
magnetic-
discrete
system T
. . . , y2 , y1 , y0 , y1 , . . .
4
Properties of sequences
A sequence {xn } is
absolutely summable
square summable
n=
n=
|xn | <
|xn |2 <
n=
|xn |2
its energy. This terminology reflects that if U is a voltage supplied to a load resistor
R, then P = U I = U 2 /R is the power consumed.
So even where we drop physical units (e.g., volts) for simplicity in sequence calculations, it is still customary to refer to the squared values of a sequence as power
and to its sum or integral over time as energy.
5
exists.
Special sequences
Unit-step sequence:
un =
0, n < 0
1, n 0
Impulse sequence:
n
1, n = 0
=
0, n 6= 0
= un un1
6
{ynd } = T {xnd }.
Examples:
The accumulator system
yn =
n
X
xk
k=
is a causal, linear, time-invariant system with memory, as are the backward difference system
yn = xn xn1 ,
the M-point moving average system
1
yn =
M
M
1
X
k=0
xnk
xnM +1 + + xn1 + xn
=
M
X
k=0
(1 )k xnk .
8
yn = log2 xn ,
1
=
(xn1 + xn+1 )
2
9
X
sin(k)
xn+k
=
[0.5 + 0.5 cos(k/10)]
k
k=9
9
yn = b0 xn
N
X
k=1
ak ynk
xn
Addition:
Multiplication
by constant:
Delay:
xn + xn
xn
xn
yn
a1
a2
b0
axn
xn1
a3
z 1
yn1
z 1
yn2
z 1
yn3
or
xn
yn =
M
X
m=0
bm xnm
xn1
b0
b1
xn2
xn3
b2
b3
yn
xn
z 1
N
X
k=0
ak ynk =
M
X
m=0
bm xnm
b1
xn1
z 1
b2
xn2
z 1
xn3
b3
a1
0
a1
a2
a3
yn
z 1
yn1
z 1
yn2
z 1
yn3
Convolution
All linear time-invariant (LTI) systems can be represented in the form
yn =
k=
ak xnk
n Z : rn =
k=
pk qnk .
Convolution examples
A
AB
AC
CA
AE
DE
AF
13
Properties of convolution
For arbitrary sequences {pn }, {qn }, {rn } and scalars a, b:
Convolution is associative
Convolution is commutative
Convolution is linear
14
k=
xk {nk }
k=
()
k=
xk {nk }
()
k=
xk {nk } T {n } =
{xn } T {n }
q.e.d.
xk T {nk }
k=
xk {nk }
T {n }
15
b0
b1
xn1
z 1
b2
xn2
z 1
xn3
b3
a1
0
a1
a2
a3
yn
xn
z 1
a1
yn1
z 1
yn2
z 1
yn3
a1
0
=
a2
a3
b0
z 1
z 1
z 1
yn
b1
b2
b3
A1 sin 1 + A2 sin 2
tan =
A1 cos 1 + A2 cos 2
Also
A sin(t + ) =
a sin(t) + b cos(t)
A2
A2 sin(2 )
A1
2
A2 cos(2 )
A1 sin(1 )
1
A1 cos(1 )
18
1 6= 2
1 2 = (2k + 1) (k Z)
19
Complex phasors
Amplitude and phase are two distinct characteristics of a sine function
that are inconvenient to keep separate notationally.
Complex functions (and discrete sequences) of the form
A e jt+ = A [cos(t + ) + j sin(t + )]
(where j2 = 1) are able to represent both amplitude and phase in
one single algebraic object.
Thanks to complex multiplication, we can also incorporate in one single
factor both a multiplicative change of amplitude and an additive change
of phase of such a function. This makes discrete sequences of the form
xn = e jn
eigensequences with respect to an LTI system T , because for each ,
there is a complex number (eigenvalue) H() such that
T {xn } = H() {xn }
20
F 1 {G()}(t) =
g(t)
G() e jt d
F 1 {H(f )}(t) =
h(t)
H(f ) e2 jf t df
21
h(t)
1
=
2
h(t) e jt dt
H(e j ) e jt d
hn
n=
1
=
2
hn e jn
H(e j ) e jn d
Convolution theorem
Continuous form:
F{(f g)(t)} = F{f (t)} F{g(t)}
F{f (t) g(t)} = F{f (t)} F{g(t)}
Discrete form:
{xn } {yn } = {zn }
X(e j ) Y (e j ) = Z(e j )
Convolution in the time domain is equivalent to (complex) scalar multiplication in the frequency domain, and convolution in the frequency
domain corresponds to scalar multiplication in the time domain.
23
n n2 x2
(x) = lim e
n
The delta function is mathematically speaking not a function, but a distribution, that is an
expression that is only defined when integrated.
24
e2 jf t df = (t)
1
2
e jt d = (t)
Fourier transform:
F{(t)}() =
F 1 {1}(t) =
1
2
(t) e jt dt = e0 = 1
1 e jt d
= (t)
25
1 2 jf t
1 2 jf t
e
sin(2f t) =
e
2j
2j
f
f
n=
(t ts n)
n=
(t ts n)
Z X
X
1
n
2 jf t
(t ts n) e
dt =
f
.
ts n=
ts
n=
s(t)
2ts ts
S(f )
ts
2ts
2fs
fs
fs
2fs f
28
29
X(f )
fs
fs
)
X(f
)
X(f
2fs fs
fs
fs
2fs
2fs fs
2fs
30
Exercise 4
Generate a one second long Gaussian noise sequence {rn } (using
MATLAB function randn) with a sampling rate of 300 Hz.
Use the fir1(50, 45/150) function to design a finite impulse response low-pass filter with a cut-off frequency of 45 Hz. Use the
filtfilt function in order to apply that filter to the generated noise
signal, resulting in the filtered noise signal {xn }.
Then sample {xn } at 100 Hz by setting all but every third sample
value to zero, resulting in sequence {yn }.
Generate another lowpass filter with a cut-off frequency of 50 Hz and
apply it to {yn }, in order to interpolate the reconstructed filtered
noise signal {zn }. Multiply the result by three, to compensate the
energy lost during sampling.
Plot {xn }, {yn }, and {zn }. Finally compare {xn } and {zn }.
Why should the first filter have a lower cut-off frequency than the second?
31
32
Reconstruction of a continuous
band-limited waveform
The ideal anti-aliasing filter for eliminating any frequency content above
fs /2 before sampling with a frequency of fs has the Fourier transform
1 if f2s < f f2s
H(f ) =
.
0 otherwise
This leads, after an inverse Fourier transform, to the impulse response
sin tfs
h(t) =
.
tfs
The original band-limited signal can be reconstructed by convolving
this with the sampled signal x(t), which eliminates the periodicity of
the frequency domain introduced by the sampling process:
x(t) = h(t) x(t)
Note that sampling h(t) gives the impulse function: h(t) s(t) = (t).
33
0 0.5
t fs
1.5
2.5
3
34
Bandpass sampling
Sampled signals can be reconstructed as long as their doublesided bandwidth (counting both the positive and negative frequency range) does
not exceed the sampling frequency. The anti-aliasing filter used can
also be a band-pass filter instead of a low-pass filter.
A suitably bandlimited signal x(t) with center frequency fc sampled at
frequency fs can be reconstructed by convolution with
sin tfs
cos(2tfc ).
h(t) =
tfs
X(f )
fc
)
X(f
anti-aliasing filter
fc
2fs
fs
reconstruction filter
fs
2fs
f
35
convolved with an impulse comb p(t). This corresponds in the frequency domain to the multiplication of the spectrum
of the single period with a comb of impulses spaced fp apart.
x(t)
x(t)
p(t)
=
...
...
1/fp 0 1/fp
P (f )
=
f
...
1/fp 0 1/fp
)
X(f
X(f )
fp 0 fp
...
...
...
fp 0 fp
f
36
X(f )
...
... ...
n/fs
fs1 0 fs1
n/fs
fs
...
fs /n 0 fs /n
fs
f
37
and
y(t) Y (f )
are pairs of functions that are mapped onto each other by the Fourier
transform, then so are the following pairs.
Linearity:
ax(t) + by(t) aX(f ) + bY (f )
Time scaling:
x(at)
1
f
X
|a|
a
t
1
x
|a|
a
X(af )
Frequency scaling:
38
Time shifting:
x(t t) X(f ) e2 jf t
Frequency shifting:
x(t) e2 jf t
X(f f )
|X(f )|2 df
39
is
is
is
is
is
is
is
is
real
imaginary
even
odd
X(f ) = [X(f )]
X(f ) = [X(f )]
X(f ) is even
X(f ) is odd
X(f ) is real and even
X(f ) is imaginary and odd
X(f ) is imaginary and even
X(f ) is real and odd
40
n1
X
i=0
xi e
2 j ik
n
xk =
n1
X
i=0
Xi e
2 j ik
n
F =
1
1
1
1
..
.
1
2 j n
2
2 j n
3
2 j n
e
2
e2 j n
3
e2 j n
..
.
e2 j
n1
n
e
4
e2 j n
6
e2 j n
..
.
2(n1)
n
e2 j
x0
x1
x2
..
.
..
.
e
6
e2 j n
9
e2 j n
..
.
e2 j
3(n1)
n
X0
X1
X2
..
.
Xn1
xn1
2 j n1
n
e
2(n1)
2 j n
e
3(n1)
2 j n
e
..
.
e2 j
(n1)(n1)
n
41
n
1
2
x2i e
ik
2 j n/2
k
2 j n
+ e
i=0
n
1
F n2 {x2i }i=0
k
=
n
1
F n2 {x2i }i=0
k n
2
n
1
2
X
i=0
x2i+1 e
k
2 j n
+ e
k
2 j n
+ e
ik
2 j n/2
n
1
2
,
k<
F n2 {x2i+1 }i=0
k
n
1
2
F n2 {x2i+1 }i=0
, k
n
k 2
n
2
n
2
The DFT over n-element vectors can be reduced to two DFTs over
n/2-element vectors plus n multiplications and n additions, leading
to log2 n rounds and n log2 n additions and multiplications overall,
compared to n2 for the equivalent matrix multiplication.
A high-performance FFT implementation in C with many processor-specific optimizations and
support for non-power-of-2 sizes is available at http://www.fftw.org/.
42
(xi ) i : Xni =
Xi
i : xi = j (xi ) i : Xni = Xi
These two symmetries, combined with the linearity of the DFT, allows us
to calculate two real-valued n-point DFTs
n1
=
F
{x
{Xi }n1
n
i }i=0
i=0
n1
=
F
{x
{Xi }n1
n
i }i=0
i=0
)
Xi = (Xi + Xni
2
Xi
= (Xi Xni
)
2
To optimize the calculation of a single real-valued FFT, use this trick to calculate the two half-size
real-value FFTs that occur in the first round.
43
with
= a(c + d)
= d(a + b)
= c(b a)
44
(2 + 1v)
2 + 4v + 6v 2
+
1v + 2v 2
+ 3v 3
= 2 + 5v + 8v 2
+ 3v 3
Convolution:
conv([1 2 3], [2 1]) == [2 5 8 3]
We can represent sequences {xn } as polynomials:
X(v) =
xn v n
n=
45
H(v) X(v) =
=
k=
hn v n
n=
X
X
n= k=
hk xnk
xn v n
n=
hk xnk v n
xn e jn
n=
46
an v n
n=0
1 + av + a2 v 2 +
1 av 1
1 av
av
av a2 v 2
a2 v 2
a2 v 2 a3 v 3
Rational functions (quotients of two polynomials) can provide a convenient closed-form representations for infinitely-long exponential sequences, as they are produced by IIR filters.
47
The z-transform
The z-transform of a sequence {xn } is defined as:
X(z) =
xn z n
n=
xn e jn
n=
48
ak ynk =
M
X
m=0
bm xnm
xn
z 1
b0
b1
xn1
z 1
z 1
bm
a1
0
a1
ak
yn
z 1
yn1
z 1
z 1
ynk
b0 + b1 z 1 + b2 z 2 + + bm z m
H(z) =
a0 + a1 z 1 + a2 z 2 + + ak z k
which can also be written as
Pm
ml
n
b
z
z
l
H(z) = m Pl=0
n
nl
z
l=0 al z
H(z) will have m zeros and n poles at non-zero location in the z plane,
plus n m zeros (if n > m) or m n poles (if m > n) at z = 0.
49
where the cl are the non-zero zeros and the dl the non-zero poles of
H(z). Except for a constant factor, H(z) is entirely characterized by
the position of these zeros and poles.
As with the Fourier transform, convolution in the time domain corresponds to complex multiplication in the z-domain:
{xn } X(z), {yn } Y (z) {xn } {yn } X(z) Y (z)
Delaying a sequence by one corresponds in the z-domain to multiplication with z 1 :
{xnn } X(z) z n
50
0.5
Amplitude
Imaginary Part
0
0.5
1
1
0
Real Part
10
20
n (samples)
30
10
20
n (samples)
30
1
0.5
Amplitude
Imaginary Part
0.5
0
0.5
1
1
0
Real Part
0.5
51
0.5
Amplitude
Imaginary Part
0
0.5
1
0
Real Part
20
0.5
15
Amplitude
Imaginary Part
0.5
0
0.5
1
1
0
Real Part
10
20
n (samples)
30
10
20
n (samples)
30
10
5
0
52
0.5
Amplitude
Imaginary Part
0
0.5
1
0
Real Part
0
1
0.5
Amplitude
Imaginary Part
0
0.5
1
1
0
Real Part
10
20
n (samples)
30
10
20
n (samples)
30
0
2
4
53
0.5
0.5
Amplitude
Imaginary Part
0
0.5
1
0
Real Part
0.5
1
0.5
0.5
Amplitude
Imaginary Part
0
0.5
1
1
0
Real Part
10
20
n (samples)
30
10
20
n (samples)
30
0
0.5
1
54
0.8
0.5
0.6
Amplitude
Imaginary Part
0
0.5
1
1
0
Real Part
10
20
n (samples)
30
0
Phase (degrees)
Magnitude (dB)
40
0.2
0
20
0.4
60
0
0.5
1
Normalized Frequency ( rad/sample)
50
100
0
0.5
1
Normalized Frequency ( rad/sample)
55
0.3
0.5
0.2
Amplitude
Imaginary Part
0
0.5
1
1
0
Real Part
10
20
n (samples)
30
0
Phase (degrees)
Magnitude (dB)
40
0
0.1
20
0.1
60
0
0.5
1
Normalized Frequency ( rad/sample)
200
400
600
0
0.5
1
Normalized Frequency ( rad/sample)
56
0.6
0.5
0.4
Amplitude
Imaginary Part
0
0.5
1
1
0
Real Part
60
0
0.5
1
Normalized Frequency ( rad/sample)
10
20
n (samples)
30
0
Phase (degrees)
Magnitude (dB)
40
0
0.2
20
0.2
200
400
600
0
0.5
1
Normalized Frequency ( rad/sample)
57
0.6
0.5
0.4
Amplitude
Imaginary Part
0
0.5
1
1
0
Real Part
60
0
0.5
1
Normalized Frequency ( rad/sample)
10
20
n (samples)
30
100
Phase (degrees)
Magnitude (dB)
40
0
0.2
20
0.2
0
100
200
300
0
0.5
1
Normalized Frequency ( rad/sample)
58
0.6
0.5
0.4
Amplitude
Imaginary Part
0
0.5
1
1
0
Real Part
60
0
0.5
1
Normalized Frequency ( rad/sample)
10
20
n (samples)
30
0
Phase (degrees)
Magnitude (dB)
40
0
0.2
20
0.2
100
200
300
400
0
0.5
1
Normalized Frequency ( rad/sample)
order: 5, cutoff frequency: 0.5 fs /2, pass-band ripple: 3 dB, stop-band ripple: 20 dB
59
The passband is the frequency range where we want to approximate a gain of one.
The stopband is the frequency range where we want to approximate a gain of zero.
The designer can then trade off conflicting goals such as a small transition band, a low order, a low ripple amplitude, or even an absence of
ripples.
Design techniques for making these tradeoffs for analog filters (involving capacitors, resistors, coils) can also be used to design digital IIR
filters:
Butterworth filters
Have no ripples, gain falls monotonically across the pass and transition
p
band. Within the passband, the gain drops slowly down to 1 1/2
(3 dB). Outside the passband, it drops asymptotically by a factor 2N
per octave (N 20 dB/decade).
61
x0
x1
x2
x3
x4
x5
x6
x7
X0
X1
X2
X3
X4
X5
X6
X7
Spectral estimation
Sine wave 4f /32
1
15
0.5
10
0.5
1
10
20
30
Sine wave 4.61f /32
0
10
20
30
Discrete Fourier Transform
1
15
0.5
10
0
0.5
10
20
30
10
20
30
64
35
30
25
20
15
10
5
0
0
16
10
15
20
DFT index
15.5
25
30
15
input freq.
The leakage of energy to other frequency bins not only blurs the estimated spectrum. The peak amplitude also changes significantly as the frequency of a tone
changes from that associates with one output bin to the next, a phenomenon
known as scalloping. In the above graphic, an input sine wave gradually changes
from the frequency of bin 15 to that of bin 16 (only positive frequencies shown).
66
Windowing
Sine wave
1
0.5
200
0
100
0.5
1
0
200
400
0
200
400
Sine wave multiplied with window function Discrete Fourier Transform
80
1
0.5
60
40
0.5
20
200
400
200
400
67
The reason for the leakage and scalloping losses is easy to visualize with the
help of the convolution theorem:
The operation of cutting a sequence with the size of the DFT input vector
out of a longer original signal (the one whose continuous Fourier spectrum
we try to estimate) is equivalent to multiplying this signal with a rectangular
function. This destroys all information and continuity outside the window
that is fed into the DFT.
Multiplication with a rectangular window of length T in the time domain is
equivalent to convolution with sin(f T )/(f T ) in the frequency domain.
The subsequent interpretation of this window as a periodic sequence by
the DFT leads to sampling of this convolution result (sampling meaning
multiplication with a Dirac comb whose impulses are spaced fs /n apart).
Where the window length was an exact multiple of the original signal period, sampling of the sin(f T )/(f T ) leads to a single Dirac pulse, and the
windowing causes no distortion. In all other cases, the effects of the convolution become visible in the frequency domain as leakage and scalloping
losses.
68
0.2
0.4
0.6
0.8
20
0
20
40
Triangular window
Magnitude (dB)
Magnitude (dB)
0
20
40
60
60
20
20
0
20
40
60
0
0.5
1
Normalized Frequency ( rad/sample)
0
0.5
1
Normalized Frequency ( rad/sample)
Hamming window
Magnitude (dB)
0
0.5
1
Normalized Frequency ( rad/sample)
Hanning window
Magnitude (dB)
20
0
20
40
60
0
0.5
1
Normalized Frequency ( rad/sample)
70
wi = 0.54 0.46 cos 2
i
n1
71
Exercise 5 Explain the difference between the DFT, FFT, and FFTW.
Exercise 6 Push-button telephones use a combination of two sine tones
to signal, which button is currently being pressed:
697
770
852
941
Hz
Hz
Hz
Hz
1209 Hz
1
4
7
*
1336 Hz
2
5
8
0
1477 Hz
3
6
9
#
1633 Hz
A
B
C
D
Exercise 7 Draw the direct form II block diagrams of the causal infiniteimpulse response filters described by the following z-transforms and write
down a formula describing their time-domain impulse responses:
1
(a) H(z) =
1 21 z 1
(b) H (z) =
1 4
z
44
14 z 1
1
1 1
1
(c) H (z) = + z 1 + z 2
2 4
2
Exercise 8 (a) Perform the polynomial division of the rational function
given in exercise 7 (a) until you have found the coefficient of z 5 in the
result.
(b) Perform the polynomial division of the rational function given in exercise
7 (b) until you have found the coefficient of z 10 in the result.
(c) Has one of the filters in exercise 7 actually a finite impulse response,
and if so, what is its z-transform?
73
i {0, . . . , 15}.
i {0, . . . , 15}
and the right plot shows the DFT of the zero-padded windowed sequence
si wi , i {0, . . . , 15}
xi =
0,
i {16, . . . , 63}
where wi = 0.54 0.46 cos (2i/15) is the Hamming window.
DFT without zero padding
4
2
10
15
20
40
60
74
Applying the discrete Fourier transform to an n-element long realvalued sequence leads to a spectrum consisting of only n/2+1 discrete
frequencies.
Since the resulting spectrum has already been distorted by multiplying
the (hypothetically longer) signal with a windowing function that limits
its length to n non-zero values and forces the waveform smoothly down
to zero at the window boundaries, appending further zeros outside the
window will not distort the signal further.
The frequency resolution of the DFT is the sampling frequency divided
by the block size of the DFT. Zero padding can therefore be used to
increase the frequency resolution of the DFT.
Note that zero padding does not add any additional information to the
signal. The spectrum has already been low-pass filtered by being
convolved with the spectrum of the windowing function. Zero padding
in the time domain merely samples this spectrum blurred by the windowing step at a higher resolution, thereby making it easier to visually
distinguish spectral lines and locating their peak more precisely.
75
Solutions:
Imaginary Part
0.3
0.5
30
0
0.5
0.1
0
1
1
0.1
0
1
Real Part
20
40
10
20
n (samples)
30
0
Phase (degrees)
0
Magnitude (dB)
0.2
60
0
0.5
1
Normalized Frequency ( rad/sample)
500
1000
1500
0
0.5
1
Normalized Frequency ( rad/sample)
78
=
fh
fl 0 fl
fh
l
fh f
2
fh fl
2
l
fh +f
2
fh +fl
2
f
79
Frequency inversion
In order to turn the spectrum X(f ) of a real-valued signal xi sampled at fs
into an inverted spectrum X (f ) = X(fs /2 f ), we merely have to shift
the periodic spectrum by fs /2:
X (f )
X(f )
=
...
... ...
fs
fs
...
fs
fs
f2s
fs
2
FFT-based convolution
n1
and
{y
}
Calculating the convolution of two finite sequences {xi }m1
i
i=0
i=0
of lengths m and n via
min{m1,i}
zi =
j=max{0,i(n1)}
xj yij ,
0i<m+n1
takes mn multiplications.
Can we apply the FFT and the convolution theorem to calculate the
convolution faster, in just O(m log m + n log n) multiplications?
{zi } = F 1 (F{xi } F{yi })
There is obviously no problem if this condition is fulfilled:
{xi } and {yi } are periodic, with equal period lengths
In this case, the fact that the DFT interprets its input as a single period
of a periodic signal will do exactly what is needed, and the FFT and
inverse FFT can be applied directly as above.
81
F [F(A)F(B)]
F [F(A)F(B)]
The regions originally added as zero padding are, after convolution, aligned
to overlap with the unpadded ends of their respective neighbour blocks.
The overlapping parts of the blocks are then added together.
84
85
Remember that E() is linear, that is E(ax) = aE(x) and E(x + y) = E(x) + E(y). Also,
Var(ax) = a2 Var(x) and, if x and y are independent, Var(x + y) = Var(x) + Var(y).
86
its variance
x2 = E(|xn mx |2 ) = xx (0)
X
xi+k yi .
cxy (k) =
i=
After dividing through the overlapping length of the finite sequences involved, cxy (k) can be
used to estimate from a finite sample of a stationary random sequence the underlying xy (k).
MATLABs xcorr function does that with option unbiased.
If {xn } is similar to {yn }, but lags l elements behind (xn ynl ), then
cxy (l) will be a peak in the crosscorrelation sequence. It is therefore widely
calculated to locate shifted versions of a known sequence in another one.
The crosscorrelation is a close cousin of the convolution, with just the second
input sequence mirrored:
{cxy (n)} = {xn } {yn }
It can therefore be calculated equally easily via the Fourier transform:
Cxy (f ) = X(f ) Y (f )
Swapping the input sequences mirrors the output sequence: cxy (k) = cyx (k)
88
X
xi+k xi .
cxx (k) =
i=
89
X
X
hnk xk
hk xnk =
yn =
k=
k=
X
hk
my = mx
k=
and
yy (k) =
xx (ki)chh (i),
i=
In other words:
{yn } = {hn } {xn }
xx (k) = E(xn+k xn )
where
P
chh (k) =
i= hi+k hi .
{yy (n)} = {chh (n)} {xx (n)}
yy (f ) = |H(f )|2 xx (f )
90
Similarly:
{yn } = {hn } {xn }
White noise
A random sequence {xn } is a white noise signal, if mx = 0 and
xx (k) = x2 k .
k
X
1
yi
i=1
92
1X
1X
1X
yi =
xi +
ni = x + n
y =
k i=1
k i=1
k i=1
The corresponding average power values are
2
2
k
k
1 X
1 X
E(|
x|2 ) = E
x i = E
mx = m2x
k
k
i=1
i=1
93
and
2
E(|
n| ) = Var(
n) = Var
1
k
k
X
i=1
ni
k
X
1 2
1
Var(ni ) = n .
= 2
k i=1
k
95
k=
hk yik =
k=
hk (xik + nik ) = xi + n
i
p
2
2
X
X
E(|
xi |2 ) = E
hk xik = m2x
hk
k=
k=
and
E(|
ni |2 ) = Var(
ni ) =
Var
k=
hk nik
k=
h2k Var(nik ) = n2
P
qP
2
SNRyi /SNRyi = k= hk /
k= hk
h2k
k=
96
Exponential averaging
A particularly easy to implement IIR lowpass filter, with only one delay element,
is the exponential averaging filter
yi = (1 )yi +
yi1 = (1 )
yi
yi
1
k yik ,
z 1
yi1
(0 < 1).
k=0
X
k=0
2k y2ik = n2 (1 )2
X
k=0
1
2 1
= n
)
2
1
1+
r
.
1+
mx mx
=
.
and therefore SNRyi /SNRyi =
yi n
1
n2 (1
2k =
97
DFT averaging
absolute value was taken. This is called coherent averaging and, because
of the linearity of the DFT, identical to first averaging the 1000 windows
and then applying a single DFT and taking its absolute value. The windows
start 64 samples apart. Only periodic waveforms with a period that divides
64 are not averaged away. This periodic averaging step suppresses both the
noise and the second sine wave.
Periodic averaging
If a zero-mean signal {xi } has a periodic component with period p, the
periodic component can be isolated by periodic averaging :
k
X
1
x
i = lim
xi+pn
k 2k + 1
n=k
Periodic averaging
corresponds in the time domain to convolution with a
P
Dirac comb n ipn . In the frequency domain, this means multiplication
with a Dirac comb that eliminates all frequencies but multiples of 1/p.
99