KVR-DSP-UNIT 1
KVR-DSP-UNIT 1
Introduction
The Taxonomy of Signals
Signal: A function that conveys information
Amplitude
Continuous Discrete
Continuous continuous-time
analog signals
signals
Time
discrete-time
Discrete digital signals
signals
Signal
Signal
signal Processing
Processing output
System
System
Linear
Linear Shift-Invariant
Shift-Invariant Systems.
Systems.
In particular, we’ll discuss
Linear
Linear Shift-Invariant
Shift-Invariant Discrete-Time
Discrete-Time Systems.
Systems.
6 May 24, 2025
Discrete-Time Signals and Systems
Discrete-Time Signals---
Sequences
Representation by a Sequence
x {x[n]}, n
x[n]
3 4 5 6 7 n
-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 8 9 10
[n]
1 n 0 1
[n]
0 n 0 n
-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n
-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n
-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
1 for n 0 Fact:
u[n]
0 for n 0 [n] u[n] u[n 1]
u[n]
n
-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n
δ[n]
-8 -7 -6 -5 -4-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
u[n-1] n
-8 -7 -6 -5 -4-3 -2 -10 1 2 3 4 5 6 7 8 9
n
-8 -7 -6 -5 -4-3 -2 -1 1 2 3 4 5 6 7 8 9 010
x[n]
...
... n
-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
x[n]
N
2 k 2 must be a rational
0 N 2 k 0 0 number
17 May 24, 2025
Energy of a Sequence
Energy of a sequence is defined by
n
E | x[n] | 2
n
x { x[n]}
Shift
y[n] x[n n0 ]
19 May 24, 2025
Sequence Representation
using delay unit
x[n] x[k ] [n k ]
k
x[n]
a-3
a1
2 7 n
-8 -7 -6 -5 -4 -3 -2 -1 0 1 3 4 5 6 8 9 10
a2 a7
Linear Shift-Invariant
Systems
Systems
x(n) Are
Are these
TT[[]systems
these ]systems linear?
linear?
y(n)=T[x(n)]
2
A Memoryless System y (n) [ x(n)]
Is
Is this
this system
system linear?
linear?
26 May 24, 2025
Linear Systems
x(n)
x(n) x(k )(n k ) TT[[]] y(n)=T[x(n)]
y (n) T x(k )(n k )
k k
y (n) x(k ) T [ (n k )] x(k ) hk (n)
k k
Delayed Impulse
as input
x(n) y(n)
x(n-1) y(n-1)
x(n-2) y(n-2)
x(n) y(n)=T[x(n)]
TT[[]]
x(n-k) y(n-k)
x(n) y(n)
0
Delayed
Delayed input
input 0
y(n-1)
x(n-1) produces
produces
0
x(n-2) Delayed
Delayed 0
y(n-2)
Response
Response
29 0 0
May 24, 2025
Shift-Invariant Systems
y(n)=T[x(n)]
x(n) : Input
T[x(n)] : Output due to input
x(n-k) :Delayed input
T[x(n-k)]: Output due to
y(n) : Output delayed input
y(n-k) : Delayed output
y(n-k)=T[x(n-k)]
If delayed output is equal to output due to delayed input
then system is said to be Shift-invariant
Shift-Invariant Systems
y(n)=T[x(n)]
If x[n] [n] : Impulse as input then
y[n] T { [n]} h[n] :impulse response of the
system
x(n)
x(n) x(k )(n k ) TT[[]] y(n)=T[x(n)]
y (n) T x(k )(n k )
k k
y (n) x(k )T [(n k )] x(k )h(n k )
k k
Delayed Impulse Delayed Impulse
as input Response
x(n)
x ( n) x ( k ) ( n k ) TT[[]] y(n)=T[x(n)]
y (n) T x(k ) (n k )
k k
y (n) x(k )T [(n k )] x(k )h(n k )
k k
Response due to Delayed impulse
Delayed impulse Response
0 0
x(n) h(n)
h(n) x(n)*h(n)
Convolution is Commutative
x(n) hh11(n)
(n) hh22(n)
(n) y(n)
x(n) hh22(n)
(n) hh11(n)
(n) y(n)
x(n) hh11(n)*h
(n)*h22(n)
(n) y(n)
These
These three
three systems
systems are
are
identical.
identical.
Convolution is Associate
38 May 24, 2025
Properties of Convolution
hh11(n)
(n)
x(n) + y(n)
hh22(n)
(n)
x(n) hh11(n)+h
(n)+h22(n)
(n) y(n)
These
These two
two systems
systems are
are identical.
identical.
Convolution is Distributive
39 May 24, 2025
y (n) x(k )h(n k )
k
n
-1 0 1 2 3 4 5 6
k k
0 1 2 3 4 5 6 -1 0 1 2 3 4 5
h[-1-k] h[-k]
k k
-3 -2 -1 0 1 2 3 4 5 6 7 -2 -1 0 1 2 3 4 5 6 7
y ( 1) x(k )h( 1 k ) 3.1 3
k
43 May 24, 2025
x(n) {3, 2,1, 2} and h[n] {1, 2,1, 2}
y (n) x(k )h(n k )
Example.1 k
h[k]
x[k]
k k
0 1 2 3 4 5 6 -1 0 1 2 3 4 5
h[-k]
k
-2 -1 0 1 2 3 4 5 6 7
y (0) x(k )h( k ) 3.2 2.1 6 2 8
k
44 May 24, 2025
x(n) {3, 2,1, 2} and h[n] {1, 2,1, 2}
y (n) x(k )h(n k )
Example.1 k
h[k]
x[k]
k k
0 1 2 3 4 5 6 -1 0 1 2 3 4 5
h[1-k]
k
-2 -1 0 1 2 3 4 5 6 7
y (1) x(k )h(1 k ) 3.1 2.2 1.1 8
k
45 May 24, 2025
x(n) {3, 2,1, 2} and h[n] {1, 2,1, 2}
y (n) x(k )h(n k )
Example.1 k
h[k]
x[k]
k k
0 1 2 3 4 5 6 -1 0 1 2 3 4 5
h[2-k]
k
-2 -1 0 1 2 3 4 5 6 7
y (2) x(k )h(2 k ) 3.2 2.1 1.2 2.1 12
k
46 May 24, 2025
x(n) {3, 2,1, 2} and h[n] {1, 2,1, 2}
y (n) x(k )h(n k )
Example.1 k
h[k]
x[k]
k k
0 1 2 3 4 5 6 -1 0 1 2 3 4 5
h[3-k]
k
-2 -1 0 1 2 3 4 5 6 7
y (3) x(k )h(3 k ) 2.2 1.1 2.2 9
k
47 May 24, 2025
x(n) {3, 2,1, 2} and h[n] {1, 2,1, 2}
y (n) x(k )h(n k )
Example.1 k
h[k]
x[k]
k k
0 1 2 3 4 5 6 -1 0 1 2 3 4 5
h[4-k]
k
-2 -1 0 1 2 3 4 5 6 7
y (4) x(k )h(4 k ) 1.2 2.1 4
k
48 May 24, 2025
x(n) {3, 2,1, 2} and h[n] {1, 2,1, 2}
y (n) x(k )h(n k )
Example.1 k
h[k]
x[k]
k k
0 1 2 3 4 5 6 -1 0 1 2 3 4 5
h[5-k]
k
-2 -1 0 1 2 3 4 5 6 7
y (5) x(k )h(5 k ) 2.2 4
k
49 May 24, 2025
x(n) {3, 2,1, 2} and h[n] {1, 2,1, 2}
y (n) x(k )h(n k )
Example.1 k
y[n
]
n
-1 0 1 2 3 4 5 6
a n n 0
h(n) y(n)=?
0 n0
0 1 2 3 4 5 6 n
0 1 2 3 4 5 6 n
x(k)
k
0 1 2 3 4 5 6
h(k) k
0 1 2 3 4 5 6
h(0k)
k
0 1 2 3 4 5 6
x(k)
k
0 1 2 3 4 5 6
compute y(0)
h(0k)
k
0 1 2 3 4 5 6
compute y(1)
h(1k)
k
0 1 2 3 4 5 6
How to computer y(n)?
53 May 24, 2025
Example
Two
Two conditions
conditions have
have to
to be
be considered.
considered.
y (n) x(n) * h(n) x(k )h(n k )
k n<N
n<N and
and nN.
nN.
x(k)
k
0 1 2 3 4 5 6
compute y(0)
h(0k)
k
0 1 2 3 4 5 6
compute y(1)
h(1k)
k
0 1 2 3 4 5 6
How to computer y(n)?
54 May 24, 2025
Example
y (n) x(n) * h(n) x(k )h(n k )
k
n<N
( n 1) n 1
n n
1 a a a
y (n) a n k a n a k a n 1
k 0 k 0 1 a 1 a 1
nN
N1 N1 N n n N
1 a a a
y (n) a n k a n a k a n 1
k 0 k 0 1 a 1 a 1
55 May 24, 2025
Example
y (n) x(n) * h(n) x(k )h(n k )
k
5
4 n<N
3
( n 1) n 1
2
n n
1 a a a
1 y (n) a n k a n a k a n 1
0 k 0 k 0 1 a 1 a 1
0 5 10 15 20 25 30 35 40 45 50
nN
N1 N1 N n n N
1 a a a
y (n) a n k a n a k a n 1
k 0 k 0 1 a 1 a 1
56 May 24, 2025
Impulse Response of
the Ideal Delay System
(n
(n nndd))
0 1 2 3 4 5 6 n nd
n
57 May 24, 2025
Impulse Response of
the Ideal Delay System
(n
(n nndd))
0 1 2 3 4 5 6 n nd n
1
for M 1 n M 2
h(n) M 1 M 2 1
0 otherwise
... ...
M1 0 M2
Sequence
Sequence of
of (n
(n k)
k)
n
59 May 24, 2025
Impulse Response of
the Accumulator
n
Accumulator y ( n) x ( k )
k
n
h(n) (k ) u (n)
k
...
n
Unit-step
Unit-step function
function
0
S | h( k ) |
k
| y (n) | h(k )x(n k ) M | h(k ) |
k k
h* ( n)
h(n) 0
Define x(n) | h( n) |
0 h(n) 0
| h ( k ) |2
y ( 0) x ( k ) h ( k ) S
k k | h( k ) |
h(n) 0 for n 0
1
S | h(k ) | a k
k k 0 1 a
Example:
Check the following systems for stability and
causality
Example:
Check the following systems for stability and
causality
y (n) x[n]
2
Squarer
y (n) x(n nd )
Solution
If x[n] M then
M2
1 ( M 1 M 2 1) M
y[n]
M 1 M 2 1 k M1
M
M1 M 2 1
M
Accumulator y ( n) x ( k )
k
Solutions
Linear Constant-Coefficient
Difference Equations
Nth Order Difference Equations
N M
a
k 0
k y (n k ) bk x(n k )
k 0
Examples:
Ideal Delay System y (n) x(n nd )
1 M
Moving Average y ( n)
M 1 k 0
x(n k )
a
k 0
k y (n k ) bk x(n k )
k 0
N M
ak bk
y (n) y (n k ) x(n k )
k 1 a0 k 0 a0
1 M
h( n)
M 1 k 0
(n k )
1
u (n) u (n M 1)
M 1
1
(n) (n M 1)* u (n)
M 1
77 May 24, 2025
The Moving Average
1 M
y ( n)
M 1 k 0
x(n k )
1
h( n) (n) (n M 1) * u (n)
M 1
x(n Attenuator y(n
) 1 ++ Accumulator )
M 1
_ system
M+1 sample
delay
78 May 24, 2025
Discrete-Time Signals and Systems
Frequency-Domain
Representation of
Discrete-Time Signals and
Systems
Sinusoidal and Complex
Exponential Sequences
h(k )e jk e jn
h(n)
h(n) k
j jn
H (e )e
80 May 24, 2025
Frequency Response
H ( e j ) j j n
e j n H (e )e
Eigen value
Eigen function
H ( e j ) h ( k ) e j k
k
k
H (e j ) H R (e j ) jH I (e j )
j j H ( e j )
H (e ) | H (e ) | e
Phase
magnitude
82 May 24, 2025
Example:
The Ideal Delay System
Magnitude | H (e j ) |1
Phase H (e j ) nd
H (e j ) e jnd
A A A A
x ( n ) e j e j 0 n e j e j 0 n y ( n ) e j e j 0 n e j 0 n d e j e j 0 n e j 0 n d
2 2 2 2
A A
e j e j 0 ( n n d ) e j e j 0 ( n n d )
2 2
k
h(k )e jk
k
H ( e j )
85 May 24, 2025
Periodic Nature of
Frequency Response
H (e j ) H (e j ( 2 m ) )
H (e j ) h(k )e jk
k m 0, 1, 2,
| H ( e j ) |
4 3 2 2 3 4
86 May 24, 2025
Periodic Nature ofGenerally, we choose
Frequency Response
To represent one period in
frequency domain.
j j ( 2 m )
H (e ) H (e )
H (e ) h( k )e
j jk
k m 0,1,2,
| H ( e j ) |
High Low High
Frequency Frequency Frequency
88 May 24, 2025
Ideal Frequency-Selective Filters
| H ( e j ) |
Lowpass Filter 1
c c
Highpass Filter | H ( e j ) |
1
c c
Bandstop Filter
j
1
| H (e ) |
b a a b
Bandpass Filter j
1
| H (e ) |
90
b a a b
May 24, 2025
Moving Average
1 M H (e ) h(k )e jk
j
y ( n)
M 1 k 0
x(n k ) k
1 M 1 1 e j( M 1)
M 1 k 0
e jk M 1 1 e j
1 M
h( n)
M 1 k 0
(n k )
1 e j( M 1) / 2 (e j( M 1) / 2 e j( M 1) / 2 )
j / 2 j / 2 j / 2
M 1 e (e e )
1 jM / 2 (e j( M 1) / 2 e j( M 1) / 2 )
e j / 2 j / 2
M 1 (e e )
h(n)
1 jM / 2 sin[ ( M 1) / 2]
0 n 0 M n e
M 1 sin( / 2)
91 May 24, 2025
Moving Average
j 1 jM / 2 sin[ ( M 1) / 2]
H (e ) e
M 1 sin( / 2)
j 1 sin[ ( M 1) / 2]
| H (e ) |
M 1 sin( / 2)
j 1 jM / 2 sin[ ( M 1) / 2]
H (e ) e 1.5
M 1 1
sin( / 2)
0.5
0
-4 -3 -2 -1 0 1 2 3 4
j 1 sin[ ( M 1) / 2]
-0.5
| H (e ) |
M 1 sin( / 2)
1
0.5
0
-4 -3 -2 -1 0 1 2 3 4
-0.5
-1
Representation of
Sequences by
Fourier Transform
Fourier Transform Pair
Synthesis
1
x(n) X (e j )e jn d Inverse Fourier Transform
2 (IFT)
Analysis
n
X ( e j ) x ( n ) e j n Fourier Transform
n
(FT)
2
n
X (e ) x ( n )e
j j n
j ( n m )
n=m e
d 2
n
1
x(n) X (e j )e jn d
2
1 m
x(m)e jm e jn d
2 m
1 m
e d
2 m
x ( m ) e jm jn
1 m
2 m
x(m) e j( n m ) d
2
n
X (e ) x ( n )e
j j n
nm
j ( n m )
e d
n
1
j ( n m )
e dj(n m)
1 j ( n m)
x(n) X (e j )e jn d
2
1
j ( n m)
e j( n m )
1 m
x(m)e jm e jn d
2 m
m
1
j ( n m)
e j ( n m ) e j ( n m )
1
e d
2 m
x ( m ) e jm jn
1
2 j sin (n m)
1 m
j ( n m)
2 m
x(m) e j( n m ) d
2 sin (n m)
0
97 ( n m)
May 24, 2025
1
Prove x ( n ) X ( e ) e d
j jn
2
n
X ( e ) x ( n ) e j n
j
n
1
x(n) X (e j )e jn d
2
1 m
x(m)e jm e jn d
2 m
1 m
e d
2 m
x ( m )
e jm jn
= x(n)
1 m
2 m
x(m) e j( n m ) d
j j j
X (e ) X R (e ) jX I (e )
j X ( e j )
X I (e )
Magnitude Phase | X ( e j ) |
X ( e j )
j X R ( e j )
X (e j ) | X (e j ) | e jX ( e )
Symmetry Properties
of Fourier Transform
Conjugate-Symmetric and
Conjugate-Anti symmetric Sequences
Conjugate-Symmetric Sequence
Conjugate-Antisymmetric Sequence
X e (e j ) 12 [ X (e j ) X * (e j )] X o (e j ) 12 [ X (e j ) X * (e j )]
Conjugate-Symmetric Function
Conjugate-Antisymmetric Function
j * j
X o (e ) X (eo ) Called an odd function if
it is real.
106
May 24, 2025
Symmetric Properties
F j F j
1. x(n) X (e ) x( n) X (e )
x( n)e
n
jn
x ( n ) e j n X ( e j )
n
magnitude magnitude
phase phase
107
May 24, 2025
Symmetric Properties
F j F * j
2. x(n) X (e ) x * (n) X (e )
*
x * (n)e j n
x(n)e
j n *
x(n)e jn X * (e j )
n n n
magnitude magnitude
phase phase
108 May 24, 2025
Symmetric Properties
F j F
3. x(n) X (e ) x * ( n) X * (e j )
x * ( n)e j n
x( n)e x(n)e X * (e
j n * j n * j
)
n n n
magnitude magnitude
phase phase
109 May 24, 2025
Symmetric Properties
F
x(n) X (e j )
F j
4. Re{x(n)} X e (e ) Re{x(n)} 12 [ x(n) x * (n)]
1
2 [ x(n) x * (n)] F 12 [ X (e j ) X * (e j )]
6. xe (n) F X R (e j )
xe (n) 12 [ x(n) x * ( n)]
1
2 [ x(n) x * ( n)] F 12 [ X (e j ) X * (e j )]
7. xo ( n) F jX I (e j )
xo (n) 12 [ x(n) x * ( n)]
1
2 [ x(n) x * ( n)] F 12 [ X (e j ) X * (e j )]
magnitude
Facts:
1. real part is even X R (e j ) X R (e j )
j j
2. Img. part is odd X I (e ) X I (e )
phase j j
|
3. Magnitude is even IX ( e ) || X I ( e )|
Fourier Transform
Properties
1. Linearity
F j j
a x(n) b y (n) a X (e ) b Y (e )
[
n
ax ( n ) by ( n ) ]e jn
a x
n 1
( n ) e jn
b y
n 1
( n ) e jn
j j
aX (e ) bY (e )
jnd j
e X (e )
115 May 24, 2025
3. Frequency Shifting Signal Modulation
j 0 n F j ( 0 )
e x(n) X (e )
F [e j0 n x(n)] e j0 n x(n)e jn
n
x ( n ) e j ( 0 ) n
n
X ( e j ( 0 ) )
116
May 24, 2025
4. Time Reversal
F j
x( n) X (e )
F [ x( n)] x( n)e jn
n
x ( n )e j ( ) n
n
X ( e j )
117
May 24, 2025
5. Differentiation in Frequency
d F
nx(n) j X ( e j )
d
F [nx(n)] nx(n)e jn
n
1
de jn
j
n
x ( n)
d
d d
j
d n
x ( n ) e jn
j
d
X ( e jn )
118 May 24, 2025
6. The Convolution Theorem
y (n) x(k )h(n k ) F Y (e j ) X (e j ) H (e j )
k
j ( n k )
F [ y (n)] y (n)e j n
x(k ) h(n)e
n k n
jn jn
x(k )h(n k ) e x ( k )e j k
h ( n )e
n k k n
jn X ( e j ) H ( e j )
x(k ) h(n k )e
k n
119 May 24, 2025
7. The Modulation or Windowing Theorem
1
y (n) x(n) w(n) Y (e ) X (e j )W (e j ( ) )d
F j
2
1
Y (e ) w(n) x(n)e
j jn
X (e j )W (e j ( ) )d
n 2
1
w(n) X (e j )e jn d e jn
2 n
1 j ( ) n
w(n) X (e )e
j
d
2 n
1 j j ( ) n
X (e ) w(n)e d
120
2
n May 24, 2025
Parseval’s Theorem
1
n
x(n) y * (n) X (e j )Y * (e j )d
2
2
1
n
x ( n) y * ( n)
2
n
X ( e j
)Y ( e j ( )
)d
| x ( n) | 2
x ( n) x * ( n) 1
X ( e j
) X *
( e j
) d
n n
2
1
1
x * ( n) X ( e j
) e j n
d
j
d
2
2 | X ( e ) |
n
2
1
j n
2
X ( e ) j
n
x * ( n )e
d
*
1 j
jn
2
X ( e )
n
x ( n )e
d
122 May 24, 2025
Example: Ideal Lowpass Filter
H ( e j ) 1 c
h(n) H (e j )e jn d
2 c
1 c jn
e d
2 c
1 c jn
c c
2 jn c
e d ( j n )
c
1
j1 for | | c e jn
H (e ) 2 jn c
0 for c sin c n
n
123 May 24, 2025
Example: Ideal Lowpass Filter
0.6
0.4
0.2
-0.2
-60 -40 -20 0 20 40 60
124 May 24, 2025
Example: Ideal Lowpass Filter
0.4
sin c n jn
M
H (e )
j
e
0.2
n M n
0
-0.2
-60 -40 -20 0 20 40 60
125 May 24, 2025
Example: Ideal Lowpass Filter
2
M=3
1
-1
-4 -3 -2 -1 0 1 2 3 4
2
M=5
1
M
sin c n jn
H (e )
j 0
e
n M n -1
-4 -3 -2 -1 0 1 2 3 4
2
M=19
1
-1
-4 -3 -2 -1 0 1 2 3 4
126 May 24, 2025
Discrete-Time Signals and Systems
Existence of Fourier
Transform
Key Issue Does X(ej) exist
for all ?
Synthesis
1
x ( n ) X ( e j ) e j n d
2
We need that |
Analysis X(ej)| < for all
X ( e j ) x ( n ) e j n
n
| x(n) |
n
| X (e j ) | for all
j
| X (e ) | x ( n)e
n
jn
| x ( n)e
n
jn
|
| x
n
( n ) || e jn
|
| x ( n) |
n
129 May 24, 2025
More On Convergence
M
Define X M ( e j ) x ( n ) e jn
n M
Uniform Convergence
lim | X (e j ) X M (e j ) |0
M
Mean-Square Convergence
j j 2
lim | X ( e ) X M ( e ) | 0
M
130 May 24, 2025
Discrete-Time Signals and Systems
Important Transform
Pairs
Fourier Transform Pairs
Sequence Fourier Transform
1. (n) 1
2. (n nd ) e j n d
1
3. n
a u ( n) (| a | 1)
1 ae j
1
4. u (n) j
( 2k )
1 ae k
1
5. n
(n 1)a u (n)
(1 ae j ) 2
132 May 24, 2025
Fourier Transform Pairs
sin c n j1 | | c
8. X (e )
n 0 c | |
1 0 n M sin[ ( M 1) / 2] jM / 2
9. x(n) e
0 otherwise sin( / 2)
133 May 24, 2025
Fourier Transform Pairs