0% found this document useful (0 votes)
178 views94 pages

Slide-2.2 Discrete Time Linear Time Invariant (LTI) System-2

Digital Signal Processing is a course of computer science and engineering department in all countries. This is the 2ndchapter.

Uploaded by

musa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views94 pages

Slide-2.2 Discrete Time Linear Time Invariant (LTI) System-2

Digital Signal Processing is a course of computer science and engineering department in all countries. This is the 2ndchapter.

Uploaded by

musa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 94

LTI System of DSP

Abu saleh Musa Miah


Assistant Professor,
Dept. of CSE, BAUST, Bangladesh
email: [email protected], tel: +8801734264899
web: www.baust.edu.bd/cse
Define LTI system?
Making a system with Combination of Linearity and time
invariant property of a signal.

 In LTI systems the output is the convolution between the input


signal and system impulse response.

 convolution is a mathematical operator which takes two functions


f and g and produces a third function that in a sense represents the
amount of overlap between f and a reversed and translated version
of g. 
 to set as input to any LTI system any arbitrary signal is need to be
decomposed and represented as in weighted sum of unit
sample sequences.
 We will learn that multiplication in frequency domain is
equivalent of convolution in time domain
Prof. Dr. A K M Akhtar Hossain, CSE, RU.
Define LTI system?

  know any sequence we can write
We
 -(1)
 It follows that a linear system can be completely characterized by its
impulse response.
 Let is the response of a system to the input , an impulse occurring at
n =k,
 Using the eq(1) to represent the input, it follows that

…(2)
  only linearity is
If
imposed then
depend both n and k
Define convolution sum?
  
Property of time invariance implies that if h[n] is the response
to then the response to is h. With this addition constraint we
can rewrite that.

for all n. –(3)


 where y[n] is the output obtained by passing an input signal x[n]
through a filter whose coefficients are h[n].
 Here, the limits of summation range from 0 to N as our h[n] signal is
finite in nature.
 this called convolution sum, and we represent this by the
operator notation
 y(n)=x(n)*h(n). where * denotes the convolution operation.
Prof. Dr. A K M Akhtar Hossain, CSE, RU.
Convolution Sum

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Convolution Sum

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


LTI
 Our first observation is that the index in the summation is k, and hence both the input signal
x(k) and the impulse response h(no - k ) are functions of k.

 Second, we observe that the sequences x(k) and h(no - k) are multiplied together to form a
product sequence. The output y(na) is simply the sum over all values of the product
sequence.
 The sequence h(no - k) is obtained from h(k) by, first, folding h(k) about k = 0 (the time
origin), which results in the sequence h(- k). The folded sequence is then shifted by no to
yieid h(no - k ) .
 To summarize, the process of computing the convolution between x ( k ) and h(k) involves
the following four steps.

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Three different process of computing
convolution sum?

Mathematical approach
Tabular approach
Graphical approach
Mathmatical Aproach
 Let length of sequence x(n) is N1,
 lower limit of x(n) is n1,upper limit of x(n) is n2.

 length of sequence h(n) is N2,


 lower limit of h(n) is p1, upper limit of h(n) is p2.

(a)Let length of sequence y(n) is :-


length of sequence x(n) is
+ length of sequence h(n) is -1
 
n=N1+N2-1
(b) lower limit of y(n) is :-
lower limit of x(n) is + lower limit of h(n) is
n(initial)=n1+p1

(c) upper limit of y(n) is :-


upper limit of x(n) is + upper limit of h(n) is
n(upper)=n2+p2
Mathmatical Aproach
 
now for the mathematical approach ,

 
And this n will vary from n1+p1 to n2+p2
n1+p1 n2+p2
Mathmatical Aproach
Try to understand upper limit and lower limit
the input sequence x(n)={3^,1,2,-1} sequence is applied to
discrete time processor with unit sample response
h(n)={3^,2,1} x(n)={3^,1,2,-1}
 
 Length of n=4+3-1 =6
 Lower limit of n= 0+0=0 ,

 Upper limit of n=3+2 =5

 n=0,
 =x(0)h(0) + x(1)h(-1) + x(2)h(-2) + x(3)h(-3)
 =3.3+1.0+2.0+(-1).0 =9

 n=1,
 =x(0)h(1) + x(1)h(0) + x(2)h(-1) + x(3)h(-2)
 =3.2+1.3+2.0+(-1).0 =9

the input sequence x(n)={3^,1,2,-1} sequence is applied to
discrete time processor with unit sample response
h(n)={3^,2,1}
  

 n=2,

 =x(0)h(2) + x(1)h(1) + x(2)h(0) + x(3)h(-1)


 =3.1+1.2+2.3+(-1).0

 =11

  

 n=3,

 =x(0)h(3) + x(1)h(2) + x(2)h(1) + x(3)h(0)


 =3.0+1.1+2.2+(-1).3

 =2
