Professional Documents
Culture Documents
DSP Chap2
DSP Chap2
DSP Chap2
清大電機系林嘉文
cwlin@ee.nthu.edu.tw
03-5731152
Discrete-Time Signals
Signals are represented as sequences of numbers, called
samples
Sample value of a typical signal or sequence denoted as x
= {x[n]} with − ∞ ≤ n ≤ ∞
x[n] is defined only for integer values of n and undefined for
non-integer values of n
Representation of discrete-time signals:
n 2, n 0
Functional representation x n
3, n 0
Tabular representation
Sequence representation
x(n) = {…,0.2, 2.2, 1.1, 0.2, -3.7, 2.9. …}
1
Discrete-Time Signals
Graphical representation
Discrete-Time Signals
Sampling a speech signal
x n xa (nT ), n
2
Basic Sequences
1, n 0
Unit sample sequence - n
0, n 0
1, n 0 n
n u n u n 1
Basic Sequences
n, n 0
Unit ramp signal - ur n
0, n 0
-1 0 -1
3
Basic Sequences
Complex exponential signal -
x n A n A e j e j n e j
n
0 0
A
n
cos n j sin n
x n xR n jxI n
0 0
xR n A cos 0 n
n
xI n A sin 0 n
n
Basic Sequences
Complex exponential signal -
x n xR n jxI n x n x n
x n A n r n
x n n n
4
Basic Sequences
Sinusoidal signals with different frequencies
Basic Sequences
An arbitrary sequence can be represented in the time-
domain as a weighted sum of some basic sequence and
its delayed (advanced) versions
p n p k n k
k
5
The Norm of a Discrete-Time Signal
Size of a Signal - given by the norm of the signal
1
Lp-norm: p p
x x n
n
p
6
Classification of Discrete-Time Signals
Conjugate-symmetric sequence:
x n x* n
Conjugate-antisymmetric sequence:
x n x* n
7
Classification of Discrete-Time Signals
Any complex sequence can be expressed as a sum of its
conjugate-symmetric and conjugate-antisymmetric parts:
x n xcs n xca n
where
xcs n 2 x n x n
1 *
x n 1 x n x* n
ca 2
Any real sequence can be expressed as a sum of its even
part and its odd part:
x n xev n xod n
where
xev n 2 x n x n
1
x n 1 x n x n
od 2
2011/3/2 Digital Signal Processing 15
8
Classification of Discrete-Time Signals
Energy signals and power signals
The total energy of a signal x(n) is defined by
x n
2
E
n
x n
2
P lim
N 2 N 1 n N
Define the signal energy of x(n) over the finite interval
− N ≤ n ≤ N as N
x n
2
EN
n N
9
Classification of Discrete-Time Signals
Energy signals and power signals
Example – Determine the power and energy of the
unit step sequence
The average power of the unit step signal is
1 N
N 1 1
P lim
N 2 N 1
n 0
1 lim
N 2 N 1
2
It’s a power signal with infinite energy
Example - Consider the causal sequence defined by
3 1 , n 0
n
x n
0, n0
Note: x(n) has infinite energy, its average power is
1 N
P lim 91 4.5
N 2 N 1
n 0
2011/3/2 Digital Signal Processing 19
10
Classification of Discrete-Time Signals
x n
n
x n
2
n
11
Manipulation of Discrete-Time Signals (1/5)
Transformation of independent variable (time)
Time shifting: A signal x[n] may be shifted in time by
replacing the independent variable n by n – k
12
Manipulation of Discrete-Time Signals (3/5)
The operations of folding and time delaying (or
advancing) a signal are NOT commutative
Denote the time-delay operation by TD and the folding
operation by FD
TDk x n x n k , k 0
FD x n x n
Now
TDk FD x n TDk x n x n k
whereas
FD TDk x n FD x n k x n k TDk FD x n
13
Manipulation of Discrete-Time Signals (5/5)
Transformation of independent variable (time)
Addition, multiplication, and scaling of sequences:
Amplitude modifications include addition, multiplication,
and scaling of discrete-time
Amplitude scaling of a signal by a constant :
y n Ax n , n
Sum of two signals:
y n x1 n +x2 n , n
Product of two signals:
y n x1 n x2 n , n
Discrete-Time Systems
Discrete-time system: A device or an algorithm that
performs some prescribed operation on a discrete-time
signal (input or excitation) to produce another discrete-
time signal (output or response)
y n T x n
14
Input-Output Description of Systems
The input-output description or a discrete-time system
consists of a mathematical expression or a rule, which
explicitly defines the relation between the input and
output signals
x n
T
y n
Example: Determine the response of the following
systems to the input signal
n , 3 n 3
x n
0, otherwise
(b) y n x n 1 x n x n 1
1
(a) y n x n 1
3
n
15
Linear Systems: Moving Average
M2
1
y n x n k
M 1 M 2 1 k M1
x n M1 x n M1 1 ... x n x n 1 ... x n M 2
1
M1 M 2 1
16
Nonlinear Systems: : Median Filter (2/3)
Median Filtering Example
17
Block Diagram Representation of
Discrete-Time Systems
Adder
Constant multiplier
18
Block Diagram Representation of
Discrete-Time Systems
1 1 1
Example: y n y n 1 x n x n 1
4 2 2
y n x n 3 x n 1 (finite memory)
y n x n k (infinite memory)
k 0
19
Time (Shift) Invariance
Time-invariant vs. time-variant systems
A system is called time-invariant if its input-output
characteristics do not change with time y n T x n
Definition: A relaxed system T is time-invariant or
shift-invariant if and only if
x(n)
T
y ( n)
Implies that x(n k )
T
y (n k )
y n, k x n k x n k 1
y n k x n k x n k 1
y n, k y n k
time invariant
y n T x n nx n
y n, k nx n k
y n k n k x n k
time variant
y n, k y n k
20
Time (Shift) Invariance
Examples y n T x n x n
y n, k x n k
y n k x n k
time variant y n, k y n k
y n T x n x n cos 0 n
y n, k x n k cos 0 n
y n k x n k cos 0 n k
y n, k y n k
time variant
Linearity (1/3)
A linear system is one that satisfies the superposition
principle
Definition: A system T is linear if and only if
for any arbitrary input sequences x1[n] and x2[n], and any
arbitrary constants a1 and a2.
Multiplicative/scaling property: Suppose that a2 = 0
T a1 x1 n a1T x1 n a1 y1 n
Additivity property: Suppose that a1 = a2 = 1
T x1 n x2 n T x1 n T x2 n y1 n y2 n
21
Linearity (2/3)
Graphical representation of the superposition principle
Linearity (3/3)
Linear vs. non-linear systems
The linear condition can be extended arbitrarily to any
weighted linear combination of signals
M 1 M 1
x n ak xk n
T
y n ak yk n
k 1 k 1
where
yk n T xk n , k 1, 2, , M 1
22
Causality
Causal vs. non-causal systems
Definition: A system is said to be causal if the output
of the system at any time n depends only on present
and past inputs, but does not depend on future inputs
y n T x n , x n 1 , x n 2 ,
Stability
Bounded-Input, Bounded Output (BIBO) stability
If y[n] is the response to an input x[n] and if
x[n] Bx for all values of n
then
y[n] By for all values of n
Example – the M-point moving average filter is BIBO
stable 1 M 1
y[n]
M
x[n k ]
k 0
1
MBx Bx
M
23
Passive & Lossless Systems
A discrete-time system is defined to be passive if, for
every finite-energy input x[n], the output y[n] has, at
most, the same energy
y[n] x[n]
2 2
n n
For a lossless system, the above inequality is satisfied
with an equal sign for every input
Example - Consider the discrete-time system defined by
y[n] =α x[n − N] with N a positive integer
Its output energy is given by
y[ n]
2 2 2
x[ n]
n n
y1 n T1 x n
y n T2 y1 n T2 T1 x n
Systems T1 and T2 can be combined or consolidated
into a single overall system
y n Tc x n where Tc T2T1
In general TT1 2 T2T1 . However, if systems T1 and T2
are LTI, then (a) is time invariant and (b) TT
1 2 T2T1
24
Interconnection of Discrete-Time Systems
Parallel interconnection
y3 n y1 n y2 n
T1 x n T2 x n
T1 T2 x n
Tp x n
We can use parallel and cascade interconnection of
systems to construct larger, more complex systems
2011/3/2 Digital Signal Processing 49
25
Techniques for the Analysis of Linear
Systems
Suppose the input signal is resolved into a weighted
sum of elementary signals
x n ck xk n
k
26
Resolution of a Discrete-Time Signal into
Impulses
Consequently
x n x k n k
k
x n 2 n 1 4 n 3 n 2
27
Response of LTI Systems to Arbitrary
Inputs
If the system is time invariant, and denote the response of
the LTI system to the unit sample sequence as
h[n] T [n k ]
The response of the system to n k is
h n k T n k
Consequently
y n x k h n k
k
28
Computing the Convolution Sum
x n 1, 2,3,1 h n 1, 2,1, 1
y[n] x[n]* h[n] x[k ] [n k ] * h[n] x2 [n] x0 [n] x3 [n] * h[n]
k
x[2] [n 2] x[0] [n] x[3] [n 3] * h[n]
x[2]( [n 2]* h[n]) x[0]( [n]* h[n]) x[3]( [n 3]* h[n])
x[2]h[n 2] x[0]h[n] x[3]h[n 3] y2 [n] y0 [n] y3[n]
29
Computing the Convolution Sum
30
Computing the Convolution Sum
Example:
h n a nu n , a 1
x n u n
y 0 1
y 1 1 a
y 2 1 a a 2
y n 1 a a 2 a n
1 a n 1
1 a
1
y lim y n
n 1 a
2011/3/2 Digital Signal Processing 61
0, if n 0
n an (1 a ( n1) ) n k
a nk a if 0 n N 1
k 0 1 a 1 k 0
N 1 nk an (1 a N ) 1 a N
a 1
an N 1 , if n N
k 0 1 a 1 a
M
r N r M 1
Note: r k
k N 1 r
2011/3/2 Digital Signal Processing 62
31
Properties of Convolution (1/2)
Commutative Property
y n x n h n x k h n k
k
h n x n h k x n k
k
y n x n n x n
x n n k y n k x n k
x n h n h n x n h n h n x n h n h n
1 2 2 1 1 2
Distributive Property
x n h1 n h2 n x n h1 n x n h2 n
32
Causality of LTI Systems (1/2)
The output of an LTI system at n = n0 is given by
y n0 x k h n 0 k
k
Divide
the sum into
1
two sets of terms:
y n0 h k x n0 k h k k x n 0 k
k 0 k
h 0 x n0 h 1 x n0 1 h 1 x n0 1 h 2 x n0 2
depend on present and past inputs depend on future inputs
For a causal system, h[n] = 0 for n < 0
Since h[n] is the response of the relaxed LTI system to a
unit impulse sequence at n = 0, an LTI system is causal
if and only if its impulse response is zero for negative
values of n
2011/3/2 Digital Signal Processing 65
33
Stability of LTI Systems (1/3)
BIBO Stability Condition - A discrete-time system is
BIBO stable if and only if the output sequence {y[n]}
remains bounded for all bounded input sequence {x[n]}
An LTI discrete-time system is BIBO stable if and only if
its impulse response sequence {h[n]} is absolutely
summable, i.e.
Bh h k
k
34
Stability of LTI Systems (3/3)
Example - Consider a causal LTI discrete-time system
with an impulse response
h n a n u n
For this system
1
Bh ak u k a , if a 1
k
k k 0 1 a
35