Professional Documents
Culture Documents
• Introduction
• Time-Domain Analysis of Discrete Signals and Systems
• Frequency-Domain Analysis Using Fourier
and z-Transforms
• Fast Fourier Transform (FFT) Processing
• Design of Nonrecursive and Recursive Digital Filters
• Random Signal Analysis
• DSP Processors
• Adaptive Filtering and Adaptive Signal Processing
• Spectral Analysis and Signal Compression
Heriot-Watt University 1
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
COURSE TEXTBOOK
Heriot-Watt University 2
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 3
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 4
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
DSP operations:
Heriot-Watt University 5
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Advantages of DSP:
• digital data storage and transmission is much more effective than in the
analogue form
• flexibility: processing functions can be altered or adjusted
• possibility of implementing much more complicated processing functions
than in analogue devices
• efficient implementation of fast algorithms and matrix-based processing
• speed of digital operation tends to grow rapidly with the years of technical
progress
• a very high accuracy and reliability is possible to achieve
• dynamic range can be increased
• signal multiplexing: simultaneous (parallel) processing
Heriot-Watt University 6
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 7
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
s(t)
sampling of
analog signal
t
∆t
Heriot-Watt University 8
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
quantization levels
6
5
4
3
2
1
0
0 1 2 3 4 5 6 7 8 9 10 11
sampling instants
sample 2 2 3 5 5 4 3 3 4 2 0 3
values
binary
codes 010 01
0 011 101 101 10 0 011 011 10 0 010 0 0 0 011
errors
Heriot-Watt University 9
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
digital
0 1 2 3 4 5 6 7
111
110
101
10 0
analog
0 11
010
0 01
000
Unit-impulse function:
(
1, n = 0
δ(n) =
0, n =
6 0
n
X
u(n) = δ(m) integration
m=−∞
δ(n) = u(n) − u(n − 1) differentiation
Heriot-Watt University 11
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
δ(n)
1
n
Heriot-Watt University 12
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Periodic signals:
¯
¯
x(t) = x(t + T ) ¯ x(n) = x(n + N )
Finite-energy signals:
Z ∞ ¯ ∞
X
¯
E= |x(t)|2 dt < ∞ ¯ E= |x(n)|2 < ∞
−∞ n=−∞
Finite-power signals:
Z T ¯ N
X
1 2 ¯ 1
P = lim |x(t)| dt < ∞ ¯ P = lim |x(n)|2 < ∞
T →∞ 2T −T N →∞ 2N
n=−N
Heriot-Watt University 13
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
sum of
all waves second
wave
first third
wave wave
Heriot-Watt University 14
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Sinusoids:
¯
¯
x(t) = A sin(ωt + φ) ¯ x(n) = A sin(ωn + φ)
Heriot-Watt University 15
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
A sine wave as the projection of a complex phasor onto the imaginary axis:
Im
ω
A
Re t
Heriot-Watt University 16
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 17
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
n
x(n) Ambiguity in digital sinusoids
Heriot-Watt University 18
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
-F F f
Heriot-Watt University 19
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Remarks:
• The frequency fN = 2F is referred to as the Nyquist rate
• Digital signal ambiguity is often termed as the aliasing effect
• Equation (∗∗) represents the particular formulation of the
Shannon-Nyquist-Kotelnikov Sampling Theorem
• We’ll study the differencies between digital and analog signals further using
frequency-domain signal analysis
Heriot-Watt University 20
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
2 TIME-DOMAIN ANALYSIS
2.1 Linear Time-Invariant (LTI) Systems
Definition of a system:
y(n) = T {x(n)}
where T {·} is an operator that maps an input sequence x(n) into an
output sequence y(n).
Linear system: A system (or processor) is linear if it obeys the principle of
superposition.
Principle of superposition: If the input of a system contains the sum of
multiple signals then the output of this system is the sum of the system
responses to each separate signal.
Heriot-Watt University 21
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 22
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 23
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
-2 -1 0 1 2 n
x(- 2 ) δ (n+2)
n
x(- 1) δ (n+1)
n
x(0) δ(n)
n
x(1) δ(n- 1)
x(2) δ (n-2) n
n
∞
X
x(n) = x(k)δ(n − k)
k=−∞
Heriot-Watt University 24
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
y(n) = T
{x(n)}
X ∞
= T x(k)δ(n − k)
k=−∞
∞
X
= x(k)T {δ(n − k)}
k=−∞
X∞
= x(k)h(n − k)={x(n)} ∗ {h(n)} convolution sum
k=−∞
Heriot-Watt University 25
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
n n
An important property of convolution:
∞
X ∞
X
{x(n)} ∗ {h(n)} = x(k)h(n − k) = h(k)x(n − k)
k=−∞ k=−∞
= {h(n)} ∗ {x(n)} =⇒
Heriot-Watt University 26
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
{x(n)}∗[{h1(n)} ∗ {h2(n)}]
= [{x(n)} ∗ {h1(n)}]∗{h2(n)} associativity
{x(n)}∗[{h1(n)} + {h2(n)}]
= {x(n)} ∗ {h1(n)} + {x(n)} ∗ {h2(n)} distributivity
x(n) y(n)
h1(n) h2 (n) = x(n) h2(n) h1(n)
y(n)
= x(n) h1(n)* h2 (n) y(n)
h1(n)
x(n) y(n) x(n) y(n)
= h1(n) +h2 (n)
h 2(n)
Heriot-Watt University 27
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
x(k) N= 6
1
0 5 k
y(n)
6
0 5 10 n
Heriot-Watt University 28
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
x(-7 -k ) x(k)
1 n=- 7 y =0
x(-1 -k ) x(k) k
n=- 1 y=0
x(2 -k ) x(k) k
n =2 y= 3
x(5 -k ) x(k) k
n =5 y=6
x(k) x(8 -k ) k
n =8 y= 3
x(k) x(11-k ) k
y=
n = 11 0
x(k) x(17-k ) k
n =17 y=0
k
Heriot-Watt University 29
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
x(k)
3
h(k) k
3
x(-k) k
3
x(- 2 - k) k
3
x(2 - k) k
3
Heriot-Watt University 30
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
h(k), x(n-k)
3
2 2
1 1 0.5
y(n) k
8.5
5
4
2 1.5
Heriot-Watt University 31
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Proof of “if”: Let the input x(n) be bounded so that |x(n)| < Lx,
∀n ∈ [−∞, ∞]. Then
¯ X
∞ ¯
¯ ¯
|y(n)| = ¯ h(k)x(n − k)¯
k=−∞
X∞
≤ |h(k)||x(n − k)|
k=−∞
X∞ ∞
X
≤ Lx |h(k)| =⇒ |y(n)| < ∞ if |h(k)| < ∞
k=−∞ k=−∞
Heriot-Watt University 32
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
then a bounded input can be found that will cause an unbounded output.
Consider
(
h∗(−n)/|h(−n)| , h(n) 6= 0
x(n) = =⇒
0, h(n) = 0;
∞
X ∞
X
y(0) = x(−k)h(k) = |h(k)| =⇒
k=−∞ k=−∞
P∞
if k=−∞ |h(k)| = ∞, the output sequence is unbounded.
Heriot-Watt University 33
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Definition: A causal system is one for which the output y(n) depends on
the inputs {. . . , x(n − 2), x(n − 1), x(n)} only.
Result: An LTI system is causal if and only if its impulse response
h(n) = 0 for n < 0.
Proof of “if”: From the definition of a causal system,
∞
X
y(n) = h(k)x(n − k)
k=−∞
X∞
= h(k)x(n − k)
k=0
P−1
Obviously, this equation is valid if k=−∞ h(k)x(n − k) = 0 i.e., if
h(n) = 0 for n < 0.
Heriot-Watt University 34
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Now, it remains to prove that if h(n) 6= 0 for n < 0, than the system
can be noncausal. Let
h(n) = 0 , n < −1
h(−1) 6= 0 =⇒
∞
X
y(n) = h(k)x(n − k) + h(−1)x(n + 1) =⇒
k=0
y(n) depends on x(n + 1) =⇒ the system is noncausal.
Heriot-Watt University 35
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 36
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 37
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Example:
n
X
y(n) = x(k) accumulator
k=−∞
n
X n−1
X
y(n) − y(n − 1) = x(k) − x(k)
k=−∞ k=−∞
n−1
X n−1
X
= x(n) + x(k) − x(k)
k=−∞ k=−∞
= x(n)
Heriot-Watt University 38
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
x(n) y(n)
+
one-
sample
delay
y(n- 1)
Heriot-Watt University 39
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 40
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 41
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Result: Suppose that for a given input xp(n) we have found one particular
output sequence yP(n) so that a LCCD equation is satisfied. Then, the
same equation with the same input is satisfied by any output of the form
where yH(n) is any solution to the LCCD equation with zero input
x(n) = 0.
Remark: yP(n) and yH(n) are referred to as the particular and
homogeneous solutions, respectively.
Heriot-Watt University 42
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 43
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 44
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
M
X N
X
b(k) a(k)
y(n) = x(n − k) − y(n − k) forwards
a(0) a(0)
k=0 k=1
M
X N
X −1
b(k) a(k)
y(n − N ) = x(n − k) − y(n − k) backwards
a(N ) a(N )
k=0 k=0
Heriot-Watt University 45
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
y(1) = ay0 + b ,
y(2) = ay(1) + 0
= a(ay0 + b) = a2y0 + ab ,
y(3) = a(a2y0 + ab) = a3y0 + a2b ,
··· ··· ············ ,
y(n) = any0 + an−1b
Heriot-Watt University 46
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Remark that:
Backwards recursion:
y(−1) = a−1(y0 − 0)
= a−1y0 ,
y(−2) = a−2y0 ,
y(−3) = a−3y0 ,
······ ··· ······ ,
y(−n) = a−ny0
Heriot-Watt University 47
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Auxiliary result: A linear system requires that the output be zero for all
time when the input is zero for all time.
Proof: Represent zero input as a product of zero constant c = 0 and
(arbitrary) non-zero signal x(n):
c x(n) = 0 · x(n) = 0
Result is proven.
Heriot-Watt University 48
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
whereas x(−n) = 0 , n ≥ 0 =⇒
according to Result, the system is nonlinear!
Heriot-Watt University 49
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 50
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 51
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 52
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
3 FREQUENCY-DOMAIN ANALYSIS
3.1 Review of Continuous-Time Fourier Transform
Consider a continuous complex signal
Multiplying (∗) with ϕ∗k (t) and integrating over the interval, we obtain
Z T /2 Z T /2 X ∞
1 ∗ 1
x(t)ϕk (t) dt = αnϕn(t)ϕ∗k (t) dt
T −T /2 T −T /2
n=−∞
X ³ 1 Z T /2 ´
= αn ϕn(t)ϕ∗k (t) dt
n
T −T /2
X∞
= αnδ(n − k) = αk =⇒
n=−∞
Heriot-Watt University 54
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Proof:
Z T /2 Z T /2
1 ∗ 1 2π(n−k)
j T t
ϕn(t)ϕk (t) dt = e dt
T −T /2 T −T /2
sin(π(n − k))
= = δ(n − k)
π(n − k)
Result is proven, i.e., we can take exponential functions
ϕn(t) = exp{j2πnt/T } as orthonormal basis =⇒ we obtain Fourier
Series!
Heriot-Watt University 55
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
. . . Complex Fourier
__ t) X1 series representation
exp ( j 2π of a periodic signal
T
. . . Σ x(t)
exp (j ___
2π n
T t)
Xn
. . .
Heriot-Watt University 56
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Fourier series can be applied for analysis of signal spectrum! Also, this
interpretation shows that periodic signals have discrete spectrum.
Heriot-Watt University 57
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 58
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
x(t)
A
−τ
_ _τ t
− _T 2 2
_T
2 2
Xn
n
Heriot-Watt University 59
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
1 1 t
4
Xn
A
10
1 t
A Xn
20
1 t
Heriot-Watt University 60
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 61
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 63
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
x(t)
A
τ
−_ 0 _τ t
2
X(ω) 2
Aτ
0 ω
− 2π
__ 2π 4π
__ __
τ τ τ
Heriot-Watt University 64
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Shifting property:
Z ∞
f (t) δ(t − τ ) dt = f (τ )
−∞
Heriot-Watt University 65
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
= e−jωt0
Heriot-Watt University 66
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 67
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
π
sin(ω0t) ↔ [δ(ω − ω0) − δ(ω + ω0)]
j
t ω0 0 ω0 ω
T= 2π
ω0
Heriot-Watt University 68
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 70
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
ωZ0+ Ω
2
1
= 2π lim 2
dω
Ω→0 Ω
ω0− Ω
2
1
= 2π lim = ∞
Ω→0 Ω
Heriot-Watt University 71
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 72
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
ωDTFT = ωCTFT ∆t
Heriot-Watt University 74
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
we obtain DTFT!!!
Heriot-Watt University 76
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 77
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Sufficient condition:
∞
X
|x(n)| ≤ ∞
n=−∞
Proof:
¯ X
∞ ¯
¯ ¯
|X(ω)| = ¯ x(n)e−jωn¯
n=−∞
X∞
≤ |x(n)| |e −jωn|
| {z }
n=−∞ 1
X∞
= |x(n)| ≤ ∞
n=−∞
Heriot-Watt University 79
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 80
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
x(n)
A
0 n
X(ω)
A(N+1)
0 ω
− 2π
__ 2π 4__
__ π
N+1 N+1 N+1
Heriot-Watt University 81
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Linearity:
Heriot-Watt University 82
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Time shifting:
Heriot-Watt University 83
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Frequency shifting:
Heriot-Watt University 84
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Time reversal:
Heriot-Watt University 85
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Differentiation in frequency:
dX(ω)
If X(ω) = F{x(n)} then j = F{n x(n)}
dω
−1 −1 dX(ω)
Also if x(n) = F {X(ω)} then n x(n) = F {j }
dω
Proof:
∞
X ∞
X d(e−jωn)
F{n x(n)} = nx(n)e−jωn = j x(n)
dω
n=−∞ n=−∞
d n ∞
X ª dX(ω)
= j x(n) e −jωn =j
dω dω
n=−∞
−1 dX(ω)
F {j } = F −1{F{ n x(n)}} = n x(n)
dω
Heriot-Watt University 86
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Convolution theorem:
Heriot-Watt University 87
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
= X(ω)H(ω)
Heriot-Watt University 88
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Windowing theorem:
Heriot-Watt University 89
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 90
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 91
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Remarks:
• The impulse response and transfer function represent a DTFT pair =⇒
H(ω) is a periodic function
• The transfer function shows how different input frequency components are
changed (e.g., attenuated) at system output
• This function will be very useful for the consideration of signal filtering
Heriot-Watt University 93
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Interpretation of impulse
and frequency responses
δ (n) h(n)
LTI system
jωn
e jωn LTI system
e H(ω)
Heriot-Watt University 94
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 95
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Question: How are CTFT and Fourier series related for periodic signals?
Heriot-Watt University 96
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
We know that periodic signals have line equispaced spectrum. Let X(ω)
be a linear combination of impulses equally spaced in frequency:
∞
X
X(ω) = 2πXnδ(ω − nω0) (∗)
n=−∞
Using inverse CTFT, i.e., applying it to each term in the sum, we obtain
X∞ Z ∞
1
x(t) = 2πXnδ(ω − nω0)ejωt dω
2π −∞
n=−∞
X∞
= Xnejnω0t exactly Fourier series!
n=−∞
Heriot-Watt University 97
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Heriot-Watt University 98
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
x(t)
t
∆t X(ω)
ω
2π
__
∆t
Heriot-Watt University 99
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
P∞
Proof: The impulse train k=−∞ δ(t − k ∆t) is a periodic signal with
period ∆t =⇒ applying Fourier series, we obtain, that the Fourier
coefficients
Z ∆t/2
1 −j 2πn t 1
Xn = δ(t)e ∆t dt =
∆t −∆t/2 ∆t
From (∗), we obtain
∞
X
X(ω) = 2πXnδ(ω − n |{z}
ω0 )
n=−∞ 2π
∆t
∞
X µ ¶
2π 2πn
= δ ω−
∆t ∆t
n=−∞
Result is proven.
Let
∞
X
s(t) = δ(t − n∆t)
n=−∞
Introduce the “modulated” signal
∞
X
xs(t) = x(t) s(t) = x(t) δ(t − n∆t)
n=−∞
x(t)
from analog to
digital signal using
t impulse train
s(t)
x s (t) t
∆t
x(n) t
Hence,
Z ∞
1
Xs(ω) = X(ν)S(ω − ν) dν
2π −∞
Z ∞ X∞ µ ¶
1 2π 2πn
= X(ν) δ ω− −ν
2π −∞ ∆t ∆t
n=−∞
X∞ µ ¶
1 2πn
= X ω−
∆t ∆t
n=−∞
X(ω)
1
−ωM 0 ωM ω
S(ω)
. . . .
− 2__
π 0 2__
π ω
∆t ∆t
Xs(ω)
__
1
. . ∆t . .
−ωM 0 ωM 2__
π ω
∆t
Heriot-Watt University 104
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
X(ω)
1
−ωM 0 ωM ω
S(ω)
. . . .
− ∆2_π_t 0 2__
π = 2ω ω
∆t
Xs(ω)
M
__
1
. . ∆t . .
−ωM 0 ωM 2ωM ω
Heriot-Watt University 105
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
X(ω)
1
−ωM 0 ωM ω
S(ω)
. . . .
− 2_π_ 0 2__
π ω
∆t ∆t
1 X (ω)
__
∆t s
. . . .
0 ω
note aliazing!!!
Heriot-Watt University 106
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Xf (ω) =HLP(ω)Xs(ω)
X(ω)
1
−ωM 0 ωM ω
1 X (ω), HLP(ω)
∆t s
∆t
. . . .
−ωC 0 ωC ω
Xf (ω)
1
−ωM 0 ωM ω
Heriot-Watt University 108
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Poor recovery of an analog signal from its samples using an ideal lowpass
filter
X(ω)
1
ωM −ωM 0 ω
Xs(ω), HLP(ω)
1 ∆ t
∆t
. . . .
−ωC 0 ωC ω
Xf (ω)
1
−ωC 0 ωC ω
Heriot-Watt University 109
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
X(ω)
π π
−ω 0 0 ω0 ω
π X (ω), HLP(ω)
∆t s
∆t
− ∆πt 0 π
∆t
ω
Xf (ω)
π π
−ω 0 0 ω 0 ω
Heriot-Watt University 110
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Poor recovery of a cosine at ω0: the aliasing occurs because the sampling
2π < 2 ω )
rate is lower than Nyquist rate ( ∆t 0
X(ω)
π π
−ω 0 0 ω0 ω
π X (ω), HLP(ω)
∆t s
∆t
− ∆πt 0
∆t
π ω
Xf (ω)
π π
2π 0 2π ω
−( ∆ t − ω 0) ∆ t −ω 0
Heriot-Watt University 111
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Result: Having a signal sampled at a rate higher than Nyquist rate and
infinite number of its discrete values, the signal can be exactly recovered as
∞
X sin[π(t − n ∆t)/∆t]
xf (t) = x(n)
π(t − n ∆t)/∆t
n=−∞
Proof: We have seen that the signal can be reconstructed in the frequency
domain using ideal lowpass filter:
Xf (ω) = Xs(ω)HLP(ω)
In time-domain:
Antialiasing Reconstruction
x(t) filter
x(n) y(n) filter
y(t)
DSP
and ADC (DAC)
x(n) x(nL)
L
sampling sampling
interval ∆t interval L ∆t
.
To avoid aliasing, the signal x(n) should be filtered with the cutoff
frequency ωM < π/∆t =⇒ for decimated signal, L times lower
cutoff frequency ωd,M < π/L∆t is required, so that
ωM = L · ωd,M
Heriot-Watt University 116
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
spectra for conventional sequence x(n) and for decimated sequence xd(n)
differ only in a frequency scaling!
For the DTFT-frequencies, the non-aliasing conditions are:
X(ω)
π ωM 0 ωM π 2π ω
Xd(ω)
π 0 L ωMπ 2π ω
The effect of frequency scaling for the decimated sequence: the aliasing
occurs because LωM > π
X(ω)
π ωM 0 ωM π 2π ω
Xd(ω)
π 0 π LωM 2π ω
Upsampling system
X(ω)
x(n)
n Xp(ω)
xp(n)
n π Xi (ω) π
x i (n)
n π π
4 z-TRANSFORM
4.1 Definition and the Regions of Convergence
Consider a continuous-time LTI system with x(t) = est:
Z ∞
y(t) = h(τ )x(t − τ ) dτ
Z−∞
∞
= h(τ )es(t−τ ) dτ
−∞
Z ∞
= est h(τ )e−sτ dτ = H(s)est =⇒
| −∞ {z }
H(s)
Z ∞
H(s) = h(t)e−st dt , s = σ + jω Laplace transform
−∞
Heriot-Watt University 123
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
ω
1
Re
Recall that
∞
(
X 1 , |c| < 1
|c|n = 1−|c| =⇒
n=−∞ ∞, |c| ≥ 1
Im
a 1 Re
1
a Re
Im
Re
N2
X
X(z) = x(n)z −n finite duration signal
n=N1
Particular cases:
• if N1 < 0 and N2 > 0 then the ROC does not include z = 0 and z = ∞
• if N1 ≥ 0 then the ROC includes z = ∞, but does not include z = 0
• if N2 ≤ 0 then the ROC includes z = 0, but does not include z = ∞
∞
X
X(z) = x(n)z −n right − sided sequence
n=N1
Particular cases:
• if N1 < 0 then the ROC does not include z = ∞
• if N1 ≥ 0 then the ROC includes z = ∞
N2
X
X(z) = x(n)z −n left − sided sequence
n=−∞
Particular cases:
• if N2 > 0 then the ROC does not include z = 0
• if N2 ≤ 0 then the ROC includes z = 0
∞
X
X(z) = x(n)z −n two − sided sequence
n=−∞
Re Re
a) b)
Heriot-Watt University 135
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Im Im Im
Re Re
U
Re
=
Im Im Im
1 Re 1 Re 1 Re
Examples:
1
anu(n) ↔ −1
, |z| > |a|
1 − az
[sin ω]z −1
sin(ωn) u(n) ↔ −1 −2
, |z| > 1
1 − [2 cos ω]z + z
Example:
Linearity:
Time shifting:
addition/deletion of z = 0 or z = ∞
Differentiation of X(z):
dX(z)
If X(z) = Z{x(n)} then −z = Z{n x(n)}
dz
−1 −1 dX(z))
Also if x(n) = Z {X(z)} then n x(n) = Z { − z }
dz
with ROC = ROCx
Heriot-Watt University 144
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Time reversal:
x(n) = a−nu(−n)
X(z) = Y (1/z)
1
= , |z| < |a−1|
1 − az
Convolution of sequencies:
z2
Z{{x(n)} ∗ {y(n)}} = X(z)Y (z) =
(z − a)(z − 1)
µ ¶
1 1 a
= −1
− −1
, |z| > 1
1−a 1−z 1 − az
Heriot-Watt University 149
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Using the linearity property and the standard z-transform pairs, we obtain
that
1 ³ ´
{x(n)} ∗ {y(n)} = u(n) − an+1u(n) , |z| > 1
1−a
Pole-zero ROC plot and the results of convolution
Im
a
1 Re
Result: A discrete-time LTI system is causal if and only if the ROC of its
transfer function is the exterior of a circle including infinity.
Proof: follows from the ROC properties and from the fact that h(n) is a
right-sided sequence.
Result: A discrete-time LTI system is stable if and only if the ROC of its
transfer function H(z) includes the unit circle |z| = 1.
Example:
1
H(z) =
1 − [2r cos θ]z −1 + r2z −2
Im Im
r r
θ 1 Re θ 1 Re
X(z) __
1 Y(z)
B(z) A(z)
N
X −1
−j2π kn
X(k) = x(n) e N DFT
n=0
Proof:
1 X X
N −1 N −1
km
−j2π N j2π kn
x(n) = x(m) e e N
N
k=0 m=0
N
X −1 1 NX
−1 k(m−n)
= x(m) e−j2π N = x(n)
N
m=0 k=0
| {z }
δ(m−n)
Alternative formulation:
N
X −1
−j 2π
X(k) = x(n) W kn ←− W = e N
n=0
N
X −1
1
x(n) = X(k) W −kn
N
k=0
k0 Schematic
W =1 representation
x(0) of DFT
. . . X(k)
k(N-1) Σ
W
x(N-1 )
N
X −1
−j2π kn
X(k) = e N = N δ(k) =⇒
n=0
the rectangular pulse is “interpreted” by the DFT as a spectral line at the
frequency ω = 0
01 4
X(k) , X(ω)
5
0 5 10
0 2π 4π
x(n) zero-padded
signal for DFT (N=10)
1
01 4 9
Y(k) , X(ω)
5
0 5 10
0 2π
Heriot-Watt University 165
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
X = Wx
N=10
10
|DFT(x)|
0
−25 −20 −15 −10 −5 0 5 10 15 20 25
FREQUENCY (HZ)
DFT with N = 15 and zero-padding to 512 points. The signals are still
unresolved because f2 − f1 = 2 Hz < 1/(N ∆t) ' 3.3 Hz
16
N=15
14
12
10
|DFT(x)|
0
−25 −20 −15 −10 −5 0 5 10 15 20 25
FREQUENCY (HZ)
N=30
35
30
25
|DFT(x)|
20
15
10
0
−25 −20 −15 −10 −5 0 5 10 15 20 25
FREQUENCY (HZ)
DFT with N = 100 and zero-padding to 512 points. The signals are well
resolved because f2 − f1 = 2 Hz > 1/(N ∆t) = 0.5 Hz
110
N=100
100
90
80
70
60
|DFT(x)|
50
40
30
20
10
0
−25 −20 −15 −10 −5 0 5 10 15 20 25
FREQUENCY (HZ)
DFT with N = 300 and zero-padding to 512 points. The signals are fine
resolved because f2 − f1 = 2 Hz À 1/(N ∆t) ' 0.17 Hz
N=300
300
250
200
|DFT(x)|
150
100
50
0
−25 −20 −15 −10 −5 0 5 10 15 20 25
FREQUENCY (HZ)
300 N=300
250
200
|DFT(x)|
150
100
50
0
−25 −20 −15 −10 −5 0 5 10 15 20 25
FREQUENCY (HZ)
{x̃(n)} = {. . . , x(0),
| . . . {z
, x(N − 1)}, x(0),
| . . . {z
, x(N − 1)}, . . .}
{x(n)} {x(n)}
where X̃(k) = N Xk
Heriot-Watt University 177
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Remarking that
(k+mN )n
j2π kn
W −kn = e N = ej2π N = W −(k+mN )n
Proof:
−1 N
pn
N
X −1 N
X −1
X
−j2π kn 1 j2π N −j2π kn
x̃(n) e N = X̃(p) e e N
N
n=0 n=0 p=0
N
X −1 1 NX
−1 (p−k)n
= X̃(p) ej2π N = X̃(k)
N
p=0 n=0
| {z }
δ(p−k)
Linearity:
If X(k) = DF T {x(n)}
−j2π km
then X(k)e N = DF T {x ((n − m)mod N ) }
n
n
0 N n
N
X −1 N
X −1
x((n − m)mod N ) W kn = x ((n − m)modN ) W k(n−m+m)
n=0 n=0
NX−1
= W km x((n − m)modN )W k(n−m)
n=0
NX−1
= W km x((n − m)modN )
n=0
· W k(n−m)mod N = W kmX(k)
where we use the facts that W k(l mod N ) = W kl and that the order of
summation in DFT does not change its result
Heriot-Watt University 184
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
If X(k) = DF T {x(n)}
j2π mn
then X((k − m)mod N ) = DFT {x(n)e N }
Parseval theorem:
N
X −1 N
X −1
1
x(n)y ∗(n) = X(k)Y ∗(k) general form
N
n=0 k=0
NX−1 N
X −1
1
|x(n)|2 = |X(k)|2 specific form
N
n=0 k=0
Conjugation:
Circular convolution:
Example (continued):
12 3
x(m)
0 0 0 0
2 2 2
3 3 3
5 5 5
6 6
6 y((-m) modN)
7 4 7 4 7 4
(i.e., n= 0)
1 1 1
0 0 0
2 2 2
3 3 3
5 5 5
6 6 6
7 4 7 4 7 4
y((1-m) modN)
(i.e., n=1)
1 1 1 1
N
X −1 N
X −1
DFT {{x(n)}¯
∗ {y(n)}} = x(m)y((n − m)mod N )W kn
n=0 m=0
| {z }
{x(n)}¯
∗ {y(n)}
N
X −1 N
X −1
= y((n − m)mod N )W knx(m)
m=0 n=0
| {z }
Y (k)W km
N
X −1
= Y (k) x(m)W km = X(k)Y (k)
|m=0 {z }
X(k)
Multiplication:
then X(k)¯
∗ Y (k) = DF T {x(n)y(n)}
In a short notation:
kH
XN (k) = GN/2(k) + WN N/2(k)
where GN/2(k) and HN/2(k) are the N/2-point DFT’s involving x(n)
with even and odd n, respectively
x(0) GN/2 (0) XN (0)
0
x(2) GN/2 (1) WN XN (1)
x(4) N point DFT 1
GN/2 (2) WN XN (2)
2
x(6) GN/2 (3) WN2 XN (3)
N=8
WN3
x(1) HN/2 (0) XN (4)
x(3) HN/2 (1) WN4
N point DFT XN (5)
x(5) HN/2 (2)
WN5
2 XN (6)
x(7) HN/2 (3) WN6
XN (7)
WN7
Heriot-Watt University 197
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Corollary: any N -point DFT with even N can be computed via two
N/2-point DFT’s. In turn, if N/2 is even then each of these N/2-point
DFT’s can be computed via two N/4-point DFT’s and so on. In the case
N = 2r , all N, N/2, N/4 . . . are even and such a process of “splitting”
ends up with 2-point DFT’s!
2-point DFT
4-point DFT
FFT (Cooley and Tukey)
2-point DFT
8-point DFT
2-point DFT
4-point DFT
2-point DFT
16-point DFT
2-point DFT
4-point DFT
2-point DFT
8-point DFT
2-point DFT
4-point DFT
2-point DFT
WN(l+N/2)
Computational complexity: each stage has N complex multiplications and
N complex additions and there are log2N stages =⇒ the total
complexity (additions and multiplications) is
CFFT = N log2N
CDFT = N 2
Heriot-Watt University 200
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
6 DIGITAL FILTERS
6.1 What is Filtering
Definition: Digital filtering is just changing the frequency-domain
characteristics of a given discrete-time signal
Y (ω) = H(ω)X(ω)
x(n) y(n)
H(ω)
h(n) h(n)
FIR IIR
n n
A very general form of digital filter can be obtained from the familiar
equation (recall LTI-systems)
N
X M
X
a(k)y(n − k) = b(k)x(n − k) ARMA
k=0 k=0
where {x(n)} is the filter input signal and {y(n)} is the filter output
signal. As obtained before, the transfer function corresponding to this
equation is the following rational function
PM −k
k=0 b(k)z B(z)
H(z) = PN =
−k A(z)
k=0 a(k)z
• If N = 0, the filter becomes a FIR (nonrecursive) one
• If N > 0, the filter becomes a IIR (recursive) one
Heriot-Watt University 205
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
• lowpass filters (to pass low frequencies from zero to a certain cut-off
frequency ωC and to block higher frequencies)
• highpass filters (to pass high frequencies from a certain cut-off frequency
ωC to π and to block lower frequencies)
• bandpass filters (to pass a certain frequency range [ωmin, ωmax], which
does not include zero, and to block other frequencies)
• bandstop filters (to block a certain frequency range [ωmin, ωmax], which
does not include zero, and to pass other frequencies)
ideal ideal
H(ω) lowpass H(ω) highpass
0 ωC π ω 0 ωC π ω
ideal ideal
H(ω) bandpass H(ω) bandstop
passband
region
stopband
region
δ3
ωP ωS π
Heriot-Watt University 208
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Definition: The quantity max{δ1, δ2} is called passband ripple, and the
quantity δ3 is called stopband attenuation
These filter parameters are usually specified in dB:
passband passband
region 1 passband region
region 2
stopband stopband
stopband region 1 region 2
region
δ3
ωP1 ωS1 ωS 2 ωP2 π ωS1 ωP ωP ωS π
1 2 2
H(ω) = |H(ω)|ejΨ(ω)
where
Ψ = angle{H(ω)} ← phase response
Definition: If a signal is transmitted through a system (filter) then this
system is said to provide a distortionless transmission if the signal form
remains unaffected, i.e., if the output signal is a delayed and scaled replica
of the input signal.
1.5
1
1
0.5
0.5
0
−0.5
−0.5
−1
−1
−2 −2
0 100 200 300 400 500 600 700 800 900 1000 0 100 200 300 400 500 600 700 800 900 1000
τ (ω) = τ = const
or, in terms of f ,
(
e−jπf N , 0 ≤ f ≤ 0.125
H(f ) =
0, otherwise
1.4
0.25
1.2
0.2
0.1
0.05 0.8
0.6
−0.05
−0.1
0.4
−0.15
−0.2
0.2
−0.25
0
0 1 2 3 4 5 6 7 8 9 10 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
TIME INDEX FREQUENCY
1.4
0.25
1.2
0.2
0.1
0.05 0.8
0.6
−0.05
−0.1
0.4
−0.15
−0.2
0.2
−0.25
0
0 5 10 15 20 25 30 35 40 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
TIME INDEX FREQUENCY
1.4
0.25
1.2
0.2
0.1
0.05 0.8
0
0.6
−0.05
−0.1
0.4
−0.15
−0.2
0.2
−0.25
0
0 20 40 60 80 100 120 140 160 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
TIME INDEX FREQUENCY
-0.09
Heriot-Watt University 223
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Window properties:
• windows are always real and symmetric, i.e., they must satisfy
for either even or odd N . If the ideal FIR filter has linear phase, symmetric
windows do not affect this property.
• windows must be positive to avoid any changes of sequence polarities
• a “good” window must satisfy the tradeoff between the width of the
mainlobe and the magnitudes of the sidelobes in the frequency domain
• a “good” window must have a smooth transition at the edges of sequence
in order to reduce the truncation effect
• the window length must correspond to the sequence length
Classical window types (have been derived based on intuition and educated
guesses):
• Rectangular window (corresponds to the natural truncation like in the
impulse response truncation method!)
(
1, 0 ≤ n ≤ N − 1
w(n) =
0, otherwise
0.9
0.8
0.7
−50
BARTLETT WINDOW
0.6
W(f) (DB)
0.5
0.4
−100
0.3
0.2
0.1
0 −150
0 5 10 15 20 25 30 35 40 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
SAMPLE INDEX FREQUENCY
n o
W (f )[dB] = 10 log10 |W (f )|2 = 20 log10 {|W (f )|}
Heriot-Watt University 227
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
• Hamming window
(
0.54 − 0.46 cos[2πn/(N − 1)] , 0 ≤ n ≤ N − 1
w(n) =
0, otherwise
• Blackman window
( h i h i
0.42 − 0.5 cos N2πn
−1 + 0.08 4πn , 0 ≤ n ≤ N − 1
N −1
w(n) =
0, otherwise
1
0
0.9
0.8
0.7
−50
HANNING WINDOW
0.6
W(f) (DB)
0.5
0.4
−100
0.3
0.2
0.1
0 −150
0 5 10 15 20 25 30 35 40 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
TIME SAMPLE INDEX FREQUENCY
1
0
0.9
0.8
0.7
−50
HAMMING WINDOW
0.6
W(f) (DB)
0.5
0.4
−100
0.3
0.2
0.1
0 −150
0 5 10 15 20 25 30 35 40 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
TIME SAMPLE INDEX FREQUENCY
1
0
0.9
0.8
0.7
−50
BLACKMAN WINDOW
0.6
W(f) (DB)
0.5
0.4
−100
0.3
0.2
0.1
0 −150
0 5 10 15 20 25 30 35 40 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
TIME SAMPLE INDEX FREQUENCY
1
0
0.9
0.8
DOLPH−CHEBYSHOV WINDOW
0.7
−50
0.6
W(f) (DB)
0.5
0.4
−100
0.3
0.2
0.1
0 −150
0 5 10 15 20 25 30 35 40 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
TIME SAMPLE INDEX FREQUENCY
1
0
0.9
0.8
DOLPH−CHEBYSHEV WINDOW
0.7
−50
0.6
W(f) (DB)
0.5
0.4
−100
0.3
0.2
0.1
0 −150
0 5 10 15 20 25 30 35 40 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
TIME SAMPLE INDEX FREQUENCY
Now, let us take Dolph-Chebyshev window and design the lowpass filter
using the window method with N = 11, N = 41, and N = 161.
Remember that
sin(π(n − 0.5N )/4)
hid(n) =
π(n − 0.5N )
We take the window length equal to the length of hid(n).
1.4
0.25
1.2
TRUNCATED AND WINDOWED INPULSE RESPONSE
0.2
0.1
0.05 0.8
0.6
−0.05
−0.1
0.4
−0.15
−0.2
0.2
−0.25
0
0 1 2 3 4 5 6 7 8 9 10 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
TIME SAMPLE INDEX FREQUENCY
1.4
0.25
1.2
TRUNCATED AND WINDOWED INPULSE RESPONSE
0.2
0.1
0.05 0.8
0.6
−0.05
−0.1
0.4
−0.15
−0.2
0.2
−0.25
0
0 5 10 15 20 25 30 35 40 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
TIME SAMPLE INDEX FREQUENCY
0.25
1.2
TRUNCATED AND WINDOWED INPULSE RESPONSE
0.2
0.1
0.05 0.8
0
0.6
−0.05
−0.1
0.4
−0.15
−0.2
0.2
−0.25
0
0 20 40 60 80 100 120 140 160 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
TIME SAMPLE INDEX FREQUENCY
ω0 ω
Heriot-Watt University 240
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
2
POLES OF H(s)
Im (s) Im (s)
N=3 N=4
ω0
Re (s) Re (s)
POLES OF H(s)
N=3 Im (s) N=4 Im (s)
Re (s) Re (s)
ωp ωs ω ωp ωs ω
Heriot-Watt University 244
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
• the s-plane poles and the transfer function of Chebyshev filter can be
obtained in the way similar to that for Butterworth filter
• other analog filter structures are known, such as Bessel and elliptic filters
• an important question is what kind of transformation can be used to
obtain digital IIR filters from the corresponding analog filters
ω = 2arctan(ωa ∆t 2)
ωd
π
ωa
−π
Heriot-Watt University 248
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Another method of IIR filter design does not require analog filter design
and exploits the ARMA model
Minimizing
Z π ¯ PM −jωk ¯2
2 ¯ k=0 b(k)e ¯
|²| = ¯Hid(ω) − PN ¯ dω
−jωk
−π k=0 a(k)e
we obtain desired filter parameters a(k), k = 1, . . . , N and b(k),
k = 1, . . . , M
Efficient numerical optimization methods can be formulated to minimize
this function
unit delay
x(n) y(n)=x(n- 1)
∆t
BASIC
adder/summator BUILDING
x1(n) BLOCKS
x2(n) y(n) = x1(n)+x2(n)+x3(n)
+
x3(n)
multiplier by a constant
x(n) a y(n) = a x(n)
Heriot-Watt University 253
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
∆t
b(1)
Heriot-Watt University 254
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
x(n) y(n)
+
∆t
- a(1)
Heriot-Watt University 255
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
∆t
b(M- 1)
∆t
b(M)
Heriot-Watt University 256
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
∆t
b(1) -a(1)
+
∆t
∆t
b(M) + -a(M )
Heriot-Watt University 257
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
PX (x) = Probability{X ≤ x}
x1 x2 x
Heriot-Watt University 259
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Sample variance:
N
X −1
2 1
σ̂X = (x(n) − m̂X )2
N −1
n=0
The weighting 1/N − 1 is used instead of 1/N to make the sample
variance unbiased:
2 } = σ2
E{σ̂X X
For the complex random variable:
2 = E{(X − E{X})∗(X − E{X})}
var{X} = σX
= E{|X|2} − |E{X}|2
R = E{XXT }
R = E{XXH }
w1 w2 w3 wN
y(n)
Σ
The weight vector
W = (w1, w2, . . . , wN )T
is tuned according to some adaptation criterion
Observations vector
Rn = E{n(n)nH (n)}
Wopt = αR−1
n aS ←− Wiener filter
Adaptive algorithm:
where we assume that the observation Xk does not contain the desired
signal (this assumption can be relaxed later)
Vk+1 = [I − µRn] Vk
Equivalently, the kth power of the matrix I − µRn must become zero as
k becomes large. This is equivalent to the condition
2
0<µ<
λmax
where λmax is the maximal eigenvalue of Rn.
x(n) = exp(j2πf
| {z S n)} + 100
| exp(j2πf
{z I n)
} + ξ(n)
|{z}
desired signal interference noise
15
10 OPTIMAL SNR
5 MU3
MU2
0
SNR (DB)
MU1
−5
−10
−15
−20
−25
−30
0 1000 2000 3000 4000 5000 6000 7000
NUMBER OF ITERATION
−10
−30
−40
−50
−60
−70
−80
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
FREQUENCY
ω1 ω2 ω
Periodogram:
1¯¯ N
X −1 ¯2
−jωn ¯
P̂p(ω) = ¯ x(n)e ¯
N
n=0
Example:
x(n) = A exp(j2πfS n) + ξ(n)
where fS = 0.3 and ξ is zero-mean unit-variance complex noise.
Periodogram (A = 1, N = 100)
150
100
PERIODOGRAM
50
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
FREQUENCY
Periodogram (A = 1, N = 1000)
1000
900
800
700
600
PERIODOGRAM
500
400
300
200
100
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
FREQUENCY
Periodogram (A = 1, N = 10000)
250
200
150
PERIODOGRAM
100
50
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
FREQUENCY
6
PERIODOGRAM
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
FREQUENCY
12
10
PERIODOGRAM
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
FREQUENCY
3.5
2.5
PERIODOGRAM
1.5
0.5
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
FREQUENCY
1¯¯ M
X −1 ¯2
¯
P̂l (ω) = ¯ xl (n)e−jωn¯
M
n=0
Heriot-Watt University 284
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
10
AVERAGED PERIODOGRAM
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
FREQUENCY
Remark: There are many other advanced spectral analysis methods which
perform significantly better than the periodogram methods
3.5
3
WELCH PERIODOGRAM
2.5
1.5
0.5
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
FREQUENCY
Useful property:
r(−k) = r∗(k)
The two definitions of the power sprectral density are identical if r(k)
decays sufficiently fast.
Heriot-Watt University 288
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Correlogram:
N
X −1
P̂c(ω)= r̂(k)e−jωk
k=−N +1
where we can use either unbiased or biased estimates of r(k).
Unbiased estimate:
(
1 PN −1 x(i)∗x(i − k) , k ≥ 0
r̂(k)= N −k i=k
r̂∗(−k) , k<0
Unbiased estimate:
1
r̂(0) = [x(0)∗x(0) + x(1)∗x(1) + x(2)∗x(2) + x(3)∗x(3)]
4
1
r̂(1) = [x(1)∗x(0) + x(2)∗x(1) + x(3)∗x(2)]
3
1
r̂(2) = [x(2)∗x(0) + x(3)∗x(1)]
2
r̂(3) = x(3)∗x(0)
Biased estimate:
(
1 PN −1 x(i)∗x(i − k) , k ≥ 0
r̂(k)= N i=k
r̂∗(−k) , k<0
Prof of bias:
N
X −1 N
X −1
1 ∗ 1 N −k
E{r̂(k)} = E{x(i) x(i − k)} = r(k) = r(k)
N N N
i=k i=k
Biased estimate:
1
r̂(0) = [x(0)∗x(0) + x(1)∗x(1) + x(2)∗x(2) + x(3)∗x(3)]
4
1
r̂(1) = [x(1)∗x(0) + x(2)∗x(1) + x(3)∗x(2)]
4
1
r̂(2) = [x(2)∗x(0) + x(3)∗x(1)]
4
1
r̂(3) = x(3)∗x(0)
4
The signal y(m) can be viewed as the output of the filter with the transfer
function
NX−1
1
X(ω) = √ x(k)e−jωk
N k=0
Relationship between filter input and output PSD’s:
∞
X
Py (ω) = |X(ω)|2P²(ω)= |X(ω)|2 r²(k)e−jωk
k=−∞
∞
X
= |X(ω)|2 δ(k)e−jωk = |X(ω)|2
k=−∞
¯ ¯2
¯NX−1 ¯
1 ¯¯ −jωn
¯
¯ =P̂p(ω)
= x(n)e
N ¯¯ ¯
¯
n=0
Heriot-Watt University 295
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Summarizing, we have proven the following two equalities for the spectrum
of the auxiliary signal y(n):
P̂p(ω) = P̂c(ω)
• r̂(k) is a poor estimate for higher lags k. Hence, let us truncate it (use
M ¿ N points)
• Let us use some lag window
M
X −1
P̂BT (ω) = w(k)r̂(k)e−jωk
k=−M +1
compressed orthonormal
signal basis original
signal
=
Original signal:
Compression:
where
M N
=
L Nc
and T is the M × L transformation matrix. The signal X can be
interpreted as a vector of coefficients of expansion using orthonormal basis
T:
x̃ = TX
Heriot-Watt University 300
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
Signal reconstruction:
orthonormal
recovered basis
signal compressed
= signal
transmission
x(n) or storage ~
x(n)
compression reconstruction
TH of T
compressed
data
Heriot-Watt University 301
Dept. Electrical, Electronic, and Computer Engineering
ELEC ENG, Edinburgh 2007
SVD of a N × N matrix
N
X
R= λiUiViH λ1 ≥ λ2 ≥ . . . ≥ λN
i=1
Compressed representation
M
X
R' λiUiViH , M <N
i=1
1.5
1
ORIGINAL SIGNAL
0.5
−0.5
−1
−1.5
−2
−2.5
100 200 300 400 500 600 700 800 900 1000
DISCRETE TIME
1.5
1
RECONSTRUCTED SIGNAL
0.5
−0.5
−1
−1.5
−2
−2.5
100 200 300 400 500 600 700 800 900 1000
DISCRETE TIME
1.5
1
RECONSTRUCTED SIGNAL
0.5
−0.5
−1
−1.5
−2
−2.5
100 200 300 400 500 600 700 800 900 1000
DISCRETE TIME
CONCLUSIONS
• many of you will work on DSP problems in future
• when working with digital signals, do not forget their sampling rate!
• we considered only the most general topics of DSP
• to broaden and deepen your knowledge in specific DSP topics, an
advanced DSP course might be needed
• DSP makes fun!