0% found this document useful (0 votes)
11 views

Lecture-4

Digital Signal Processing

Uploaded by

Mahidur Rahman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Lecture-4

Digital Signal Processing

Uploaded by

Mahidur Rahman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Digital Signal Processing

Topic-04
Dr Kazi Rafiqul Islam
Overview
• Convolution
• Tabular Digital Convolution
• Boundary Effects
• Graphical Digital Convolution
• Convolution by Formula Method
• Properties of Convolution
• Correlation
• Cross Correlation
• Auto Correlation
Convolution
• Convolution combines an input x[n] with a system impulse response h[n] to
produce a filter output y[n].

• This statement may be expressed as y[n] = x[n] * h[n] defined as:

• or, equivalently,

This sum of products (or convolution sum) is in fact a function of n that represents the
overlap between x[n] and the time-reversed and shifted version of h[n].
Convolution

The number of samples N in the output signal y[n] will be

N = M 1 + M2 – 1

Where,
M1 is the number of samples in sequence x[x]
M2 is the number of samples in sequence h[x]

4
Difference Equation & Convolution
• The general form of the recursive difference equation is

• The general form of the convolution is

• So the convolution has non-recursive relation with the


difference equation.

5
Convolution
Digital convolution can be performed by the following methods

• Tabular method
• Graphical method
• Formula method

6
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. 7
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 and
the impulse response samples.

Y[n] = [2, 5, -2, -5, 2]


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

10
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
Boundary Effects
• Quite often nothing is known about input activity that
precedes and follows the selection of input samples used for a
convolution.
• This means that the calculations of the first few and the last
few output samples will be uncertain, because they rely on
unknown data.
• These output samples are said to be influenced by boundary
effects.
• In analyzing an output signal, it is usually best to discount
these samples.
• Fortunately, real signal analyses generally involve thousands
of samples, so neglecting a few at the beginning and end will
not have a major impact on the output.

21
Boundary Effects
Example-A of boundary effect which happens when the input sequence x[n] and the
impulse response h[n] of the system are not completely overlapped.

Boundary effect can diminish if the impulse response samples are small.

? = output samples affected by boundary effect.

22
Boundary Effects
• Initial boundary effects may also be interpreted as output transients.

• Transient behavior is the relatively short-term behavior exhibited by a system output.

• Steady state part of the output is the long term behavior.

• FIR (finite impulse response) filters reach a clear steady state because their impulse
responses have a finite number of samples, and can therefore can be shifted such that the
impulse response samples are completely contained by the input signal, and do not extend
into regions of unknown inputs.

• IIR (infinite impulse response) filters never reach a true steady state, because some of the
infinite number of impulse response samples must inevitably lie outside the range of known
input samples.

• However, the impulse response samples for stable filters, the only kind normally used, grow
smaller with time.

• Thus, an approximate steady state is reached when only very small impulse response
samples are combined with unknown inputs. 23
Boundary Effects
Example-B: The input to a system is the unit step u[n]. The impulse response of the system
is given by h[n] = 0.4δ[n] – δ[n - 1] +0.7δ[n - 2]. Find the output of the system using
convolution and identify the transient and steady state portion of the output.

24
Boundary Effects
Example-C: Use convolution to find the step response of the system whose impulse
response is h[n] = (-0.55)nu[n]

25
Graphical Digital Convolution

26
Graphical Digital Convolution
Example-5: Using the sequences defined in Figure, evaluate the digital convolution.

27
Graphical Digital Convolution

28
Graphical Digital Convolution

29
Graphical Digital Convolution

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


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]

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

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

32
Properties of Convolution

33
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.

34
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.) 35
Cross Correlation

36
Cross Correlation

The number of samples N in the output signal will be

N = M 1 + M2 – 1

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

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

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

39
Cross Correlation

Cross correlation does not exhibit Commutative

40
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]

41
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]

42
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,

43
Correlation Between Signals X and Y

44
Correlation Between Signals X and Z

45
Auto Correlation

46
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

47
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]

48
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]

49
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]

50

You might also like