Professional Documents
Culture Documents
2
Discrete-Time Signals---Sequences
3
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
4
Discrete-Time Signals: Sequences
Discrete-time signals are represented by sequence of numbers
The nth number in the sequence is represented with 𝑥[𝑛]
Often times sequences are obtained by sampling of continuous-time signals
In this case 𝑥[𝑛] is value of the analog signal at 𝑥𝑐 (𝑛𝑇)
Where T is the sampling period
10
-10 t (ms)
0 20 40 60 80 100
10
-10
n (samples)
0 10 20 30 40 50
5
Representation by a Sequence
Discrete-time system theory
Concerned with processing signals that are represented by sequences.
x {x(n)}, n
x(n)
3 4 5 6 7 n
-8 -7 -6 -5 -4 -3 -2 -1 1 2 8 9 10
6
Important Sequences
Unit-sample sequence (𝑛)
Sometime call
a discrete-time impulse; or
an impulse
(𝒏)
1 n 0
(n)
0 n 0
n
-8 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 8 9 10
Note : x( n) ( n m) x( m) ( n m)
7
Important Sequences
Fact:
Unit-step sequence 𝑢(𝑛)
u ( n ) ( n m)
1 n 0 m 0
u ( n)
0 n 0 (n) u(n) u(n 1)
𝒖(𝒏)
𝒏
-8 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 8 9 10
8
Important Sequences
Real exponential sequence
x(n) a n
𝒙(𝒏) 𝟎<𝒂<𝟏
...
...
𝒏
-8 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 8 9 10
9
Important Sequences
Sinusoidal sequence
x(n) A cos(n0 )
x(n)
10
Important Sequences
Complex exponential sequence
( j 0 ) n n j 0 n j 0 n
x ( n) e e e a e
n
11
Periodic Sequences
A sequence x(n) is defined to be periodic with period N if
2 k 2 must be a rational
0 N 2 k N number
0 0
12
Examples of Periodic Sequences
x1[n] cos n / 4
Suppose it is periodic sequence with period N
x1[n] x1[n N ]
cos n / 4 cos n N / 4
n / 4 2 k n / 4 N / 4, k : integer
N 2 k / ( / 4) 8 k
k 1, N 8 2 / w0
13
Examples of Periodic Sequences
2
3 x1[n] cos3 n / 8
8 8
Suppose it is periodic sequence with period N
x1[n] x1[n N ]
cos3 n / 8 cos3 n N / 8
3 n / 8 2 k 3 n / 8 3N / 8, k : integer
N 2 k / w0 2 k / (3 / 8)
k 3, N 16
14
Example of Non-Periodic Sequences
x2 [n] cos n
Suppose it is periodic sequence with period N
x2 [n] x2 [n N ]
cos n cos(n N )
for n 2 k n N , k : integer,
there is no integer N
15
Operations on Sequences
Sum x y {x(n) y(n)}
Multiplication x {x(n)}
Reflection y ( n) x ( n)
16
Sequence Representation Using delay unit
x ( n) x(k ) (n k )
k
𝒙(𝒏)
a-3
a1
2 7 𝒏
-8 -7 -6 -5 -4 -3 -2 -1 1 3 4 5 6 8 9 10
a2 a7
17
Energy of a Sequence
n
E | x ( n) |
n
2
18
DISCRETE-TIME SYSTEMS
19
Signal Process Systems
discrete-
Discrete-time signal time output Discrete-time
Signal system Signal
digital
Digital Signal signal
system
output Digital Signal
20
Discrete-Time Systems
Definition: A discrete-time system is a device or algorithm that
operates on a discrete-time signal called the input or excitation (e.g.
𝑥(𝑛)), according to some rule (e.g. 𝑇[. ]) to produce another discrete-
time signal called the output or response (e.g. 𝑦(𝑛)).
21
Discrete–Time Systems
Discrete-Time System Analysis
It is the process of determining the response, y(n) of that system described by an
operator, transformation T[.] or its impulse response, h(n) to a given excitation,
x(n).
This process could done also in z- or frequency domains.
Digital Filter
It is a digital system that can be used to filter discrete –time signal.
Filtering is a process by which the frequency spectrum of the signal could be
modified or manipulated according to some desired specifications.
22
Classification of Discrete-Time Systems
Static (Memoryless) Vs Dynamic system (Memory)
Time varying Vs Time Invariant system
Linear Vs Nonlinear System
Causal Vs Noncausal System
Stable vs. Unstable System
23
Static Vs Dynamic System
Definition: A discrete-time system is called static or memoryless if its
output at any time instant n depends on the input sample at the same
time, but not on the past or future samples of the input.
In the other case, the system is said to be dynamic or to have memory.
If the output of a system at time n is completely determined by the
input samples in the interval from n-N to n (𝑁 ≥ 0), the system is said
to have memory of duration N.
25
Time Varying Vs Time Invariant System
Definition: A discrete-time system is called time-invariant if its input-
output characteristics do not change with time. In the other case, the
system is called time-variable.
Time-Invariant (shift-invariant) Systems
A time shift at the input causes corresponding time-shift at output
26
Examples:
The time-invariant systems:
y (n) x(n) bx3 (n)
N
y ( n) h( k ) x ( n k )
k 0
y (n) nx(n) bx (n 1)
3
N
y ( n) h N n ( k ) x ( n k )
k 0
27
Example of Time-Invariant System
𝑛
Accumulator system 𝑦 𝑛 = 𝑘=−∞ 𝑥 𝑘
Shift the system by (𝑚)
𝑛−m
then the output: y 𝑛 − m = 𝑘=−∞ 𝑥1 (𝑘)
28
Example of Time-Varying System
Accumulator system 𝑦 𝑛 = 𝑛𝑥(𝑛)
Shift the system by (𝑚)
then the output: y 𝑛 − m = (𝑛 − 𝑚)𝑥(𝑛 − 𝑚)
Let the input: 𝑥(𝑛 − 𝑚),
then the output: 𝑦1 𝑛 = 𝑛𝑥(𝑛 − 𝑚) ≠ y 𝑛 − m
29
Linear vs. Non-linear Systems
Definition: A discrete-time system is called linear if only if it satisfies
the linear superposition principle. In the other case, the system is
called non-linear.
30
Examples:
The linear systems:
N
y ( n) h( k ) x ( n k )
k 0
31
Example of Linear System
𝑛
Accumulator system 𝑦 𝑛 = 𝑘=−∞ 𝑥 𝑘
For arbitrary input: 𝑥1 (𝑛),
𝑛
then the output: 𝑦1 𝑛 = 𝑘=−∞ 𝑥1 (𝑘)
34
Examples:
The causal system:
N
y ( n) h( k ) x ( n k )
k 0
35
Example :
Check the discrete-time system for causality if its response is of the form:
a) y(n) = R[x(n)] = 3 x(n − 2) + 3 x(n + 2)
b) y(n) = R[x(n)] = 3 x(n − 1) − 3 x(n − 2)
Solution:
a) Let x1(n) and x2(n) be distinct excitations that satisfy Eq. (2.4b) and assume that x1(n ) x2(n )
for n > k
For n = k
R[x1(n)]|n=k = 3x1(k − 2) + 3x1(k + 2)
R[x2(n)]|n=k = 3x2(k − 2) + 3x2(k + 2)
and since we have assumed that x1(n) x2(n ) for n > k, it follows that:
x1(k + 2) x2(k + 2) and thus 3 x1(k + 2) 3 x2(k + 2)
Therefore, R[x1(n)] = Rx2(n) for n = k
that is, the system is noncausal.
b) For this case
R[x1(n)]|n=k = 3x1(k − 1) + 3x1(k - 2)
R[x2(n)]|n=k = 3x2(k − 1) + 3x2(k - 2)
If n ≤ k,
x1(k - 1) = x2(k – 1) and x1(k - 2) = x2(k - 2)
for n ≤ k or
R[x1(n)] = Rx2(n) for n ≤ k
that is, the system is causal. 36
Stable vs. Unstable of Systems
Definition: An arbitrary relaxed system is said to be bounded input -
bounded output (BIBO) stable if and only if every bounded input
produces the bounded output. It means, that there exist some finite
numbers sayM x andM y , such that
x ( n) M x y ( n ) M y
for all n. If for some bounded input sequence x(n) , the output y(n) is
unbounded (infinite), the system is classified as unstable.
37
Testing for Stability or Instability
then yn By B ,
2
x for all n
38
Testing for Stability or Instability
n
Accumulator system yn xk
k
0 n 0
xn un :bounded
1 n 0
n n
0 n0
yn xk xk : not bounded
k k n 1 n 0
39
Characterization of Discrete Time System
Any Discrete-time can be characterized by one of the following
representations:
1) Difference Equation
2) Impulse Response
3) Transfer Function
4) Frequency Response
40
Difference Equation
Continuous-time systems are characterized in terms of differential equations.
Discrete-time systems, on the other hand, are characterized in terms of
difference equations.
A LTI system can be described by a linear constant coefficient difference
equation of the form:
M N
bi yn i ai xn i
i 0 i 0
or
N M
yn ai xn i bi yn i
i 0 i 1
This equation describes a recursive approach for computing the current
output, y(n) given the input values, x(n) and previously computed output
values y(n-i). b0 =1, M and N are called the order of the system, ai and bi are
constant coefficients . Two types of discrete-time systems can be identified:
nonrecursive and recursive. 41
Recursive vs. Non-recursive Systems
Definition: A system whose output y(n) at time n depends on any
number of the past outputs values ( e.g. y(n-1), y(n-2), … ), is called a
recursive system. Then, the output of a causal recursive system can be
expressed in general as
𝑦 𝑛 = 𝐹 𝑦 𝑛 − 1 , 𝑦 𝑛 − 2 , … , 𝑦 𝑛 − 𝑁 , 𝑥 𝑛 , 𝑥 𝑛 − 1 , … , 𝑥(𝑛 − 𝑚)
𝑦 𝑛 = 𝐹 𝑥 𝑛 , 𝑥 𝑛 − 1 , … , 𝑥(𝑛 − 𝑚)
42
Examples:
The Non-recursive system:
N
y ( n) h( k ) x ( n k )
k 0
43
Solving the difference equation
Example: compute impulse response of LTICS that described by the following
Difference Equation.
𝑦 𝑛 − 𝑎𝑦 𝑛 − 1 = 𝑥(𝑛)
Solution:
Since the system is Causal-System, then 𝑦 𝑛 = 0 𝑓𝑜𝑟 𝑛 < 0.
The system input is 𝑥 𝑛 = 𝛿(𝑛)
Then the output can be calculated as follows:
𝑦 𝑛 = 𝑎𝑦 𝑛 − 1 + 𝛿(𝑛)
At n=0: 𝑦 0 = 𝑎𝑦 −1 + 𝛿 0 = 1 = 𝑎0
At n=1: 𝑦 1 = 𝑎𝑦 0 + 𝛿 1 = 𝑎 = 𝑎1
At n=2: 𝑦 2 = 𝑎𝑦 1 + 𝛿 2 = 𝑎2
At n=3: 𝑦 3 = 𝑎𝑦 2 + 𝛿 3 = 𝑎3
45
Example
For the discrete-time system shown in the Figure, if the system is initially
relaxed, that is, y(n) = 0 for n < 0, and p is a real constant, do the following:
a) Derive the difference equation.
b) Derive the impulse response, h(n).
c) Check the system stability.
d) Find the unit-step response of this system
46
Solution
a) From the Figure, the signals at node A is y(nT − T) and at node B is [p y(nT − T)],
respectively. Thus, the difference equation has the form:
𝑦(𝑛𝑇) = 𝑥(𝑛𝑇) + 𝑝𝑦(𝑛𝑇 − 𝑇) 𝑜𝑟 𝑠𝑖𝑚𝑝𝑙𝑦 𝑦(𝑛) = 𝑥(𝑛) + 𝑝𝑦(𝑛 − 1)
b) The impulse response, h(n) is the response of the system, y(n) when it is excited
by input 𝑥(𝑛) = 𝛿(𝑛). With 𝑥(𝑛𝑇) = 𝛿(𝑛𝑇), we can write:
𝑦(𝑛) = 𝑥(𝑛) + 𝑝 𝑦(𝑛 − 1)
1 n 0
𝑦(𝑛) = ℎ(𝑛) = 𝛿(𝑛) + 𝑝 𝑦(𝑛 − 1) n
𝑦(0) = ℎ(0) = 1 + 𝑝 𝑦(−1) = 1 + 0 = 1 0 n 0
𝑦(1) = ℎ(1) = 0 + 𝑝 𝑦(0) = 𝑝
𝑦(2) = ℎ(2) = 0 + 𝑝 𝑦(𝑇 ) = 𝑝2
·························
ℎ(𝑛) = 𝑝𝑛
and since 𝑦(𝑛) = 0 for 𝑛 ≤ 0, we have → ℎ(𝑛) = 𝑝𝑛 𝑢(𝑛)
47
Solution (Cont.)
The impulse response, ℎ(𝑛) of this system is illustrated in the Figure.
48
Solution (Cont.)
( n1)
n n 1 p
c) check the stability:
h k 1 p
p k
k 0 k 0
1
) 0 and hk p
k
For p< 1 and n the p(n+1)
k 0 k 0 1 p
In this case this system is stable one.
d) With x(n) = u(n), we get: y(n) = x(n) + py(n − 1)
𝑦(0) = 1 + 𝑝 𝑦(−1) = 1
𝑦 1 = 1 + 𝑝 𝑦(0) = 1 + 𝑝
𝑦 2 = 1 + 𝑝 𝑦(1) = 1 + 𝑝 + 𝑝2
·································
( n1)
n 1 p
y ( n ) u ( n ) p k u ( n)
k 0 1 p
49
Solution (Cont.)
The unit-step response for the three values of p is illustrated in the
Figure. Evidently, the response converges if p < 1 and diverges if p ≥ 1.
(c) P = 1
50
LINEAR TIME-INVARIANT CAUSAL SYSTEMS
(LTIC SYSTEM)
51
Signal Process Systems
A important class of systems
52
Linear Shift-Invariant Systems
𝑥 𝑛 = 𝛿(𝑛) 𝑇[] 𝑦 𝑛 =𝑇 𝑥 𝑛 = ℎ(𝑛)
unit impulse impulse response
x ( n) x(k ) (n k ) y ( n) T x ( k ) ( n k )
k k
53
Impulse Response
0 0
0 0
54
Convolution Sum
𝑦 𝑛 =𝑇 𝑥 𝑛
𝑥(𝑛) 𝑇[]
𝑦(𝑛) = 𝑥(𝑛) ∗ ℎ(𝑛)
y ( n) x ( k ) h( n k ) x ( n) * h( n)
k
Convolution
y ( n) h( k ) x ( n k ) h( n) * x ( n)
k
56
Properties of Convolution (Associative):
Cascaded Connection
57
Properties of Convolution (Distributive):
Parallel Connection
ℎ1(𝑛)
𝑥(𝑛) + 𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ1 𝑛 + 𝑥 𝑛 ∗ ℎ2 𝑛
ℎ2(𝑛)
58
Example: Parallel and Cascade
ℎ1(𝑛) ℎ3(𝑛)
𝑥(𝑛) + 𝑦 𝑛
ℎ2(𝑛)
𝑦 𝑛 = 𝑥 𝑛 ∗ [ℎ1 𝑛 ∗ ℎ3 𝑛 + ℎ2 𝑛 ]
ℎ𝑒𝑞 𝑛 = [ℎ1 𝑛 ∗ ℎ3 𝑛 + ℎ2 𝑛 ]
59
Example
a n n0
0123456
h( n)
n0
𝑦(𝑛) =?
0
0123456
60
Example
y ( n) x ( n) * h( n) x ( k ) h( n k )
k
𝑥(𝑘) 𝑘
0123456
ℎ(𝑘) 𝑘
0123456
ℎ(0𝑘) 𝑘
0123456
61
Example
y ( n) x ( n) * h( n) x ( k ) h( n k )
k
𝑥(𝑘) 𝑘
0123456
62
Example Two conditions have to be considered.
n<N and nN.
y ( n) x ( n) * h( n) x ( k ) h( n k )
k
𝑥(𝑘) 𝑘
0123456
63
Ways to find D.T. Convolution
Three ways to perform digital convolution
Graphical method
Table method
Analytical method
64
1- Graphical Method
Example: Find the convolution of the two sequences x[n] and h[n] given
by 𝒙[𝒏] = [𝟑, 𝟏, 𝟐] and 𝒉[𝒏] = [𝟑, 𝟐, 𝟏]
65
2- Table Method
Example: Find the convolution of the two sequences x[n] and h[n] given
by 𝒙[𝒏] = [𝟑, 𝟏, 𝟐] and 𝒉[𝒏] = [𝟑, 𝟐, 𝟏]
K -2 -1 0 1 2 3 4 5
x[k]: 3 1 2 y[n<0]: 0
h[0-k]: 1 2 3 y[0]: 9
h[1-k]: 1 2 3 y[1]: 9
h[2-k]: 1 2 3 y[2]: 11
h[3-k]: 1 2 3 y[3]: 5
h[4-k]: 1 2 3 y[4]: 2
h[5-k]: 1 2 3 y[n≥5]: 0
66
Example:
Find the convolution of the two sequences x[n] and h[n] represented by,
𝑥[𝑛] = [2, 1, −2, 3, −4] and ℎ[𝑛] = [3, 1, 2, 1]
67
3- Analytical Method (Example)
a n n0
x(n) u(n) u(n N ) h( n) 𝑦(𝑛) =?
0 n0
y ( n) x ( n) * h( n) x ( k ) h( n k )
k
( n 1) 1
n n
1 a a n
a
For n < N: y ( n) a n k a n a k an 1
k 0 k 0 1 a 1 a 1
N n N
N 1 N 1
1 a a n
a
For n N: y ( n) a n k a n a k an 1
k 0 k 0 1 a 1 a 1
68
3- Analytical Method (Example) Cont…
a n n0
x(n) u(n) u(n N ) h( n) 𝑦(𝑛) =?
0 n0
y ( n) x ( n) * h( n) x ( k ) h( n k )
k
( n 1) 1
n n
1 a a n
a
For n < N: y ( n) a n k a n a k an 1
k 0 k 0 1 a 1 a 1
N n N
N 1 N 1
1 a a n
a
For n N: y ( n) a n k a n a k an 1
k 0 k 0 1 a 1 a 1
5
4
3
2
1
0
0 5 10 15 20 25 30 35 40 45 50
69
Example:
Find the output 𝑦[𝑛] of a Linear, Time-Invariant system having an
impulse response ℎ[𝑛], when an input signal 𝑥[𝑛] is applied to it ℎ 𝑛
= 𝑎𝑛 𝑢 𝑛 𝑎𝑛𝑑 𝑥 𝑛 = 𝑢 𝑛 , where 𝑎 < 1.
Solution:
By definition of Convolution sum, the output y[n] is given as
y ( n) x ( n) * h( n) x ( k ) h( n k )
k
y ( n) a k
k
u ( k ).u ( n k ) .u (n k )
a k
k 0
( n 1)
n
1 a
y ( n) a k
k 0 1 a
70
Causal LTI Systems
A relaxed LTI system is causal if and only if its impulse response is zero
for negative values of n , i.e.
h(n) 0 for n 0
71
Stable LTI Systems
A LTI system is stable if its impulse response is absolutely summable,
[i.e. every bounded input produce a bounded output (BIBO)]
S | h( k ) |
k
72
Example:
Show that the linear shift-invariant system with impulse response
ℎ 𝑛 = 𝑎𝑛 𝑢(𝑛) where |𝑎| < 1 is stable.
1
S | h( k ) | a
k
k 0 k 0 1 a
73
Impulse Response of the Ideal Delay System
h(n) (n nd )
(n nd)
0123456 nd
74
Impulse Response of the Ideal Delay System
(n nd)
0123456 nd
75
Impulse Response of the Moving Average
k M
1
Moving Average: y ( n) x(n k )
M 1 M 2 1 k M1
M
1
h ( n) (n k )
M 1 M 2 1 k M1
1
M1 n M 2
h( n) M 1 M 2 1
0 otherwise
... ...
Can you explain with (n k)?
M1 0 M2
... ...
Can you explain with u(n)?
M1 0 M2
76
Forward Difference Vs Backward Difference
hn n 1 n
hn n n 1
77
Impulse Response of the Accumulator
n
Accumulator: y ( n) x(k )
k
n
1, n 0
h(n) (k ) u ( n)
k 0, n 0
...
Can you explain?
0
S u n
n
Unstable system
78
Inverse system
hn hi n hi n hn n
80
Frequency Response
DTFT, Discrete-Time Fourier Transform
of ℎ(𝑛) is
H e jw ,
h n e jwn
n
H(𝑒 𝑗𝑤 )
𝑋(𝑒 𝑗𝑤 ) Y 𝑒 𝑗𝑤 = 𝑋 𝑒 𝑗𝑤 . 𝐻(𝑒 𝑗𝑤 )
81
Example: DTFT of The Ideal Delay System
h(n) (n nd )
Since, H (e j ) h (
k
k ) e jn
(
k
k nd ) e jn
then, H (e j ) e j nd
The Magnitude: | H (e j ) | 1
82
Ideal Frequency-Selective Filters
| H (e j ) |
Lowpass Filter 1
c c
Bandstop Filter | H (e j ) |
1
b a a b
| H (e j ) |
Bandpass Filter 1
b a a b
Highpass Filter | H (e j ) |
1
b a a b
83
Example: IDTFT of Ideal Lowpass Filter
H (e j )
j 1 | | c
H (e )
0 c
1 c c c
j jn
h( n) H ( e ) e d
2 c
1 c 1 c
e
j n j n
d e d ( j n )
2 c 2 j n c
c
1 j n sin c n
e
2 j n c
n
84
Example
Find the response of the ideal delay system ℎ 𝑛 = 𝛿(𝑛 − 𝑛𝑑 ), if the input is
𝑥 𝑛 = 𝛿 𝑛 + 2𝛿(𝑛 − 1).
Solution:
By DTFT of ℎ 𝑛 :
𝐻 𝑒 𝑗𝜔 = ∞
𝑛=−∞ ℎ(𝑛) 𝑒
−𝑗𝜔𝑛
= ∞
𝑛=−∞ 𝛿(𝑛 − 𝑛𝑑 ) 𝑒 −𝑗𝜔𝑛 = 𝑒 −𝑗𝜔𝑛𝑑
By DTFT of 𝑥 𝑛 :
𝑋 𝑒 𝑗𝜔 = ∞
𝑛=−∞ 𝑥(𝑛) 𝑒
−𝑗𝜔𝑛 = ∞
𝑛=−∞ 𝛿 𝑛 + 2𝛿(𝑛 − 1) 𝑒 −𝑗𝜔𝑛
𝑋 𝑒 𝑗𝜔 = 1 + 2𝑒 −𝑗𝜔
85
Example (Cont…..)
By the IDTFT, The system output in Time domain:
1 𝜋
𝑦 𝑛 = 𝑌 𝑒 𝑗𝜔 . 𝑒 𝑗𝜔𝑛 . 𝑑𝜔
2𝜋 −𝜋
1 𝜋 −𝑗𝜔𝑛
𝑦(𝑛) = 𝑒 𝑑 + 2𝑒 −𝑗𝜔(𝑛𝑑 +1) . 𝑒 𝑗𝜔𝑛 . 𝑑𝜔
2𝜋 −𝜋
1 𝜋 𝑗𝜔(𝑛−𝑛 )
𝑦(𝑛) = 𝑒 𝑑 + 2𝑒 𝑗𝜔(𝑛−𝑛𝑑 −1) . 𝑑𝜔
2𝜋 −𝜋
Then, y(n) is
𝒚(𝒏) = 𝜹(𝒏 − 𝒏𝒅 ) + 𝟐𝜹(𝒏 − 𝒏𝒅 −𝟏)
86
87