You are on page 1of 87

LECTURE (3)

Discrete-Time Signals and Systems


Amr E. Mohamed
Faculty of Engineering - Helwan University

‫لما نصدق اننا ِن ْْقدَ ر‬ ،،، ‫نِـ ْقـدَ ر‬


Agenda
 Discrete-time signals: sequences
 Discrete-time system
 Linear Time-Invariant Causal Systems (LTIC System)
 Linear Constant-Coefficient Difference Equations

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(n0  )

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

x(n)  x(n  N ) for all N


j0 n
 Example: consider x(n)  e
x(n)  e j0n  e j0 ( n N )  e j0 N e j0n  x(n  N )

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]  cos3 n / 8
8 8
 Suppose it is periodic sequence with period N
x1[n]  x1[n  N ]

cos3 n / 8  cos3 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)}

 Product x  y  {x(n) y(n)}

 Multiplication x  {x(n)}

 Shift y(n)  x(n  n0 )

 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

x(n)  a3(n  3)  a1(n  1)  a2(n  3)  a7(n  7)

17
Energy of a Sequence

 Energy of a sequence is defined by

n 
E  | x ( n) |
n  
2

18
DISCRETE-TIME SYSTEMS

19
Signal Process Systems

Continuous-time analog Continuous-time


signal output
Signal system Signal

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. 𝑦(𝑛)).

𝑥(𝑛) 𝑇[] 𝑦(𝑛) = 𝑇[𝑥(𝑛)]


input signal or output signal or
excitation response
 This expression denotes also the transformation 𝑇[. ] , (also called
operator or mapping) or processing performed by the system on x(n) to
produce y(n).

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.

 Discrete-Time System Design


 It is the process of synthesizing the system parameters that satisfy the input
output specification.
 This process could done also in time, 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.

 If 𝑁 ≥ 0, the system is static or memoryless.


 If 0 < 𝑁 < ∞ , the system is said to have finite memory.
 If 𝑁 → ∞, the system is said to have infinite memory.
24
Examples:
 The static (memoryless) systems:
y (n)  nx(n)  bx3 (n)

 The dynamic systems with finite memory:


N
y ( n)   h( k ) x ( n  k )
k 0

 The dynamic system with infinite memory:



y ( n)   h( k ) x ( n  k )
k 0

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

 The time-variable systems:

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 (𝑘)

 Let the input: 𝑥(𝑛 − 𝑚),


𝑛
 then the output: 𝑦1 𝑛 = 𝑘=−∞ 𝑥(𝑘 − 𝑚)
𝑛−𝑚
 Let: 𝐾 = 𝑘 − 𝑚, then 𝑦1 𝑛 = 𝑘=−∞ 𝑥(𝑘) =y 𝑛−m

 Hence , the system is Time-Invariant System

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

 Hence , the system is Time-Varying System

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.

𝑥(𝑛) 𝑇[] 𝑦(𝑛) = 𝑇[𝑥(𝑛)]

T [ax1 (n)  bx2 (n)]  aT [ x1 (n)]  bT [ x2 (n)]

30
Examples:
 The linear systems:
N
y ( n)   h( k ) x ( n  k )
k 0

y (n)  x(n 2 )  bx(n  k )

 The non-linear systems:

y (n)  nx(n)  bx3 (n  1)


N
y (n)   h(k ) x(n  k ) x(n  k  1)
k 0

31
Example of Linear System
𝑛
 Accumulator system 𝑦 𝑛 = 𝑘=−∞ 𝑥 𝑘
 For arbitrary input: 𝑥1 (𝑛),
𝑛
 then the output: 𝑦1 𝑛 = 𝑘=−∞ 𝑥1 (𝑘)

 For arbitrary input: 𝑥2 (𝑛),


𝑛
 then the output: 𝑦2 𝑛 = 𝑘=−∞ 𝑥2 (𝑘)

 Let the input: 𝑥 𝑛 = 𝑎𝑥1 𝑛 + 𝑏𝑥2 (𝑛),


 then the output:
• 𝑦 𝑛 = 𝑛𝑘=−∞ 𝑎𝑥1 𝑘 + 𝑏𝑥2 (𝑘)
• 𝑦 𝑛 = 𝑎 𝑛𝑘=−∞ 𝑥1 𝑘 + 𝑏 𝑛𝑘=−∞ 𝑥2 𝑘
• Then, 𝑦 𝑛 = 𝑎𝑦1 𝑛 + 𝑏𝑦2 𝑛

 Hence , the system is Linear System


32
Example of Nonlinear Systems
 Accumulator system 𝑦 𝑛 = 𝑥 2 (n)
 For arbitrary input: 𝑥1 (𝑛),
 then the output: 𝑦1 𝑛 = 𝑥12 (n)

 For arbitrary input: 𝑥2 (𝑛),


 then the output: 𝑦2 𝑛 = 𝑥22 (n)

 Let the input: 𝑥 𝑛 = 𝑎𝑥1 𝑛 + 𝑏𝑥2 (𝑛),


 then the output:
