Digital Signal Processing: Markus Kuhn
Digital Signal Processing: Markus Kuhn
→ electrical signal that controls a process → passive networks are highly lin- Uin
Uout
Continuous-time signals: voltage, current, temperature, speed, . . . range and large bandwidths
Uout
→ analog signal-processing cir- √
1/ LC ω (= 2πf) t
Discrete-time signals: daily minimum/maximum temperature, cuits require little or no power
0
2 4
Digital signal processing Objectives
Analog/digital and digital/analog converter, CPU, DSP, ASIC, FPGA. By the end of the course, you should be able to
→ discrete-time processing artifacts (aliasing) → understand and explain limits in human perception that are ex-
ploited by lossy compression techniques
→ can require significantly more power (battery, cooling)
→ understand the basic principles of several widely-used modulation
→ digital clock and switching cause interference and audio-visual coding techniques.
5 7
→ medical diagnostics
steganography, digital watermarking,
biometric identification, surveillance
→ K. Steiglitz: A digital signal processing primer – with appli-
magnetic-resonance and ultrasonic
systems, signals intelligence, elec- cations to digital audio and computer music. Addison-Wesley,
tronic warfare
imaging, computer tomography, 1996. (£67)
ECG, EEG, MEG, AED, audiology
→ engineering → Sanjit K. Mitra: Digital signal processing – a computer-based
→ geophysics control systems, feature extraction approach. McGraw-Hill, 2002. (£38)
seismology, oil exploration for pattern recognition
6 8
Units and decibel Sequences and systems
Communications engineers often use logarithmic units: A discrete sequence {xn }∞
n=−∞ is a sequence of numbers
→ Quantities often vary over many orders of magnitude → difficult . . . , x−2 , x−1 , x0 , x1 , x2 , . . .
to agree on a common SI prefix (nano, micro, milli, kilo, etc.)
where xn denotes the n-th number in the sequence (n ∈ Z). A discrete
→ Quotient of quantities (amplification/attenuation) usually more sequence maps integer numbers onto real (or complex) numbers.
interesting than difference We normally abbreviate {xn }∞ n=−∞ to {xn }, or to {xn }n if the running index is not obvious.
The notation is not well standardized. Some authors write x[n] instead of xn , others x(n).
→ Signal strength usefully expressed as field quantity (voltage,
current, pressure, etc.) or power, but quadratic relationship Where a discrete sequence {xn } samples a continuous function x(t) as
between these two (P = U 2 /R = I 2 R) rather inconvenient xn = x(ts · n) = x(n/fs ),
→ Perception is logarithmic (Weber/Fechner law → slide 175)
we call ts the sampling period and fs = 1/ts the sampling frequency.
Plus: Using magic special-purpose units has its own odd attractions (→ typographers, navigators)
A discrete system T receives as input a sequence {xn } and transforms
Neper (Np) denotes the natural logarithm of the quotient of a field it into an output sequence {yn } = T {xn }:
quantity F and a reference value F0 . (rarely used today)
Bel (B) denotes the base-10 logarithm of the quotient of a power P discrete
. . . , x2 , x1 , x0 , x−1 , . . . . . . , y2 , y1 , y0 , y−1 , . . .
system T
and a reference power P0 . Common prefix: 10 decibel (dB) = 1 bel.
9 11
Where P is some power and P0 a 0 dB reference power, or equally Some simple sequences
where F is a field quantity and F0 the corresponding reference level:
un
P F Unit-step sequence: 1
10 dB · log10 = 20 dB · log10
P0 F0 (
Common reference values are indicated with suffix after “dB”: 0, n < 0
un =
1, n ≥ 0
0 dBW =1W
. . . −3 −2 −1 0 1 2 3 ... n
0 dBm = 1 mW = −30 dBW
0 dBµV = 1 µV
δn
0 dBSPL = 20 µPa (sound pressure level) Impulse sequence:
1
0 dBSL = perception threshold (sensation limit) (
1, n = 0
Remember: δn =
0, n =
6 0
3 dB = 2× power, 6 dB = 2× voltage/pressure/etc.
= un − un−1 . . . −3 −2 −1 0 1 2 3 ... n
10 dB = 10× power, 20 dB = 10× voltage/pressure/etc.
W.H. Martin: Decibel – the new name for the transmission unit. Bell System Technical Journal,
January 1929.
10 12
Sinusoidial sequences Types of discrete systems
A cosine wave, frequency f , phase offset θ: A causal system cannot look into the future:
x(t) = cos(2πf t + θ) yn = f (xn , xn−1 , xn−2 , . . .)
Sampling it at sampling rate fs results in the discrete sequence {xn }: A memory-less system depends only on the current input value:
xn = cos(2πf n/fs + θ) yn = f (xn )
Exercise 1 Use the following MATLAB (or GNU Octave) code to display A delay system shifts a sequence in time:
41 samples (≈ 1/200 s = 5 ms) of a 400 Hz sinusoidial wave sampled at
yn = xn−d
8 kHz:
n=0:40; fs=8000; T is a time-invariant system if for any d
f=400; x=cos(2*pi*f*n/fs); stem(n, x); ylim([-1.1 1.1])
{yn } = T {xn } ⇐⇒ {yn−d } = T {xn−d }.
Try frequencies f of 0, 1000, 2000, 3000, 4000, and 5000 Hz. Also try to
negate these frequencies. Do any of these resulting sequences look to be T is a linear system if for any pair of sequences {xn } and {x′n }
identical, or are they negatives of each other? Also try sin instead of cos.
Finally, try adding θ phase offsets of ±π/4, ±π/2, and ±π. T {a · xn + b · x′n } = a · T {xn } + b · T {x′n }.
13 15
It is causal, linear, time-invariant, with memory. With α = 12 : It is causal, linear, time-invariant, with memory.
x x
y y
0 0
17 19
18 20
Constant-coefficient difference equations Convolution
Of particular practical interest are causal linear time-invariant systems
of the form Another example of a LTI systems is
xn b0 yn ∞
X
N
X yn = ak · xn−k
yn = b0 · xn − ak · yn−k −a1
z −1 k=−∞
k=1 yn−1
where {ak } is a suitably chosen sequence of coefficients.
z −1 This operation over sequences is called convolution and is defined as
−a2
Block diagram representation yn−2
of sequence operations: ∞
X
x′n −a3
z −1 {pn } ∗ {qn } = {rn } ⇐⇒ ∀n ∈ Z : rn = pk · qn−k .
yn−3 k=−∞
xn xn + x′n
Addition:
If {yn } = {an } ∗ {xn } is a representation of an LTI system T , with
Multiplication xn a axn
by constant:
The ak and bm are {yn } = T {xn }, then we call the sequence {an } the impulse response
constant coefficients. of T , because {an } = T {δn }.
xn xn−1
Delay: z −1
21 23
or Convolution examples
xn xn−1 xn−2 xn−3
M z −1 z −1 z −1 A B C D
X
yn = bm · xn−m b0 b1 b2 b3
m=0
yn
z −1 z −1
b1 −a1
N
X M
X xn−1 yn−1
ak · yn−k = bm · xn−m
k=0 m=0 z −1 z −1 C∗A A∗E D∗E A∗F
b2 −a2
xn−2 yn−2
z −1 z −1
b3 −a3
xn−3 yn−3
The MATLAB function filter is an efficient implementation of the last variant.
22 24
Properties of convolution Exercise 2 What type of discrete system (linear/non-linear, time-invariant/
For arbitrary sequences {pn }, {qn }, {rn } and scalars a, b: non-time-invariant, causal/non-causal, causal, memory-less, etc.) is:
Proof: all LTI systems just apply convolution Exercise 4 MATLAB/GNU Octave commands (similar to)
Any sequence {xn } can be decomposed into a weighted sum of shifted x = [ 0 0 0 -4 0 0 0 0 0 0 2 2 2 2 ...
impulse sequences: 2 0 -3 -3 -3 0 0 0 0 0 1 -4 0 4 ...
∞
X 3 -1 2 -3 -1 0 2 -4 -2 1 0 0 0 3 ...
{xn } = xk · {δn−k } -3 3 -3 3 -3 3 -3 3 -3 0 0 0 0 0 0 ];
k=−∞ n = 0:length(x)-1;
y = filter([1 1 1 1]/4, [1], x);
Let’s see what happens if we apply a linear(∗) time-invariant(∗∗) system plot(n, x, 'bx-', n, y, 'ro-');
T to such a decomposed sequence:
produced the plot on slide 16 to illustrate the 4-point moving average sys-
!
∞
X (∗)
∞
X tem. The standard library function filter(b, a, x) applies to the finite
T {xn } = T xk · {δn−k } = xk · T {δn−k } sequence x the discrete system defined by the constant-coefficient difference
k=−∞ k=−∞
! equation with coefficient vectors b and a (see slide 22 and “help filter”).
∞ ∞
(∗∗) X X Change this program to generate the corresponding plot for the
= xk · {δn−k } ∗ T {δn } = xk · {δn−k } ∗ T {δn }
k=−∞ k=−∞
(a) exponential averaging system (slide 17)
= {xn } ∗ T {δn } q.e.d. (b) accumulator system (slide 18)
(c) backward difference system (slide 19)
⇒ The impulse response T {δn } fully characterizes an LTI system.
26 28
Exercise 5 A finite-length sequence is non-zero only at a finite number of Convolution: optics example
positions. If m and n are the first and last non-zero positions, respectively, If a projective lens is out of focus, the blurred image is equal to the
then we call n − m + 1 the length of that sequence. What maximum length original image convolved with the aperture shape (e.g., a filled circle):
can the result of convolving two sequences of length k and l have?
Uout
−1 −1 −1
z z z Uin C Uout
b1 −a1 −a1 b1
xn−1 yn−1 Uout
z −1 z −1 = z −1 0
1/RC ω (= 2πf)
b2 −a2 −a2 b2 t 0
xn−2 yn−2 Any passive network (R, L, C) convolves its input voltage Uin with an
z −1
z −1
z −1 impulse response function h, leading to Uout = Uin ∗ h, that is
b3 −a3 −a3 b3 Z ∞
xn−3 yn−3
Uout (t) = Uin (t − τ ) · h(τ ) · dτ
The block diagram representation of the constant-coefficient difference −∞
equation on slide 22 is called the direct form I implementation. In this example:
The number of delay elements can be halved by using the commuta- −t
Uin − Uout dUout 1
tivity of convolution to swap the two feedback loops, leading to the · e RC , t ≥ 0
=C· , h(t) = RC
direct form II implementation of the same LTI system. R dt 0, t<0
These two forms are only equivalent with ideal arithmetic (no rounding errors and range limits).
30 32
Why are sine waves useful? Why are exponential functions useful?
1) Adding together sine waves of equal frequency, but arbitrary ampli- Adding together two exponential functions with the same base z, but
tude and phase, results in another sine wave of the same frequency: different scale factor and offset, results in another exponential function
with the same base:
A1 · sin(ωt + ϕ1 ) + A2 · sin(ωt + ϕ2 ) = A · sin(ωt + ϕ)
A1 · z t+ϕ1 + A2 · z t+ϕ2 = A1 · z t · z ϕ1 + A2 · z t · z ϕ2
with
q = (A1 · z ϕ1 + A2 · z ϕ2 ) · z t = A · z t
A= A21 + A22 + 2A1 A2 cos(ϕ2 − ϕ1 )
Likewise, if we convolve a sequence {xn } of values
A1 sin ϕ1 + A2 sin ϕ2
tan ϕ = . . . , z −3 , z −2 , z −1 , 1, z, z 2 , z 3 , . . .
A1 cos ϕ1 + A2 cos ϕ2 A
A2 A2 · sin(ϕ2 )
Sine waves of any phase can be ϕ2 xn = z n with an arbitrary sequence {hn }, we get {yn } = {z n } ∗ {hn },
A1 A2 · cos(ϕ2 )
formed from sin and cos alone: ∞
X ∞
X ∞
X
ωt
ϕ1
ϕ A1 · sin(ϕ1 )
yn = xn−k · hk = z n−k · hk = z n · z −k · hk = z n · H(z)
A · sin(ωt + ϕ) = A1 · cos(ϕ1 ) k=−∞ k=−∞ k=−∞
Note: Convolution of a discrete sequence {xn } with another sequence Why are complex numbers so useful?
{yn } is nothing but adding together scaled and delayed copies of {xn }. 1) They give us all n solutions√(“roots”) of equations involving poly-
(Think of {yn } decomposed into a sum of impulses.) nomials up to degree n (the “ −1 = j ” story).
If {xn } is a sampled sine wave of frequency f , so is {xn } ∗ {yn }! 2) They give us the “great unifying theory” that combines sine and
=⇒ Sine-wave sequences form a family of discrete sequences exponential functions:
that is closed under convolution with arbitrary sequences.
1 jωt
cos(ωt) = e + e− jωt
The same applies for continuous sine waves and convolution. 2
1
sin(ωt) = e jωt − e− jωt
2) Sine waves are orthogonal to each other: 2j
Z ∞ or
1 j(ωt+ϕ)
sin(ω1 t + ϕ1 ) · sin(ω2 t + ϕ2 ) dt “=” 0 cos(ωt + ϕ) = e + e− j(ωt+ϕ)
−∞ 2
or
⇐⇒ ω1 6= ω2 ∨ ϕ1 − ϕ2 = (2k + 1)π/2 (k ∈ Z)
cos(ωn + ϕ) = ℜ(e j(ωn+ϕ) ) = ℜ[(e jω )n · e jϕ ]
They can be used to form an orthogonal function basis for a transform.
The term “orthogonal” is used here in the context of an (infinitely dimensional) vector space, sin(ωn + ϕ) = ℑ(e j(ωn+ϕ) ) = ℑ[(e jω )n · e jϕ ]
where the “vectors” Rare functions of the form f : R → R (or f : R → C) and the scalar product
∞
is defined as f · g = −∞ f (t) · g(t) dt. Notation: ℜ(a + jb) := a and ℑ(a + jb) := b where j2 = −1 and a, b ∈ R.
34 36
We can now represent sine waves as projections of a rotating complex Recall: Fourier transform
vector. This allows us to represent sine-wave sequences as exponential We define the Fourier integral transform and its inverse as
sequences with basis e jω . Z ∞
A phase shift in such a sequence corresponds to a rotation of a complex F{g(t)}(f ) = G(f ) = g(t) · e−2π jf t dt
vector. −∞
Z ∞
3) Complex multiplication allows us to modify the amplitude and phase
of a complex rotating vector using a single operation and value. F −1 {G(f )}(t) = g(t) = G(f ) · e2π jf t df
−∞
Rotation of a 2D vector in (x, y)-form is notationally slightly messy,
Many equivalent forms of the Fourier transform are used in the literature. There is no strong
but fortunately j2 = −1 does exactly what is required here: consensus on whether the forward transform uses e−2π jf t and the backwards transform e2π jf t ,
or vice versa. The above form uses the ordinary frequency f , whereas some authors prefer the
angular frequency ω = 2πf :
x3 x2 −y2 x1
= · (x3 , y3 )
y3 y2 x2 y1 Z ∞
F {h(t)}(ω) = H(ω) = α h(t) · e∓ jωt dt
x 1 x 2 − y1 y2 (−y2 , x2 ) −∞
=
x 1 y2 + x 2 y 1 (x2 , y2 ) Z ∞
(x1 , y1 ) F −1 {H(ω)}(t) = h(t) = β H(ω)· e± jωt dω
−∞
z1 = x1 + jy1 , z2 = x2 + jy2
This substitution introduces factors α and β such that αβ = 1/(2π). Some authors set α = 1
z1 · z2 = x1 x2 − y1 y2 + j(x1 y2 + x2 y1 ) and β = 1/(2π), to keep √the convolution theorem free of a constant prefactor; others prefer the
unitary form α = β = 1/ 2π, in the interest of symmetry.
37 39
45 47
The spectrum of the baseband signal in the interval −fl < f < fl is
As any x(t) ∈ R can be decomposed into sine and cosine functions, the spectrum of any real-
valued signal will show the symmetry X(e jω ) = [X(e− jω )]∗ , where ∗ denotes the complex shifted by the modulation to the intervals ±fc − fl < f < ±fc + fl .
conjugate (i.e., negated imaginary part). How can such a signal be demodulated?
46 48
Sampling using a Dirac comb Sampling and aliasing
The loss of information in the sampling process that converts a con-
tinuous function x(t) into a discrete sequence {xn } defined by sample
cos(2π tf)
cos(2π t(k⋅ f ± f))
xn = x(ts · n) = x(n/fs ) s
The function x̂(t) now contains exactly the same information as the
discrete sequence {xn }, but is still in a form that can be analysed using Sampled at frequency fs , the function cos(2πtf ) cannot be distin-
the Fourier transform on continuous functions. guished from cos[2πt(kfs ± f )] for any k ∈ Z.
49 51
is
Z ∞ ∞
X f
F{x̂(t)}(f ) = X̂(f ) = x̂(t) · e −2π jf t
dt = ts · xn · e−2π j fs n 0 f −fs 0 fs f
double-sided bandwidth
−∞ n=−∞
reconstruction filter
X̂(f ) X̂(f )
Some authors prefer the notation X̂(e jω ) = n xn · e− jωn to highlight the periodicity of X̂ and
P
53 55
Reconstruction filter example Exercise 8 Digital-to-analog converters cannot output Dirac pulses. In-
stead, for each sample, they hold the output voltage (approximately) con-
stant, until the next sample arrives. How can this behaviour be modeled
sampled signal mathematically as a linear time-invariant system, and how does it affect the
interpolation result spectrum of the output signal?
scaled/shifted sin(x)/x pulses
Y (f ) Ẑ(f ) Z(f )
sin πtfs /2 2n + 1 sin πt(n + 1)fs sin πtnfs anti-aliasing filter
h(t) = fs · cos 2πtfs = (n + 1)fs − nfs .
πtfs /2 4 πt(n + 1)fs πtnfs
sample
−→
X(f ) anti-aliasing filter X̂(f ) reconstruction filter
IQ sampling / complex baseband signal The real part ℜ(z(t)) is also known as “in-phase” signal (I) and the
Consider signal x(t) ∈ R in which only frequencies fl < |f | < fh are imaginary part ℑ(z(t)) as “quadrature” signal (Q).
of interest. This band has a centre frequency of fc = (fl + fh )/2 and
a bandwidth B = fh − fl . It can be sampled efficiently (at the lowest
⊗ sample Q
62 64
ℑ[z(t)]
Exercise 11 Reconstructing a sampled baseband signal:
Recall products of sine and cosine:
1 1
• cos(x) · cos(y) = 2
cos(x − y) + 2
cos(x + y) • Generate a one second long Gaussian noise sequence {rn } (using
1 1
• sin(x) · sin(y) = 2
cos(x − y) − 2
cos(x + y) MATLAB function randn) with a sampling rate of 300 Hz.
1 1
• sin(x) · cos(y) = sin(x − y) + sin(x + y)
2 2 ℜ[z(t)]
• Use the fir1(50, 45/150) function to design a finite impulse re-
Examples: sponse low-pass filter with a cut-off frequency of 45 Hz. Use the
Amplitude-modulated signal: filtfilt function in order to apply that filter to the generated noise
signal, resulting in the filtered noise signal {xn }.
1
x(t) = s(t) · cos(2πtfc + ϕ) −→ z(t) = · s(t) · e jϕ • Then sample {xn } at 100 Hz by setting all but every third sample
2
value to zero, resulting in sequence {yn }.
Noncoherent demodulation: s(t) = 2|z(t)| (s(t) > 0 required)
Coherent demodulation: s(t) = 2ℜ[z(t) · e− jϕ ] (ϕ required) • Generate another low-pass filter with a cut-off frequency of 50 Hz
Frequency-modulated signal: and apply it to {yn }, in order to interpolate the reconstructed filtered
Z t noise signal {zn }. Multiply the result by three, to compensate the
1 j R t s(τ )dτ + jϕ energy lost during sampling.
x(t) = cos 2πtfc + s(τ )dτ + ϕ −→ z(t) = ·e 0
0 2
• Plot {xn }, {yn }, and {zn }. Finally compare {xn } and {zn }.
d
Demodulation: idea is s(t) = dt ∠z(t), where a · ∠e jφ = φ (a, φ ∈ R), but only for −π ≤ φ < π.
Why should the first filter have a lower cut-off frequency than the second?
h i
dz(t) z(t)
In practice: s(t) ≈ ℑ dt · z (t) /|z(t)|2 or s(t) ≈ ∠ z(t−∆t) /∆t
∗
65 67
ASK BPSK QPSK • Generate a 1 s noise sequence {rn }, as in exercise 11, but this time
10 00 use a sampling frequency of 3 kHz.
• Apply to that a band-pass filter that attenuates frequencies outside
0 1 0 1 the interval 31–44 Hz, which the MATLAB Signal Processing Toolbox
function cheby2(3, 30, [31 44]/1500) will design for you.
11 01
• Then sample the resulting signal at 30 Hz by setting all but every
100-th sample value to zero.
• Generate with cheby2(3, 20, [30 45]/1500) another band-pass
8PSK 101 16QAM FSK
111 100
1 filter for the interval 30–45 Hz and apply it to the above 30-Hz-
00 sampled signal, to reconstruct the original signal. (You’ll have to
0 multiply it by 100, to compensate the energy lost during sampling.)
110 000 01
11
• Plot all the produced sequences and compare the original band-pass
signal and that reconstructed after being sampled at 30 Hz.
010 001 10
00 01 11 10
Why does the reconstructed waveform differ much more from the original
011
if you reduce the cut-off frequencies of both band-pass filters by 5 Hz?
66 68
Exercise 13 FM demodulation of a single radio station from IQ data: Spectrum of a periodic signal
• The file iq-fm-96M-240k.dat (on the course web page) contains 20 A signal x(t) that is periodic with frequency fp can be factored into a
seconds of a BBC Radio Cambridgeshire FM broadcast, IQ sampled single period ẋ(t) convolved with an impulse comb p(t). This corre-
at the transmitter’s centre frequency of 96.0 MHz, at a sample rate sponds in the frequency domain to the multiplication of the spectrum
of 240 kHz, after having been filtered to 192 kHz bandwidth. of the single period with a comb of impulses spaced fp apart.
• Load the IQ samples into MATLAB using x(t) ẋ(t) p(t)
f = fopen('iq-fm-96M-240k.dat', 'r', 'ieee-le');
c = fread(f, [2,inf], '*float32'); = ∗
fclose(f);
... ... ... ...
z = c(1,:) + j*c(2,:);
−1/fp 0 1/fp t t −1/fp 0 1/fp t
• FM demodulate the complex baseband radio signal z (using angle)
X(f ) Ẋ(f ) P (f )
• apply a 16 kHz low-pass filter (using butter, filter)
• reduce the sample rate from 240 kHz down to 48 kHz (keep only = ·
every 5th sample using the : operator) ... ...
• normalize amplitude (−1 . . . + 1), output as WAV (wavwrite), listen −fp 0 fp f f −fp 0 fp f
69 71
Exercise 14 FM demodulation of multiple radio stations from IQ data: Spectrum of a sampled signal
• The file iq-fm-97M-3.6M.dat contains 4 seconds of Cambridgeshire A signal x(t) that is sampled with frequency fs has a spectrum that is
radio spectrum, IQ sampled at a centre frequency of 97.0 MHz, with periodic with a period of fs .
2.88 MHz bandwidth and a sample rate of 3.6 MHz. Load this file
into MATLAB (as in exercise 13).
x(t) s(t) x̂(t)
• Shift the frequency spectrum of this IQ signal up by 1.0 MHz, such
that the 96.0 MHz carrier of BBC Radio Cambridge ends up at 0 Hz.
· =
• Apply a 200 kHz low-pass filter (butter).
... ... ... ...
• Display the spectrogram of the signal after each of the preceding 0 t −1/fs 0 1/fs t −1/fs 0 1/fs t
three steps (using spectrogram). How does the displayed frequency
X(f ) S(f ) X̂(f )
relate to the original radio frequency?
• FM demodulate, low-pass filter, and subsample the signal to 48 kHz, ∗ =
and output it as a 16-bit WAV file, as in exercise 13.
... ... ... ...
• Estimate the centre frequencies of two other FM radio stations within 0 f −fs fs f −fs 0 fs f
the recorded band (using spectrogram), then demodulate these too.
70 72
Continuous vs discrete Fourier transform Discrete Fourier Transform visualized
• Sampling a continuous signal makes its spectrum periodic
x0 X0
• A periodic signal has a sampled spectrum
x1
X1
We sample a signal x(t) with fs , getting x̂(t). We take n consecutive
x2 X2
samples of x̂(t) and repeat these periodically, getting a new signal ẍ(t)
· x3
= X3
with period n/fs . Its spectrum Ẍ(f ) is sampled (i.e., has non-zero
x4
X4
value) at frequency intervals fs /n and repeats itself with a period fs .
x5
X5
Now both ẍ(t) and its spectrum Ẍ(f ) are finite vectors of length n. x6 X6
x7 X7
ẍ(t) Ẍ(f ) The n-point DFT of a signal {xi } sampled at frequency fs contains in
the elements X0 to Xn/2 of the resulting frequency-domain vector the
frequency components 0, fs /n, 2fs /n, 3fs /n, . . . , fs /2, and contains
... ... ... ...
in Xn−1 downto Xn/2 the corresponding negative frequencies. Note
that for a real-valued input vector, both X0 and Xn/2 will be real, too.
−n/fs fs−1 0 fs−1 n/fs t −fs −fs /n 0 fs /n fs f Why is there no phase information recovered at fs /2?
73 75
74 76
Fast Fourier Transform (FFT) Fast complex multiplication
Calculating the product of two complex numbers as
n−1
X
−2π j ik
Fn {xi }n−1
i=0 k = xi · e n
(a + jb) · (c + jd) = (ac − bd) + j(ad + bc)
i=0
n n
2
−1 2
−1
X ik
−2π j n/2 k
−2π j n
X ik
−2π j n/2 involves four (real-valued) multiplications and two additions.
= x2i · e + e x2i+1 · e
i=0 i=0 The alternative calculation
n n
−1 k −1
2
F n2 {x2i }i=0
+ e−2π j n · F n2 {x2i+1 }i=0
2
, k< n
2 α = a(c + d)
k k
= n n (a + jb) · (c + jd) = (α − β) + j(α + γ) with β = d(a + b)
−1 k −1
+ e−2π j n · F n2 {x2i+1 }i=0 n
2 2
F n2 {x2i }i=0
, k≥ 2 γ = c(b − a)
k− n2 n
k− 2
provides the same result with three multiplications and five additions.
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 The latter may perform faster on CPUs where multiplications take three
log2 n rounds and n log2 n additions and multiplications overall, com- or more times longer than additions.
This “Karatsuba multiplication” is most helpful on simpler microcontrollers. Specialized signal-
pared to n2 for the equivalent matrix multiplication. processing CPUs (DSPs) feature 1-clock-cycle multipliers. High-end desktop processors use
A high-performance FFT implementation in C with many processor-specific optimizations and pipelined multipliers that stall where operations depend on each other.
support for non-power-of-2 sizes is available at http://www.fftw.org/.
77 79
∗ ∗ ∗
−1
A’ B’ F [F(A’)⋅F(B’)] = = =
The regions originally added as zero padding are, after convolution, aligned
Both sequences are padded with zero values to a length of at least m+n−1. to overlap with the unpadded ends of their respective neighbour blocks.
This ensures that the start and end of the resulting sequence do not overlap. The overlapping parts of the blocks are then added together.
81 83
Zero padding is usually applied to extend both sequence lengths to the Deconvolution
next higher power of two (2⌈log2 (m+n−1)⌉ ), which facilitates the FFT. A signal u(t) was distorted by convolution with a known impulse re-
With a causal sequence, simply append the padding zeros at the end. sponse h(t) (e.g., through a transmission channel or a sensor problem).
With a non-causal sequence, values with a negative index number are The “smeared” result s(t) was recorded.
wrapped around the DFT block boundaries and appear at the right Can we undo the damage and restore (or at least estimate) u(t)?
end. In this case, zero-padding is applied in the center of the block,
between the last and first element of the sequence.
Thanks to the periodic nature of the DFT, zero padding at both ends
has the same effect as padding only at one end. ∗ =
If both sequences can be loaded entirely into RAM, the FFT can be ap-
plied to them in one step. However, one of the sequences might be too
large for that. It could also be a realtime waveform (e.g., a telephone
signal) that cannot be delayed until the end of the transmission.
In such cases, the sequence has to be split into shorter blocks that are ∗ =
separately convolved and then added together with a suitable overlap.
82 84
The convolution theorem turns the problem into one of multiplication: Spectral estimation
Z
s(t) = u(t − τ ) · h(τ ) · dτ
Sine wave 4×fs/32 Discrete Fourier Transform
1
s = u∗h 15
u = F −1 {F{s}/F{h}} −1
0 10 20 30
0
0 10 20 30
In practice, we also record some noise n(t) (quantization, etc.): Sine wave 4.61×fs/32 Discrete Fourier Transform
Z 1
15
c(t) = s(t) + n(t) = u(t − τ ) · h(τ ) · dτ + n(t)
10
0
Problem – At frequencies f where F{h}(f ) approaches zero, the
5
noise will be amplified (potentially enormously) during deconvolution:
−1 0
ũ = F −1 {F{c}/F{h}} = u + F −1 {F{n}/F{h}} 0 10 20 30 0 10 20 30
85 87
Typical workarounds: We introduced the DFT as a special case of the continuous Fourier
→ Modify the Fourier transform of the impulse response, such that transform, where the input is sampled and periodic.
|F{h}(f )| > ǫ for some experimentally chosen threshold ǫ. If the input is sampled, but not periodic, the DFT can still be used
to calculate an approximation of the Fourier transform of the original
→ If estimates of the signal spectrum |F{s}(f )| and the noise
continuous signal. However, there are two effects to consider. They
spectrum |F{n}(f )| can be obtained, then we can apply the
are particularly visible when analysing pure sine waves.
“Wiener filter” (“optimal filter”)
Sine waves whose frequency is a multiple of the base frequency (fs /n)
|F{s}(f )|2
W (f ) = of the DFT are identical to their periodic extension beyond the size
|F{s}(f )|2 + |F{n}(f )|2 of the DFT. They are, therefore, represented exactly by a single sharp
before deconvolution: peak in the DFT. All their energy falls into one single frequency “bin”
ũ = F −1 {W · F{c}/F{h}} in the DFT result.
Sine waves with other frequencies, which do not match exactly one of
Exercise 15 Use MATLAB to deconvolve the blurred stars from slide 31. the output frequency bins of the DFT, are still represented by a peak
The files stars-blurred.png with the blurred-stars image and stars-psf.png with the impulse
response (point-spread function) are available on the course-material web page. You may find at the output bin that represents the nearest integer multiple of the
the MATLAB functions imread, double, imagesc, circshift, fft2, ifft2 of use. DFT’s base frequency. However, such a peak is distorted in two ways:
Try different ways to control the noise (see above) and distortions near the margins (window-
ing). [The MATLAB image processing toolbox provides ready-made “professional” functions
deconvwnr, deconvreg, deconvlucy, edgetaper, for such tasks. Do not use these, except per-
→ Its amplitude is lower (down to 63.7%).
haps to compare their outputs with the results of your own attempts.] → Much signal energy has “leaked” to other frequencies.
86 88
The reason for the leakage and scalloping losses is easy to visualize with the
35 help of the convolution theorem:
30 The operation of cutting a sequence of the size of the DFT input vector out
of a longer original signal (the one whose continuous Fourier spectrum we
25
try to estimate) is equivalent to multiplying this signal with a rectangular
20 function. This destroys all information and continuity outside the “window”
15 that is fed into the DFT.
10 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.
5
The subsequent interpretation of this window as a periodic sequence by
0
16
0 5 the DFT leads to sampling of this convolution result (sampling meaning
10 15 15.5
20 25 multiplication with a Dirac comb whose impulses are spaced fs /n apart).
30 15
DFT index
input freq. Where the window length was an exact multiple of the original signal period,
sampling of the sin(πf T )/(πf T ) curve leads to a single Dirac pulse, and
The leakage of energy to other frequency bins not only blurs the estimated spec-
trum. The peak amplitude also changes significantly as the frequency of a tone
the windowing causes no distortion. In all other cases, the effects of the con-
changes from that associated with one output bin to the next, a phenomenon volution become visible in the frequency domain as leakage and scalloping
known as scalloping. In the above graphic, an input sine wave gradually changes losses.
from the frequency of bin 15 to that of bin 16 (only positive frequencies shown).
89 91
200 0.8
0
100
0.6
−1 0
0 200 400 0 200 400 0.4
Sine wave multiplied with window function Discrete Fourier Transform
1 100 0.2
Rectangular window
Triangular window
0
0 50 Hann window
Hamming window
Magnitude (dB)
si = cos(2π · 3i/16) + cos(2π · 4i/16), i ∈ {0, . . . , 15}.
0 0
The left plot shows the DFT of the windowed sequence
−20 −20
xi = si · w i , i ∈ {0, . . . , 15}
−40 −40
and the right plot shows the DFT of the zero-padded windowed sequence
−60 −60
0 0.5 1 0 0.5 1
Normalized Frequency (×π rad/sample) Normalized Frequency (×π rad/sample) ′ si · wi , i ∈ {0, . . . , 15}
xi =
Hann window Hamming window 0, i ∈ {16, . . . , 63}
where wi = 0.54 − 0.46 × cos (2πi/15) is the Hamming window.
20 20
Magnitude (dB)
Magnitude (dB)
0 0 DFT without zero padding DFT with 48 zeros appended to window
4 4
−20 −20
−40 −40 2 2
−60 −60
0 0.5 1 0 0.5 1
Normalized Frequency (×π rad/sample) Normalized Frequency (×π rad/sample) 0 0
0 5 10 15 0 20 40 60
93 95
Numerous alternatives to the rectangular window have been proposed Applying the discrete Fourier transform to an n-element long real-
that reduce leakage and scalloping in spectral estimation. These are valued sequence leads to a spectrum consisting of only n/2+1 discrete
vectors multiplied element-wise with the input vector before applying frequencies.
the DFT to it. They all force the signal amplitude smoothly down to Since the resulting spectrum has already been distorted by multiplying
zero at the edge of the window, thereby avoiding the introduction of the (hypothetically longer) signal with a windowing function that limits
sharp jumps in the signal when it is extended periodically by the DFT. its length to n non-zero values and forces the waveform smoothly down
Three examples of such window vectors {wi }n−1 i=0 are: to zero at the window boundaries, appending further zeros outside the
Triangular window (Bartlett window): window will not distort the signal further.
i The frequency resolution of the DFT is the sampling frequency divided
w i = 1 − 1 −
by the block size of the DFT. Zero padding can therefore be used to
n/2
increase the frequency resolution of the DFT.
Hann window (raised-cosine window, Hanning window):
Note that zero padding does not add any additional information to the
i signal. The spectrum has already been “low-pass filtered” by being
wi = 0.5 − 0.5 × cos 2π
n−1 convolved with the spectrum of the windowing function. Zero padding
Hamming window: in the time domain merely samples this spectrum blurred by the win-
dowing step at a higher resolution, thereby making it easier to visually
i
wi = 0.54 − 0.46 × cos 2π distinguish spectral lines and to locate their peak more precisely.
n−1
94 96
Digital filters Solutions:
Filter: supresses (removes, attenuates) unwanted signal components.
→ Make the impulse response finite by multiplying the sampled
→ low-pass filter – suppress all frequencies above a cut-off frequency h(t) with a windowing function
→ high-pass filter – suppress all frequencies below a cut-off frequency,
→ Make the impulse response causal by adding a delay of half the
including DC (direct current = 0 Hz)
window size
→ band-pass filter – suppress signals outside a frequency interval (=
passband) The impulse response of an n-th order low-pass filter is then chosen as
→ band-stop filter (aka: band-reject filter) – suppress signals inside sin[2π(i − n/2)fc /fs ]
a single frequency interval (= stopband) hi = 2fc /fs · · wi
2π(i − n/2)fc /fs
→ notch filter – narrow band-stop filter, ideally suppressing only a
single frequency where {wi } is a windowing sequence, such as the Hamming window
For digital filters, we also distinguish wi = 0.54 − 0.46 × cos (2πi/n)
→ finite impulse response (FIR) filters
with wi = 0 for i < 0 and i > n.
→ infinite impulse response (IIR) filters Note that for fc = fs /4, we have hi = 0 for all even values of i. Therefore, this special case
requires only half the number of multiplications during the convolution. Such “half-band” FIR
depending on how far their memory reaches back in time. filters are used, for example, as anti-aliasing filters wherever a sampling rate needs to be halved.
97 99
Imaginary Part
1 if |f | < fc f
Amplitude
H(f ) = = rect
0 if |f | > fc 2fc 0
30
0
Phase (degrees)
Magnitude (dB)
signal to be processed will lead to a periodic frequency characteristic, −20 −500
that matches the periodic spectrum of the sampled signal.
−40 −1000
There are two problems though:
−60 −1500
→ the impulse response is infinitely long 0 0.5 1
Normalized Frequency (×π rad/sample)
0 0.5 1
Normalized Frequency (×π rad/sample)
→ this filter is not causal, that is h(t) 6= 0 for t < 0
order: n = 30, cutoff frequency (−6 dB): fc = 0.25 × fs /2, window: Hamming
98 100
Filter performance Converting low-pass to high-pass filters
An ideal filter has a gain of 1 in the pass-band and a gain of 0 in the by frequency inversion
stop band, and nothing in between. 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
A practical filter will have
the periodic spectrum by fs /2:
→ frequency-dependent gain near 1 in the passband X ′ (f ) X(f )
Converting low-pass to band-pass filters Exercise 16 Explain the difference between the DFT, FFT, and FFTW.
by modulation
Exercise 17 Push-button telephones use a combination of two sine tones
To obtain a band-pass filter that attenuates all frequencies f outside to signal, which button is currently being pressed:
the range fl < f < fh , we first design a low-pass filter with a cut-off 1209 Hz 1336 Hz 1477 Hz 1633 Hz
frequency (fh − fl )/2 and multiply its impulse response with a sine 697 Hz 1 2 3 A
wave of frequency (fh + fl )/2, before applying the usual windowing: 770 Hz 4 5 6 B
852 Hz 7 8 9 C
sin[π(i − n/2)(fh − fl )/fs ] 941 Hz * 0 # D
hi = (fh − fl )/fs · · cos[πi(fh + fl )/fs ] · wi
π(i − n/2)(fh − fl )/fs
(a) You receive a digital telephone signal with a sampling frequency of
H(f ) 8 kHz. You cut a 256-sample window out of this sequence, multiply it with a
windowing function and apply a 256-point DFT. What are the indices where
= ∗ the resulting vector (X0 , X1 , . . . , X255 ) will show the highest amplitude if
button 9 was pushed at the time of the recording?
−fh −fl 0 fl fh f − fh −f
2
l fh −fl
2
f − fh +f
2
l
0 fh +fl
2
f (b) Use MATLAB to determine, which button sequence was typed in the
touch tones recorded in the file touchtone.wav on the course-material web
page.
102 104
Polynomial representation of sequences Example of polynomial division:
We can represent sequences {xn } as polynomials: 1 X ∞
= 1 + av + a2 v 2 + a3 v 3 + · · · = an v n
∞
X 1 − av n=0
X(v) = xn v n
n=−∞ 1 + av + a2 v 2 + · · ·
1 − av 1
Example of polynomial multiplication: 1 − av
av
(1 + 2v + 3v 2 ) · (2 + 1v)
av − a2 v 2
2 + 4v + 6v 2 a2 v 2
+ 1v + 2v 2 + 3v 3 a2 v 2 − a3 v 3
= 2 + 5v + 8v 2 + 3v 3 ···
105 107
Note how the Fourier transform of a sequence can be accessed easily {z n } ∗ {xn } = {yn }
from its polynomial form:
∞ ∞
∞ X X
n−k n
X(e− jω ) =
X
xn e− jωn ⇒ yn = z xk = z · z −k xk = z n · X(z)
k=−∞ k=−∞
n=−∞
106 108
The z-transform defines for each sequence a continuous complex-valued This function can be converted into the form
surface over the complex plane C. For finite sequences, its value is al- m
Y m
Y
ways defined across the entire complex plane. (1 − cl · z −1 ) (z − cl )
For infinite sequences, it can be shown that the z-transform converges b0 l=1 b0 k−m l=1
H(z) = · k = ·z · k
only for the region a0 Y a0 Y
−1
(1 − dl · z ) (z − dl )
l=1 l=1
xn+1 xn+1
lim < |z| < lim
n→∞ xn n→−∞ xn where the cl are the non-zero positions of zeros (H(cl ) = 0) and the dl are
The z-transform identifies a sequence unambiguously only in conjunction with a given region of
the non-zero positions of the poles (i.e., z → dl ⇒ |H(z)| → ∞) of H(z).
convergence. In other words, there exist different sequences, that have the same expression as Except for a constant factor, H(z) is entirely characterized by the position
their z-transform, but that converge for different amplitudes of z. of these zeros and poles.
The z-transform is a generalization of the discrete-time Fourier trans- On the unit circle z = e jω , H(e jω ) is the discrete-time Fourier transform of
form, which it contains on the complex unit circle (|z| = 1): {hn } (ω = πf / f2s ). The DTFT amplitude can also be expressed in terms
∞ of the relative position of e jω to the zeros and poles:
X
t−1 · F{x̂(t)}(f ) = X(e ) = jω
xn e− jωn Qm
s
jω
b0 |e jω − cl |
n=−∞ |H(e )| = · Qkl=1
a0 jω
l=1 |e − dl |
where ω = 2π ffs .
109 111
b0 + b1 z −1 + b2 z −2 + · · · + bm z −m xn = δ n ⇒ yn =
H(z) =
a0 + a1 z −1 + a2 z −2 + · · · + ak z −k Impulse Response
0.8
(bm =
6 0, ak =
6 0) which can also be written as
0.6
Amplitude
P
zk m l=0 bl z
m−l
0.4
H(z) = P .
z m kl=0 al z k−l 0.2
Imaginary Part
0.9 1 1
Amplitude
Magnitude
0.85
0 0.5
0.8
0.75 −1 0
−1 0 1 0 10 20 30
0.7
Real Part n (samples)
0 0.2 0.4 0.6 0.8
z 1
Normalized Frequency (×π rad/sample) H(z) = z−0.9
= 1−0.9·z −1
Run this LTI filter at sampling frequency fs and test it with sinusoidial
input (frequency f , amplitude 1): xn = cos(2πf n/fs ) z Plane Impulse Response
Imaginary Part
1 1
Output: yn = A(f ) · cos(2πf n/fs + θ(f ))
Amplitude
What are the gain A(f ) and phase delay θ(f ) at frequency f ? 0 0.5
jπf /fs )}
Answer: A(f ) = |H(e j2πf /fs
)|, θ(f ) = ∠H(e j2πf /fs
)= tan−1 ℑ{H(e
ℜ{H(e jπf /fs )} −1 0
Example: fs = 8 kHz, f = 2 kHz (normalized frequency f / f2s = 0.5) ⇒ Gain A(2 kHz) = −1 0 1 0 10 20 30
0.8 j 0.8 j(− j−0.2) 0.8−0.16 j q 0.82 +0.162
|H(e jπ/2 )| = |H( j)| = j−0.2 =
( j−0.2)(− j−0.2)
=
1+0.04
=
1.042
= 0.784. . . Real Part n (samples)
113 115
z 1
Visual verification in MATLAB: x H(z) = z−1
= 1−z −1
1.5 y (time domain)
n = 0:15; fs = 8000; z Plane Impulse Response
y (z−transform)
Imaginary Part
f = 1500; 1 1
Amplitude
x = cos(2*pi*f*n/fs);
1 0 0.5
b = [0.8]; a = [1 -0.2];
y1 = filter(b,a,x);
z = exp(j*2*pi*f/fs); −1 0
0.5 −1 0 1 0 10 20 30
H = 0.8*z/(z-0.2);
Real Part n (samples)
A = abs(H);
z 1
theta = atan(imag(H)/real(H)); H(z) = z−1.1
= 1−1.1·z −1
y2 = A*cos(2*pi*f*n/fs+theta); 0
z Plane Impulse Response
plot(n, x, 'bx-', ... Imaginary Part
1 20
n, y1, 'go-', ...
Amplitude
n, y2, 'r+-') −0.5
0 10
legend('x', ...
'y (time domain)', ... −1
−1 0
'y (z-transform)') −1 0 1 0 10 20 30
ylim([-1.1 1.8]) 0 5 10 15 Real Part n (samples)
114 116
z2
H(z) = (z−0.9·e jπ/6 )·(z−0.9·e− jπ/6 )
= 1
1−1.8 cos(π/6)z −1 +0.92 ·z −2 Properties of the z-transform
Imaginary Part z Plane Impulse Response
1 2
Amplitude
As with the Fourier transform, convolution in the time domain corre-
2 sponds to complex multiplication in the z-domain:
0 0
−1 −2 {xn } •−◦ X(z), {yn } •−◦ Y (z) ⇒ {xn } ∗ {yn } •−◦ X(z) · Y (z)
−1 0 1 0 10 20 30
Real Part n (samples)
z2 1 Delaying a sequence by one corresponds in the z-domain to multipli-
H(z) = =
(z−e jπ/6 )·(z−e− jπ/6 ) 1−2 cos(π/6)z −1 +z −2 cation with z −1 :
z Plane Impulse Response {xn−∆n } •−◦ X(z) · z −∆n
Imaginary Part
1 Amplitude 5
2
0 0
−1 −5
−1 0 1 0 10 20 30
Real Part n (samples)
117 119
z2
H(z) = (z−0.9·e jπ/2 )·(z−0.9·e− jπ/2 )
= 1
1−1.8 cos(π/2)z −1 +0.92 ·z −2
= 1
1+0.92 ·z −2 IIR Filter design techniques
z Plane Impulse Response The design of a filter starts with specifying the desired parameters:
Imaginary Part
1 1
→
Amplitude
H(z) = z
= 1 → The order of a filter is the number of poles it uses in the
z+1 1+z −1
z-domain, and equivalently the number of delay elements nec-
z Plane Impulse Response essary to implement it.
Imaginary Part
1 1
Amplitude
Imaginary Part
Amplitude
The designer can then trade off conflicting goals such as a small tran-
0 0.5
sition band, a low order, a low ripple amplitude, or even an absence of
ripples.
−1 0
Design techniques for making these tradeoffs for analog filters (involv- −1 0 1 0 10 20 30
Real Part n (samples)
ing capacitors, resistors, coils) can also be used to design digital IIR
filters: 0 0
Phase (degrees)
Magnitude (dB)
Butterworth filters −20
−50
Have no ripples, gain falls monotonically across the pass and transition
p −40
band. Within the passband, the gain drops slowly down to 1 − 1/2
−60 −100
(−3 dB). Outside the passband, it drops asymptotically by a factor 2N 0 0.5 1 0 0.5 1
per octave (N · 20 dB/decade). Normalized Frequency (×π rad/sample) Normalized Frequency (×π rad/sample)
Imaginary Part
Amplitude
Distribute the gain error uniformly throughout the stopband (equirip- 0 0
ples) and drop off monotonically in the passband.
−1
Elliptic filters (Cauer filters) −1 0 1
−0.5
0 10 20 30
Distribute the gain error as equiripples both in the passband and stop- Real Part n (samples)
Phase (degrees)
passband-gain tolerance, stopband-gain tolerance, and transition-band Magnitude (dB)
−20 −200
width that can be achieved at a given filter order.
−40 −400
All these filter design techniques are implemented in the MATLAB Signal Processing Toolbox in
the functions butter, cheby1, cheby2, and ellip, which output the coefficients an and bn of the −60 −600
difference equation that describes the filter. These can be applied with filter to a sequence, or 0 0.5 1 0 0.5 1
can be visualized with zplane as poles/zeros in the z-domain, with impz as an impulse response, Normalized Frequency (×π rad/sample) Normalized Frequency (×π rad/sample)
and with freqz as an amplitude and phase spectrum. The commands sptool and fdatool
provide interactive GUIs to design digital filters. order: 5, cutoff frequency (−3 dB): 0.25 × fs /2
122 124
Chebyshev type I filter design example Elliptic filter design example
Impulse Response Impulse Response
1 0.5 1 0.5
Imaginary Part
Imaginary Part
Amplitude
Amplitude
0 0 0 0
−1 −0.5 −1 −0.5
−1 0 1 0 10 20 30 −1 0 1 0 10 20 30
Real Part n (samples) Real Part n (samples)
0 0 0 0
Phase (degrees)
Phase (degrees)
Magnitude (dB)
Magnitude (dB)
−20 −200 −20
−200
−40 −400 −40
order: 5, cutoff frequency: 0.5 × fs /2, pass-band ripple: −3 dB order: 5, cutoff frequency: 0.5 × fs /2, pass-band ripple: −3 dB, stop-band ripple: −20 dB
125 127
Chebyshev type II filter design example Exercise 18 Draw the direct form II block diagrams of the causal infinite-
impulse response filters described by the following z-transforms and write
down a formula describing their time-domain impulse responses:
Impulse Response
0.5 1
1 (a) H(z) =
Imaginary Part
1 − 21 z −1
Amplitude
1 −4
0 0 1− 44
z
(b) H ′ (z) = 1 −1
1 − 4z
−1 −0.5 1 1 1
−1 0 1 0 10 20 30 (c) H ′′ (z) = + z −1 + z −2
Real Part n (samples)
2 4 2
0 200 Exercise 19 (a) Perform the polynomial division of the rational function
Phase (degrees)
Magnitude (dB)
given in exercise 18 (a) until you have found the coefficient of z −5 in the
−20 0
result.
−40 −200 (b) Perform the polynomial division of the rational function given in exercise
18 (b) until you have found the coefficient of z −10 in the result.
−60 −400
0 0.5 1 0 0.5 1 (c) Use its z-transform to show that the filter in exercise 18 (b) has actually
Normalized Frequency (×π rad/sample) Normalized Frequency (×π rad/sample)
a finite impulse response and draw the corresponding block diagram.
order: 5, cutoff frequency: 0.5 × fs /2, stop-band ripple: −20 dB
126 128
Exercise 20 Consider the system h : {xn } → {yn } with yn + yn−1 = Two random variables xn and xm are called independent if
xn − xn−4 .
Pxn ,xm (a, b) = Pxn (a) · Pxm (b)
(a) Draw the direct form I block diagram of a digital filter that realises h.
and a random process is called stationary if
(b) What is the impulse response of h?
(c) What is the step response of h (i.e., h ∗ u)? Pxn1 +l ,...,xnk +l (a1 , . . . , ak ) = Pxn1 ,...,xnk (a1 , . . . , ak )
(d) Apply the z-transform to (the impulse response of) h to express it as a for all l, that is, if the probability distributions are time invariant.
rational function H(z). The derivative pxn (a) = Px′ n (a) is called the probability density func-
(e) Can you eliminate a common factor from numerator and denominator? tion, and helps us to define quantities such as the
What does this mean? R
(f) For what values z ∈ C is H(z) = 0?
→ expected value E(xn) = apxn (a) da R
(g) How many poles does H have in the complex plane?
→ mean-square value (average power) E(|xn|2) = |a|2pxn (a) da
(h) Write H as a fraction using the position of its poles and zeros and draw → variance Var(xn ) = E[|xn − E(xn )|2 ] = E(|xn |2 ) − |E(xn )|2
their location in relation to the complex unit circle. → correlation Cor(xn , xm ) = E(xn · x∗m )
(i) If h is applied to a sound file with a sampling frequency of 8000 Hz, → covariance Cov(xn , xm ) = E[(xn − E(xn )) · (xm − E(xm ))∗ ] =
sine waves of what frequency will be eliminated and sine waves of what E(xn x∗m ) − E(xn )E(xm )∗
frequency will be quadrupled in their amplitude? 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).
129 131
Random sequences and noise A stationary random process {xn } can be characterized by its mean
A discrete random sequence {xn } is a sequence of numbers value
mx = E(xn ),
. . . , x−2 , x−1 , x0 , x1 , x2 , . . .
its variance
where each value xn is the outcome of a random variable xn in a σx2 = E(|xn − mx |2 ) = γxx (0)
corresponding sequence of random variables (σx is also called standard deviation), its autocorrelation sequence
. . . , x−2 , x−1 , x0 , x1 , x2 , . . . φxx (k) = E(xn+k · x∗n )
Such a collection of random variables is called a random process. Each and its autocovariance sequence
individual random variable xn is characterized by its probability distri- γxx (k) = E[(xn+k − mx ) · (xn − mx )∗ ] = φxx (k) − |mx |2
bution function
Pxn (a) = Prob(xn ≤ a) A pair of stationary random processes {xn } and {yn } can, in addition,
be characterized by its crosscorrelation sequence
and the entire random process is characterized completely by all joint
probability distribution functions φxy (k) = E(xn+k · yn∗ )
Swapping the input sequences mirrors the output sequence: cxy (k) = cyx (−k).
133 135
Periodic averaging
P corresponds in the time domain to convolution with a
Dirac comb n δi−pn . In the frequency domain, this means multiplication
with a Dirac comb that eliminates all frequencies but multiples of 1/p.
137 139
138 140
Audio-visual lossy coding today typically consists of these steps: → Image and audio coding standards
→ A transducer converts the original stimulus into a voltage. • A/µ-law coding (digital telephone network)
→ This analog signal is then sampled and quantized. • JPEG
The digitization parameters (sampling frequency, quantization levels) are preferably
chosen generously beyond the ability of human senses or output devices. • MPEG video
→ The digitized sensor-domain signal is then transformed into a • MPEG audio
perceptual domain.
This step often mimics some of the first neural processing steps in humans.
Literature
→ This signal is quantized again, based on a perceptual model of what
level of quantization-noise humans can still sense. → D. Salomon: A guide to data compression methods.
→ The resulting quantized levels may still be highly statistically de- ISBN 0387952608, 2002.
pendent. A prediction or decorrelation transform exploits this and
produces a less dependent symbol sequence of lower entropy. → L. Gulick, G. Gescheider, R. Frisina: Hearing. ISBN 0195043073,
1989.
→ An entropy coder turns that into an apparently-random bit string,
whose length approximates the remaining entropy. → H. Schiffman: Sensation and perception. ISBN 0471082082, 1982.
The first neural processing steps in humans are in effect often a kind of decorrelation transform;
our eyes and ears were optimized like any other AV communications system. This allows us to
use the same transform for decorrelating and transforming into a perceptually relevant domain.
141 143
• colour vision 0 1
Huffman’s algorithm constructs an optimal code-word tree for a set of
• human hearing limits, critical bands, audio masking symbols with known probability distribution. It iteratively picks the two y z
elements of the set with the smallest probability and combines them into 0.05 0.05
Predictive coding:
w w w w w encoder decoder
f(t) g(t) g(t) f(t)
− +
v v v v v
predictor predictor
P(f(t−1), f(t−2), ...) P(f(t−1), f(t−2), ...)
0.0 0.55
0.55
0.5745 0.5822
Linear predictive coding: P (x1 , . . . , xn ) = ai x i
i=1
145 147
153 155
64
The Pearson correlation coefficient 64
0
Cov(X, Y )
ρX,Y = p 0
0 64 128 192 256
−64
−64 0 64 128 192 256 320
Var(X) · Var(Y ) Probability distribution and entropy
154 156
Theorem: Let X ∈ Rn and Y ∈ Rn be random vectors that are Karhunen-Loève transform (KLT)
linearly dependent with Y = AX + b, where A ∈ Rn×n and b ∈ Rn We are given a random vector variable X ∈ Rn . The correlation of the
are constants. Then elements of X is described by the covariance matrix Cov(X).
E(Y) = A · E(X) + b How can we find a transform matrix A that decorrelates X, i.e. that
turns Cov(AX) = A · Cov(X) · AT into a diagonal matrix? A would
Cov(Y) = A · Cov(X) · AT
provide us the transformed representation Y = AX of our random
vector, in which all elements are mutually uncorrelated.
Proof: The first equation follows from the linearity of the expected-
value operator E(·), as does E(A · X · B) = A · E(X) · B for matrices Note that Cov(X) is symmetric. It therefore has n real eigenvalues
A, B. With that, we can transform λ1 ≥ λ2 ≥ · · · ≥ λn and a set of associated mutually orthogonal
eigenvectors b1 , b2 , . . . , bn of length 1 with
Cov(Y) = E (Y − E(Y)) · (Y − E(Y))T Cov(X)bi = λi bi .
= E (AX − AE(X)) · (AX − AE(X))T
= E A(X − E(X)) · (X − E(X))T AT
We convert this set of equations into matrix notation using the matrix
B = (b1 , b2 , . . . , bn ) that has these eigenvectors as columns and the
= A · E (X − E(X)) · (X − E(X))T · AT diagonal matrix D = diag(λ1 , λ2 , . . . , λn ) that consists of the corre-
= A · Cov(X) · AT sponding eigenvalues:
Cov(X)B = BD
157 159
[When estimating a covariance from a number of samples, the sum is divided by the number of
samples minus one. This takes into account the variance of the mean S̄c , which is not the exact
Spatial correlation
expected value, but only an estimate of it.]
The previous example used the Karhunen-Loève transform in order to
The resulting covariance matrix has three eigenvalues 0.0622, 0.0025, and 0.0006
eliminate correlation between colour planes. While this is of some
0.0328
0.0256
0.0256 0.0160 0.7167 0.7167 relevance for image compression, far more correlation can be found
0.0216 0.0140 0.5833 = 0.0622
0.5833
0.0160 0.0140 0.0109 0.3822 0.3822 between neighbour pixels within each colour plane.
In order to exploit such correlation using the KLT, the sample set has
0.0328 0.0256 0.0160 −0.5509 −0.5509
0.0256 0.0216 0.0140 0.1373 = 0.0025 0.1373
0.0160 0.0140 0.0109 0.8232 0.8232 to be extended from individual pixels to entire images. The underlying
0.0328 0.0256 0.0160
−0.4277
−0.4277
calculation is the same as in the preceeding example, but this time
0.0256 0.0216 0.0140 0.8005 = 0.0006 0.8005 the columns of S are entire (monochrome) images. The rows are the
0.0160 0.0140 0.0109 −0.4198 −0.4198
different images found in the set of test images that we use to examine
and can therefore be diagonalized as typical correlations between neighbour pixels.
In other words, we use the same formulas as in the previous example, but this time n is the number
0.0328 0.0256 0.0160
0.0256 0.0216 0.0140 = C = U · D · U T = of pixels per image and m is the number of sample images. The Karhunen-Loève transform is
0.0160 0.0140 0.0109 here no longer a rotation in a 3-dimensional colour space, but it operates now in a much larger
vector space that has as many dimensions as an image has pixels.
0.7167 −0.5509 −0.4277 0.0622 0 0 0.7167 0.5833 0.3822
0.5833 0.1373 0.8005 0 0.0025 0 −0.5509 0.1373 0.8232 To keep things simple, we look in the next experiment only at m = 9000 1-dimensional “images”
0.3822 0.8232 −0.4198 0 0 0.0006 −0.4277 0.8005 −0.4198 with n = 32 pixels each. As a further simplification, we use not real images, but random noise
that was filtered such that its amplitude spectrum is proportional to 1/f , where f is the frequency.
The result would be similar in a sufficiently large collection of real test images.
(e.g. using MATLAB’s singular-value decomposition function svd).
162 164
Karhunen-Loève transform example II Discrete cosine transform (DCT)
Matrix columns of S filled with samples of 1/f filtered noise The forward and inverse discrete cosine transform
N −1
C(u) X (2x + 1)uπ
S(u) = p s(x) cos
N/2 x=0 2N
N −1
X C(u) (2x + 1)uπ
... s(x) = p S(u) cos
u=0 N/2 2N
Covariance matrix C Matrix U with eigenvector columns
with
√1 u=0
C(u) = 2
1 u>0
is an orthonormal transform:
N −1
X C(u) (2x + 1)uπ C(u′ ) (2x + 1)u′ π 1 u = u′
p cos ·p cos =
N/2 2N N/2 2N 0 u=6 u′
x=0
165 167
Matrix U ′ with normalised KLT Matrix with Discrete Cosine The 2-dimensional variant of the DCT applies the 1-D transform on
eigenvector columns Transform base vector columns both rows and columns of an image:
C(u) C(v)
S(u, v) = p p ·
N/2 N/2
N −1 N −1
X X (2x + 1)uπ (2y + 1)vπ
s(x, y) cos cos
x=0 y=0
2N 2N
s(x, y) =
N −1 N −1
X X C(u) C(v) (2x + 1)uπ (2y + 1)vπ
p p · S(u, v) cos cos
u=0 v=0 N/2 N/2 2N 2N
Breakthrough: Ahmed/Natarajan/Rao discovered the DCT as an ex- A range of fast algorithms have been found for calculating 1-D and
cellent approximation of the KLT for typical photographic images, but 2-D DCTs (e.g., Ligtenberg/Vetterli).
far more efficient to calculate.
Ahmed, Natarajan, Rao: Discrete Cosine Transform. IEEE Transactions on Computers, Vol. 23,
January 1974, pp. 90–93.
166 168
Whole-image DCT Whole-image DCT, 90% coefficient cutoff
2D Discrete Cosine Transform (log10) Original image 90% truncated 2D DCT (log10) 90% truncated DCT: reconstructed image
4 4
3 3
2 2
1 1
0 0
−1 −1
−2 −2
−3 −3
−4 −4
169 171
Whole-image DCT, 80% coefficient cutoff Whole-image DCT, 95% coefficient cutoff
80% truncated 2D DCT (log10) 80% truncated DCT: reconstructed image 95% truncated 2D DCT (log10) 95% truncated DCT: reconstructed image
4 4
3 3
2 2
1 1
0 0
−1 −1
−2 −2
−3 −3
−4 −4
170 172
Whole-image DCT, 99% coefficient cutoff Psychophysics of perception
Sensation limit (SL) = lowest intensity stimulus that can still be perceived
Difference limit (DL) = smallest perceivable stimulus difference at given
99% truncated 2D DCT (log10) 99% truncated DCT: reconstructed image intensity level
4
3
Weber’s law
2
Difference limit ∆φ is proportional to the intensity φ of the stimu-
1
lus (except for a small correction constant a, to describe deviation of
0
experimental results near SL):
−1
∆φ = c · (φ + a)
−2
−3
Fechner’s scale
−4
Define a perception intensity scale ψ using the sensation limit φ0 as
the origin and the respective difference limit ∆φ = c · φ as a unit step.
The result is a logarithmic relationship between stimulus intensity and
scale value:
φ
ψ = logc
φ0
173 175
Base vectors of 8×8 DCT Fechner’s scale matches older subjective intensity scales that follow
v differentiability of stimuli, e.g. the astronomical magnitude numbers
0 1 2 3 4 5 6 7 for star brightness introduced by Hipparchos (≈150 BC).
0 Stevens’ power law
A sound that is 20 DL over SL is perceived as more than twice as loud
1
as one that is 10 DL over SL, i.e. Fechner’s scale does not describe
2 well perceived intensity. A rational scale attempts to reflect subjective
relations perceived between different values of stimulus intensity φ.
3 Stanley Smith Stevens observed that such rational scales ψ follow a
u
power law:
4 ψ = k · (φ − φ0 )a
5 Example coefficients a: brightness 0.33, loudness 0.6, heaviness 1.45,
temperature (warmth) 1.6.
6
174 176
RGB video colour coordinates YUV transform example
Hardware interface (VGA): red, green, blue signals with 0–0.7 V
Electron-beam current and photon count of cathode-ray displays are
roughly proportional to (v − v0 )γ , where v is the video-interface or
control-grid voltage and γ is a device parameter that is typically in
the range 1.5–3.0. In broadcast TV, this CRT non-linearity is com-
pensated electronically in TV cameras. A welcome side effect is that
it approximates Stevens’ scale and therefore helps to reduce perceived
noise.
Software interfaces map RGB voltage linearly to {0, 1, . . . , 255} or 0–1.
How numeric RGB values map to colour and luminosity depends at
present still highly on the hardware and sometimes even on the oper- original Y channel U and V channels
ating system or device driver.
The centre image shows only the luminance channel as a black/white
The new specification “sRGB” aims to standardize the meaning of image. In the right image, the luminance channel (Y) was replaced
an RGB value with the parameter γ = 2.2 and with standard colour with a constant, such that only the chrominance information remains.
coordinates of the three primary colours. This example and the next make only sense when viewed in colour. On a black/white printout of
http://www.w3.org/Graphics/Color/sRGB, IEC 61966 this slide, only the Y channel information will be present.
177 179
U
0.6 0.6 0.6
Cr
Cr
Cr
Cb = + 0.5
0.4 0.4 0.4
2.0 0
0 0.5 1
0
0 0.5 1
0
0 0.5 1
Cb Cb Cb
Y=0.7 Y=0.9 Y=0.99
1 1 1
1.6
Cr
Cr
Cr
0.4 0.4 0.4
0 0 0
0 0.5 1 0 0.5 1 0 0.5 1
Cb Cb Cb
dBSPL
For the study of masking effects, pure tones therefore need to be
40
distinguished from narrowband noise.
→ Temporal masking: SL rises shortly before and after a masker. 30
20
10
40 63 100 160 250 400 630 1000 1600 2500 4000 6300 10000 16000
Hz
186 188
Audio demo: masking.wav Example of a linear quantizer (resolution R, peak value V ):
x 1
80 0 dBA curve (SL) y = max −V, min V, R +
masking tones R 2
probing tones
70 masking thresholds
Adding a noise signal that is uniformly distributed on [0, 1] instead of adding 21 helps to spread
the frequency spectrum of the quantization noise more evenly. This is known as dithering.
60
Variant with even number of output values (no zero):
50
x 1
dBSPL
193 195
Joint Photographic Experts Group – JPEG → Quantization: divide each DCT coefficient with the correspond-
Working group “ISO/TC97/SC2/WG8 (Coded representation of picture and audio information)” ing value from an 8×8 table, then round to the nearest integer:
was set up in 1982 by the International Organization for Standardization. The two standard quantization-matrix examples for luminance and chrominance are:
Goals: 16
12
11
12
10
14
16 24 40
19 26 58
51 61
60 55
17
18
18
21
24
26
47
66
99
99
99
99
99
99
99
99
→ continuous tone gray-scale and colour images 14
14
13
17
16
22
24 40 57
29 51 87
69 56
80 62
24
47
26
66
56
99
99
99
99
99
99
99
99
99
99
99
→ recognizable images at 0.083 bit/pixel 18
24
22
35
37
55
56 68 109
64 81 104
103 77
113 92
99
99
99
99
99
99
99
99
99
99
99
99
99
99
99
99
→ useful images at 0.25 bit/pixel 49
72
64
92
78
95
87 103 121
98 112 100
120 101
103 99
99
99
99
99
99
99
99
99
99
99
99
99
99
99
99
99
→ excellent image quality at 0.75 bit/pixel
→ indistinguishable images at 2.25 bit/pixel
→ apply DPCM coding to quantized DC coefficients from DCT
→ feasibility of 64 kbit/s (ISDN fax) compression with late 1980s → read remaining quantized values from DCT in zigzag pattern
hardware (16 MHz Intel 80386). → locate sequences of zero coefficients (run-length coding)
→ workload equal for compression and decompression → apply Huffman coding on zero run-lengths and magnitude of
The JPEG standard (ISO 10918) was finally published in 1994. AC values
William B. Pennebaker, Joan L. Mitchell: JPEG still image compression standard. Van Nostrad
Reinhold, New York, ISBN 0442012721, 1993.
→ add standard header with compression parameters
Gregory K. Wallace: The JPEG Still Picture Compression Standard. Communications of the http://www.jpeg.org/
ACM 34(4)30–44, April 1991, http://doi.acm.org/10.1145/103085.103089 Example implementation: http://www.ijg.org/
194 196
Storing DCT coefficients in zigzag order Lossless JPEG algorithm
horizontal frequency
In addition to the DCT-based lossy compression, JPEG also defines a
0 1 5 6 14 15 27 28 lossless mode. It offers a selection of seven linear prediction mecha-
2 4 7 13 16 26 29 42 nisms based on three previously coded neighbour pixels:
vertical frequency
3 8 12 17 25 30 41 43
1: x=a
9 11 18 24 31 40 44 53 2: x=b
10 19 23 32 39 45 52 54 3: x=c c b
20 22 33 38 46 51 55 60 4: x=a+b−c
5: x = a + (b − c)/2
21 34 37 47 50 56 59 61
6: x = b + (a − c)/2 a ?
35 36 48 49 57 58 62 63
7: x = (a + b)/2
After the 8×8 coefficients produced by the discrete cosine transform
have been quantized, the values are processed in the above zigzag order Predictor 1 is used for the top row, predictor 2 for the left-most row.
by a run-length encoding step. The predictor used for the rest of the image is chosen in a header. The
The idea is to group all higher-frequency coefficients together at the end of the sequence. As many
image blocks contain little high-frequency information, the bottom-right corner of the quantized
difference between the predicted and actual value is fed into either a
DCT matrix is often entirely zero. The zigzag scan helps the run-length coder to make best use Huffman or arithmetic coder.
of this observation.
197 199
→ adaptive quantization
→ SNR and spatially scalable coding (enables separate transmis-
sion of a moderate-quality video signal and an enhancement
signal to reduce noise or improve resolution)
Layer I
→ Waveforms are split into segments of 384 samples each (8 ms at 48 kHz).
→ Each segment is passed through an orthogonal filter bank that splits the
signal into 32 subbands, each 750 Hz wide (for 48 kHz).
This approximates the critical bands of human hearing.
backward
current picture
forward → This is followed by scaling, bit allocation and uniform quantization.
reference picture reference picture Each subband gets a 6-bit scale factor (2 dB resolution, 120 dB range, like floating-
point coding). Layer I uses a fixed bitrate without buffering. A bit allocation step
Each MPEG image is split into 16×16-pixel large macroblocks. The predic- uses the psychoacoustic model to distribute all available resolution bits across the 32
tor forms a linear combination of the content of one or two other blocks of bands (0–15 bits for each sample). With a sufficient bit rate, the quantization noise
will remain below the sensation limit.
the same size in a preceding (and following) reference image. The relative
positions of these reference blocks are encoded along with the differences. → Encoded frame contains bit allocation, scale factors and sub-band samples.
205 207
Layer III
I B B B P B B B P B B B P → Modified DCT step decomposes subbands further into 18 or 6 frequencies
Coding order: → dynamic switching between MDCT with 36-samples (28 ms, 576 freq.)
time
and 12-samples (8 ms, 192 freq.)
enables control of pre-echos before sharp percussive sounds (Heisenberg)
→ non-uniform quantization
I P B B B P B B B P B B B
→ Huffman entropy coding
MPEG distinguishes between I-frames that encode an image independent of any others, P-frames
→ buffer with short-term variable bitrate
that encode differences to a previous P- or I-frame, and B-frames that interpolate between the
two neighbouring B- and/or I-frames. A frame has to be transmitted before the first B-frame → joint stereo processing
that makes a forward reference to it. This requires the coding order to differ from the display
order. MPEG audio layer III is the widely used “MP3” music compression format.
206 208
Psychoacoustic models Outlook
MPEG audio encoders use a psychoacoustic model to estimate the spectral
and temporal masking that the human ear will apply. The subband quan- Further topics that we have not covered in this brief introductory tour
tization levels are selected such that the quantization noise remains below through DSP, but for the understanding of which you should now have
the masking threshold in each subband. a good theoretical foundation:
The masking model is not standardized and each encoder developer can
chose a different one. The steps typically involved are:
→ multirate systems
Exercise 21 Compare the quantization techniques used in the digital tele- Some final thoughts about redundancy . . .
phone network and in audio compact disks. Which factors do you think led
to the choice of different techniques and parameters here? Aoccdrnig to rsceearh at Cmabrigde Uinervtisy, it
deosn’t mttaer in waht oredr the ltteers in a wrod are,
Exercise 22 Which steps of the JPEG (DCT baseline) algorithm cause a the olny iprmoetnt tihng is taht the frist and lsat
loss of information? Distinguish between accidental loss due to rounding ltteer be at the rghit pclae. The rset can be a total
errors and information that is removed for a purpose. mses and you can sitll raed it wouthit porbelm. Tihs is
bcuseae the huamn mnid deos not raed ervey lteter by
Exercise 23 How can you rotate by multiples of ±90◦ or mirror a DCT- istlef, but the wrod as a wlohe.
JPEG compressed image without losing any further information. Why might
the resulting JPEG file not have the exact same file length?
. . . and perception
Exercise 24 Decompress this G3-fax encoded line: Count how many Fs there are in this text:
1101011011110111101100110100000000000001
FINISHED FILES ARE THE RE-
Exercise 25 You adjust the volume of your 16-bit linearly quantizing sound- SULT OF YEARS OF SCIENTIF-
card, such that you can just about hear a 1 kHz sine wave with a peak IC STUDY COMBINED WITH THE
amplitude of 200. What peak amplitude do you expect will a 90 Hz sine EXPERIENCE OF YEARS
wave need to have, to appear equally loud (assuming ideal headphones)?
210 212