the input sequence x(n)={3^,1,2,-1} sequence is applied to
discrete time processor with unit sample response
h(n)={3^,2,1}
 
 n=4,

 =x(0)h(4) + x(1)h(3) + x(2)h(2) + x(3)h(1)


 =3.0+1.0+2.1+(-1).2

 =0

  

 n=5,

 =x(0)h(5) + x(1)h(4) + x(2)h(3) + x(3)h(3)


 =3.0+1.0+2.0+(-1).1

 = -1

  

 Thus , y(n) = {9^,9,11,2,0,-1}


the input sequence x(n)={3^,1,2,-1} sequence is applied to
discrete time processor with unit sample response
h(n)={3^,2,1}
 
 n=4,

 =x(0)h(4) + x(1)h(3) + x(2)h(2) + x(3)h(1)


 =3.0+1.0+2.1+(-1).2

 =0

  

 n=5,

 =x(0)h(5) + x(1)h(4) + x(2)h(3) + x(3)h(3)


 =3.0+1.0+2.0+(-1).1

 = -1

  

 Thus , y(n) = {9^,9,11,2,0,-1}


Tabular Digital Convolution
 Step-1: List the index k covering a sufficient range.

 Step-2: List the input x[k]

 Step-3: Obtain the reversed sequence ℎ[−k] , and align


the rightmost element of ℎ[𝑛 − k] to the leftmost
element of x[𝑛].

 Step-4: Cross-multiply and sum the nonzero overlap


terms to produce y[𝑛].

 Step-5: Slide ℎ[𝑛 − k] to the right by one position.

 Step-6: Repeat Step 4; stop if all the output values are


zero or if required. 17
Tabular Digital Convolution
Example-1: Write the equation of following signals in the graphs.

Solution

a) x[n] = 2δ[n] + δ[n-1] - 2δ[n-2] or


x[n] = [2, 1, 2]

b) h[n] = δ[n] + 2δ[n-1] - δ[n-2] or


h[n] = [1, 2, -1]
Tabular Digital Convolution
Example-1: Write the equation of following signals in the graphs.

Solution

a) x[n] = 2δ[n] + δ[n-1] - 2δ[n-2] or


x[n] = [2, 1, 2]

b) h[n] = δ[n] + 2δ[n-1] - δ[n-2] or


h[n] = [1, 2, -1]
Tabular Digital Convolution
Example-1: Write the equation of following signals in the graphs.

Solution

a) x[n] = 2δ[n] + δ[n-1] - 2δ[n-2] or


x[n] = [2, 1, 2]

b) h[n] = δ[n] + 2δ[n-1] - δ[n-2] or


h[n] = [1, 2, -1]
Tabular Digital Convolution
Example-1: Find the output if x[n] = [2, 1, 2], and
h[n] = [1, 2, -1].

The output is the sum of the products of the


input samples andY[n]
the=impulse
[2, 5, -2,response samples.
-5, 2] 21
Tabular Digital Convolution
Example-2: Find the output using convolution if x[n]
= [1, 2, 3, 1], and h[n] = [1, 2, 1, -1].

22
Tabular Digital Convolution
Example-3: Using the sequences defined in the following figure,
evaluate the digital convolution by the tabular method.
Tabular Digital Convolution
Tabular Digital Convolution
Tabular Digital Convolution
Tabular Digital Convolution
Tabular Digital Convolution
Tabular Digital Convolution

Y[n] = [9, 9, 11, 5, 2]


Tabular Digital Convolution
Example-4: Convolve the following two rectangular sequences using the tabular
method.
Tabular Digital Convolution
Exercise-1: Find the convolution of the two sequences x[n] and h[n] given by,

Exercise-2: Find the convolution of the two sequences x[n] and h[n] given by,
Tabular Digital Convolution
Exercise-3: determine the output for the first three samples of ℎ[n] using the
tabular method. Where x[n] = u[n] and h[n] = (0.25)nu[n]

Solution
Graphical Digital Convolution

33
Graphical Digital Convolution
Example-5: Using the sequences defined in Figure, evaluate the digital convolution.
X=[3 1 2 ] h=[ 3 2 1]

34
Graphical Digital Convolution

35
Graphical Digital Convolution

36
Graphical Digital Convolution

Y[n] = [9, 9, 11, 5, 2]


37
Graphic Digital Convolution

Example-6:
Input Signal
x[n] = [2, 1, 2]
Impulse Response
h[n] = [1, 2, -1]
Output Signal
Y[n] = [2, 5, -2, -5, 2]