• 𝑦 𝑛 = 𝑎𝑥1 𝑛 + 𝑏𝑥2 (𝑛) 2
• 𝑦 𝑛 = 𝑎2 𝑥12 n + ab𝑥1 𝑛 𝑥2 (𝑛) + 𝑏 2 𝑥22 (n)
• Then, 𝑦 𝑛 ≠ 𝑎𝑦1 𝑛 + 𝑏𝑦2 𝑛

 Hence , the system is Nonlinear System


33
Causal vs. Non-causal Systems
 Definition: A system is said to be causal if the output of the system at
any time n (i.e., y(n)) depends only on present and past inputs (i.e.,
x(n), x(n-1), x(n-2), … ). In mathematical terms, the output of a causal
system satisfies an equation of the form

y (n)  F  x(n), x(n  1), x(n  2), L 


 where F [.] is some arbitrary function. If a system does not satisfy this
definition, it is called non-causal.

34
Examples:
 The causal system:
N
y ( n)   h( k ) x ( n  k )
k 0

y (n)  x (n)  bx(n  k )


2

 The non-causal system:


y (n)  nx(n  1)  bx3 (n  1)
10
y ( n)   h( k ) x ( n  k )
k 10

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

yn  x[n] is stable


2

if xn  Bx  , for all n

then yn  By  B  ,
2
x for all n

38
Testing for Stability or Instability
n
 Accumulator system yn   xk 
k  

0 n  0
xn  un   :bounded
1 n  0

n n
0 n0
yn   xk    xk    : not bounded
k   k   n  1 n  0

 Accumulator system is not stable

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 yn  i    ai xn  i 
i 0 i 0
or
N M
yn    ai xn  i    bi yn  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 , … , 𝑥(𝑛 − 𝑚)

 where F[.] is some arbitrary function.


 In contrast, if y(n) at time n depends only on the present and past inputs
then such a system is called Nonrecursive.

𝑦 𝑛 = 𝐹 𝑥 𝑛 , 𝑥 𝑛 − 1 , … , 𝑥(𝑛 − 𝑚)

42
Examples:
 The Non-recursive system:
N
y ( n)   h( k ) x ( n  k )
k 0

 The recursive system:


N N
y ( n)   b( k ) x ( n  k )   a ( k ) y ( n  k )
k 0 k 1

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

𝑇ℎ𝑒𝑛 𝑡ℎ𝑒 𝑔𝑒𝑛𝑒𝑟𝑎𝑙 𝑓𝑜𝑟𝑚 𝑜𝑓 𝑡ℎ𝑒 𝑜𝑢𝑡𝑝𝑢𝑡 𝑦 𝑛 = 𝑎𝑛 𝑓𝑜𝑟 𝑛 > 0


44
Discrete-Time system Networks
 The basic elements of discrete-time
systems are the adder, the
multiplier, and the unit delay.
 Ideally, the adder produces the sum
of its inputs and the multiplier
multiplies its input by a constant
instantaneously.
 The unit delay, on the other hand,
is a memory element that can store
just one number. At instant (nT), in
response to a synchronizing clock
pulse, it delivers its content to the
output and then updates its content
with the present input.
 The device freezes in this state
until the next clock pulse. In effect,
on the clock pulse, the unit delay
delivers its previous input to the
output.

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.

(a) Stable system (b) Unstable system

(c) Unstable system

48
Solution (Cont.)
( n1)
n n 1  p
c) check the stability:
 h k     1 p
p k

k 0 k 0
  1
)  0 and  hk    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
·································
( n1)
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.

(a) P < 1 (b) P > 1

(c) P = 1

50
LINEAR TIME-INVARIANT CAUSAL SYSTEMS
(LTIC SYSTEM)

51
Signal Process Systems
 A important class of systems

Linear Shift-Invariant Systems.

 In particular, we’ll discuss

Linear Shift-Invariant Discrete-Time 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   

 LTI system description by convolution (convolution sum):


 
y ( n)   x(k ) T [ (n  k )]   x(k ) h(n  k )  x(n) * h(n)
k   k  

Time k impulse Only with the time


The output value at time n difference

53
Impulse Response

𝑥(𝑛) 𝑇[] 𝑦(𝑛) = 𝑇[𝑥(𝑛)]

0 0

0 0

54
Convolution Sum

𝑦 𝑛 =𝑇 𝑥 𝑛
𝑥(𝑛) 𝑇[]
𝑦(𝑛) = 𝑥(𝑛) ∗ ℎ(𝑛)


y ( n)   x ( k ) h( n  k )  x ( n) * h( n)
k  
Convolution

A linear shift-invariant system is completely


characterized by its impulse response.
55
Properties of Convolution (Cumulative)

y ( n)   x ( k ) h( n  k )  x ( n) * h( n)
k  


y ( n)   h( k ) x ( n  k )  h( n) * x ( n)
k  

x(n) * h(n)  h(n) * x(n)

56
Properties of Convolution (Associative):
Cascaded Connection

𝑥(𝑛) ℎ1(𝑛) ℎ2(𝑛) 𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ1 𝑛 ∗ ℎ2 𝑛

𝑥(𝑛) ℎ2(𝑛) ℎ1(𝑛) 𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ2 𝑛 ∗ ℎ1 𝑛

𝑥(𝑛) ℎ1(𝑛) ∗ ℎ2(𝑛) 𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ1 𝑛 ∗ ℎ2 𝑛

These systems are identical.

57
Properties of Convolution (Distributive):
Parallel Connection

ℎ1(𝑛)

𝑥(𝑛) + 𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ1 𝑛 + 𝑥 𝑛 ∗ ℎ2 𝑛
ℎ2(𝑛)

𝑥(𝑛) ℎ1(𝑛) + ℎ2(𝑛) 𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ1 𝑛 + ℎ2 𝑛

These two systems are identical.

58
Example: Parallel and Cascade
ℎ1(𝑛) ℎ3(𝑛)

𝑥(𝑛) + 𝑦 𝑛

ℎ2(𝑛)

𝑦 𝑛 = 𝑥 𝑛 ∗ [ℎ1 𝑛 ∗ ℎ3 𝑛 + ℎ2 𝑛 ]

𝑥(𝑛) ℎ𝑒𝑞 (𝑛) 𝑦 𝑛

ℎ𝑒𝑞 𝑛 = [ℎ1 𝑛 ∗ ℎ3 𝑛 + ℎ2 𝑛 ]

59
Example

x(n)  u(n)  u(n  N )

a n n0
0123456
h( n)  
n0
𝑦(𝑛) =?
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

ℎ(0𝑘) 𝑘 compute y(0)


0123456

ℎ(1𝑘) 𝑘 compute y(1)


0123456

How to computer y(n)?

62
Example Two conditions have to be considered.
n<N and nN.

y ( n)  x ( n) * h( n)   x ( k ) h( n  k )
k  
𝑥(𝑘) 𝑘
0123456

ℎ(0𝑘) 𝑘 compute y(0)


0123456

ℎ(1𝑘) 𝑘 compute y(1)


0123456

How to computer y(n)?

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 𝒉[𝒏] = [𝟑, 𝟐, 𝟏]

 Solution: On the Board

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]

 Solution: On the Board

67
3- Analytical Method (Example)
a n n0
x(n)  u(n)  u(n  N ) h( n)   𝑦(𝑛) =?
0 n0

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 n0
x(n)  u(n)  u(n  N ) h( n)   𝑦(𝑛) =?
0 n0

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

 Then, the two equivalent forms of the convolution formula can be


obtained for the causal LTI system:
 n
y ( n)   h( k ) x ( n  k )   x ( k ) h( n  k )
k 0 k 

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

Ideal Delay System: y(n)  x(n  nd )


By letting 𝑥(𝑛) = 𝛿(𝑛) and 𝑦(𝑛) = ℎ(𝑛),

h(n)  (n  nd )

(n nd)
0123456 nd

74
Impulse Response of the Ideal Delay System

You must know: x(n) * (n  nd )  x(n  nd )

(𝒏 𝒏𝒅) plays the following functions:


• Shift; or
• Copy

(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

 Impulse response of Forward Difference

hn   n  1   n

 Impulse response of Backward Difference

hn   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
hn hi n  hi n hn   n

x[n] h[n] hi[n] y[n]= x[n]*]= x[n]


δ[n]

hn  un  n   n  1


 un  un  1   n
79
Discrete-Time Frequency
Response (DTFT)
FREQUENCY-DOMAIN REPRESENTATION OF DISCRETE-TIME
SIGNALS AND SYSTEMS

80
Frequency Response
 DTFT, Discrete-Time Fourier Transform
 of ℎ(𝑛) is
H  e jw     ,
h n e  jwn

n 

 IDTFT, Inverse Discrete-Time Fourier Transform is


1 
h( n) 
2 

H (e j ) e j  n d

𝑥(𝑛) ℎ(𝑛) 𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ(𝑛)

H(𝑒 𝑗𝑤 )
𝑋(𝑒 𝑗𝑤 ) Y 𝑒 𝑗𝑤 = 𝑋 𝑒 𝑗𝑤 . 𝐻(𝑒 𝑗𝑤 )
81
Example: DTFT of The Ideal Delay System
h(n)   (n  nd )
 
Since, H (e j )   h (
k  
k ) e  jn
   (
k  
k  nd ) e  jn

then, H (e j )  e  j  nd

The Magnitude: | H (e j ) | 1

The phase: H (e j )  nd

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 jn
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𝑒 −𝑗𝜔

 The system output in frequency domain:


𝑌 𝑒 𝑗𝜔 = 𝑋 𝑒 𝑗𝜔 . 𝐻 𝑒 𝑗𝜔 = 𝑒 −𝑗𝜔𝑛𝑑 + 2𝑒 −𝑗𝜔(𝑛𝑑 +1)

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

You might also like