38
Convolution by Formula Method
Example-7: Using the sequences defined in Figure, evaluate the digital convolution.

Y[n] = [9, 9, 11, 5, 2

39
Properties of Convolution

40
Graphical Approach
Graphical Approach

Similarly we can find y(3)=3 ,y(4)= -2 ,


y(5) =- 1,as the upper bound is 2+3 = 5
so we will stop here. and as the lower
bound is 0+(-1) = -1 we have to find
y (-1).

For that we have to shift h(-k) to left by


1 position to get h(-1-k)
Graphical Approach
 only 0th and 1st ,2nd ,3rd positions
in both sequences holds non
zero values so the product will
have value in only those placed .
 
now y(2)= sum of all terms in (2)
= -1+2+6+1 = 8
Example:

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Example:

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Example:

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Example:

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Example:

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Example:
• Consider the input x[n] = {2, 3, 4} of a LTI system and
impulse response h[n] = {2, 1}. Find out the
convolution sum of output y[n] of the LTI system.
Solution:
• Given,
• The input of the LTI system, x[n] = {2, 3, 4}
• The impulse response h[n] = {2, 1}.
• Form the convolution sum theorem, the order of the
index of impulse response will de changed as h[-n] =
{1, 2}.

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


• Now the convolution sum output will be
computed using the equation

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

• Now, we compute, y(0), y(1), y(2), y(3),


y(4), ......

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


2 3 4
y ( 0)  4
1 2
0 4 0

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


2 3 4
y (1)  8
1 2
0 2 6 0

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


2 3 4
y (2)   11
1 2
0 3 8

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


2 3 4
y (3)  4
1 2
0 4 0

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


2 3 4 0 0
y (4)  0
0 0 0 1 2
0 0 0

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Figure: Output, y(n):

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Properties of Convolution

57
properties of convolution sum?
 Commutative :-

The convolution operation is Commutative,


x(n)*h(n)= h(n)*x(n)
proof:
from the definition of convolution ,

let ( n- k)=p , now as


.

= h(n)*x(n)
Hence it is cumulative.
properties of convolution sum?
 
Distributive with respect to addition :-
The convolution operation is distributive with respect to addition ,
x(n)
 
proof:
from the definition of convolution
 
x(n)

 
Thus , The convolution operation is distributive with respect to addition.
properties of convolution sum?
 
Associative :-
The convolution operation is associative,

 
Proof :

 
Since convolution is commutative
y(n-k)*h(n-k)= h(n-k)*y(n-k)
 
hence ,

 
 

 
 
properties of convolution sum?
 
hence ,
 
 

 
 

 
 

 
=>h(n)*[x(n)*y(n)] =[x(n)*y(n)]*h(n)
Thus convolution is associative
Types of LTI System ?
 
Casual anti-causal
The output of a causal system depends at most on current or past inputs like
x(n),x(n-1),x(n-2)……..
But never on future inputs.
The output of a LTI system is given by convolution of x(n) and h(n) [unit
sample response ],
y(n)=x(n)*h(n)

+
 
Types of LTI System ?

1.Casual anti-causal
2.Stable Unstable
3.Static Dynamic
4.FIR IIR
5.Recursive non Recursive
Types of LTI System ?
 
Casual anti-causal
 
Here n+2 , n+2 …are the future inputs so for the causality properties h(-1) =
h(-2) =…….=0
Means h(n) =0 ,when n< 0
 
Hence for LTI system causality condition is given by

 
output of a causal discrete LTI system

output of an anti-causal discrete LTI system


Types of LTI System ?

 
Stable unstable
For a bounded set input is a system generates a bounded output then it is
called stable system and unstable otherwise
Output of LTI system is given by,
y(n)=x(n)*h(n)

If the input sequence is bounded then the necessity condition for stability is
 
Types of LTI System ?

 
Static dynamic
If the output of any system only depends on the current inputs and no storage
is needed then the system is called static and dynamic otherwise.
is a static system.
 
FIR and IIR
Depending on the impulse response sequence the system is divided into two
classes ,if the impulse response sequence is of finite duration then the system
is called FIR,If h(n) is non-zero for n=0 to n- N-1, then the equation for FIR
system is given by 

 
if the impulse response sequence is of infinite duration then the system is
called IIR, 
If h(n) is non-zero for n>0 , then the equation for IIR system is given by
 
Types of LTI System ?

 
Types of LTI System ?

 
Recursive non recursive
There are some system which not only requires the past and current inputs to
generate desired output, but also it needs the already available past outputs .
 
Consider a system tries to calculate cumulative average of x(n) in the interval
Defined as ,

To compute this the system needs to store all the input samples, and with the
increase of n the storage requirement increases in time.
 
This could be simplified as storing some past outputs like y(n-1)
 
Types of LTI System ?
 Recursive non recursive

 
In general , a system who’s output y(n) at time n depends on any number of
past output values y(n-1), y(n-2),…………is called a recursive system

The general difference equation of LTI system?


The zero state response or relaxed response of a recursive system is given
by ,
 
Types of LTI System ?

 The general difference equation for LTI system is expressed as,

 
,
y(n)

Norder of the system


 
Now N=1,M=0,,
And y(n)=ay(n-1) +x(n)
=
+

 
Now
 
Types of LTI System ?

 The general difference equation for LTI system is expressed as,

 
Now

 
Consider,
y(n)= -x(n)
y(0)= -x(0)
y(1)= -x(1)
= -x(0) } + x(1)
= (- y(-1) + (-x(0) +x(1)
Y(2) = (- y(-1)+ (-x(0) +(-x(1) + x(2)
Correlation
 Correlation addresses the question: “to what
degree is signal A similar to signal B.”
 An intuitive answer can be developed by
comparing deterministic signals with
stochastic signals.
 Deterministic = a predictable signal equivalent to
that produced by a mathematical function
 Stochastic = an unpredictable signal equivalent to
that produced by a random process
Correlation

 Correlation is maximum when


 Two signals are similar in shape
 And are in phase (or unshifted)
 Correlationis measure of similarity
between two signals as a function of
time shift between them
Correlation
 Correlation functions shows how similar two
signals are, and how long they remain similar when
one is shifted with respect to the other
Correlation
 Correlation functions shows how similar two
signals are, and how long they remain similar when
one is shifted with respect to the other
Correlation
A measure of similarity between a pair of
energy signals, x[n] and y[n], is given by the
cross-correlation sequence rxy[l]

 Where the parameter l is called lag, indicating


the time-shift between the pair of signals.

76
Correlation
 There are applications where it is necessary to compare one
reference signal with one or more signals to determine the similarity
between the pair and to determine additional information based on
the similarity.

 In digital communications, a set of data symbols are represented by


a set of unique discrete-time sequences.

 If one of these sequences has been transmitted, the receiver has to


determine which particular sequence has been received, by
comparing the received signal with every member of possible
sequences from the set.

 Similarly correlation can also be used for timing or distance recovery


purpose (e.g., RADAR, SONAR, CDMA receiver, Ultrasound etc.)
77
Cross Correlation

78
Cross Correlation

The number of samples N in the output signal will be

N = M1 + M2 – 1

Where
M1 is the number of samples in sequence x1[x]
M2 is the number of samples in sequence x2[x]

79
Cross Correlation
Example-8: Find the correlation b/w the two sequences x[n] and y[n] given by,

80
Cross Correlation
Example-9: Find the correlation b/w the two sequences x[n] and y[n] given by,

81
Cross Correlation

Cross correlation does not exhibit Commutative

82
Cross Correlation
Example-10: Find the correlation of the two sequences x[n] and
y[n] represented by,

x[n] = [1, 2, 3, 4] y[n] = [5, 6, 7, 8]

Solution

Yxy[n] = [8, 23, 44, 70, 56, 39, 20]

83
Cross Correlation
Example-11: Find the correlation of the two sequences x[n] and
y[n] represented by,

x[n] = [1, 1, 1, 1] y[n] = [1, 2, 3]

Solution

Yxy[n] = [3, 5, 6, 6, 3, 1]

84
Cross Correlation
Excersize-1: Find the correlation of the two sequences x[n] and y[n] represented by,

Excersize-2: Find the correlation of the two sequences x[n] and y[n] represented by,

85
Correlation Between Signals X and Y

86
Correlation Between Signals X and Z

87
Autocorrelation

 Correlating a signal with itself


rxx  l    x  n  x  n  l   rxx  l  l  0, 1, 2,
n 
Auto Correlation

89
Auto Correlation

o Recovering a repeating pattern, or any periodic signal from its


highly-noisy version

o Recovering fundamental frequency of an otherwise random


signal

90
Auto Correlation

The number of samples N in the output signal will be

N = 2×M – 1

Where,
M is the number of samples in the sequence x[n]

91
Auto Correlation
Example: Find the auto correlation of the following sequence

x[n] = [1, 2, 3, 4]

Solution

Yxx[n] = [4, 11, 20, 30, 20, 11, 4]

92
Auto Correlation
Example: Find the auto correlation of the following sequence

x[n] = [1, 2, 3, 4]

Solution

Yxx[n] = [4, 11, 20, 30, 20, 11, 4]

93
Thanks for your
attention

You might also like