Week 4-6 Convolution Correlation
Week 4-6 Convolution Correlation
• A memoryless system does not have memory to store any input values because it just operates on the current
input. For example, an ‘R’ circuit; resistor doesn’t store any current and voltage and the output depends only on
the present state of the input.
• If a system’s output depends also on the past or future state of the input, then we can call it a system with
memory. For example, an ‘RC’ circuit; in here, capacitor stores voltage. So, the output of the system depends not
only on the present state of the input as well as on the some sort of past state of input.
R R C
+ V#$% + V#$%
+ +
V!" - - V!" - -
a)y(t) = x ! (t)
b)y[n] = x n + x[n − 2]
Ans:
(a)The system is memoryless because the output at time t depends only on
the input at time t.
(b) The system is not memoryless because y[n] depends not only on x n
but also on x[n − 2], which is a previous input, and thus it needs memory
to store x[n − 2] when processing the input at time n.
qPractice Problems:
Determine if the following systems are memoryless or not
a) y(t) = x(3t)
b) y[n] = 5x n All memoryless or static
c) y(t) = x(cos t)
Compression (Decimation or Down-sampling) is the process of reducing
the sampling rate. For downsampling, f" > f#
amplitud amplitude
e
t $ < t # ⇛ f" > f#
t" Downsampler t#
n (↓) n
- - - - 01234 - - 0 1 2
Figure 4:
4 3 21 2 1
Downsampling
qExpression: y n = x Mn
Where, M is a positive integer and called a compressor. It has value greater than 1.
qNumerical Examples:
Suppose, a signal is sampled at a sampling rate of f! , shown in figure 5. Now compress
"
the sampled signal so that the new sampling frequency becomes ! .
#
amplitude
amplitude
8
8 6
6 4
4 2
2 n
n -8 -6 -4 -2 0 2 4 6 8
-8 -6 -4 -2 0 2 4 6 8
amplitude amplitude
Figure 5: A Numerical Example of Downsampling 8 8
2 2
n n
-2 -1 0 1 2 -2 -1 0 1 2
qPractice Problems: Downsample the following signals shown in figure 7 and 8
amplitude amplitude
Assume M=3
8 Assume M=2
6
6
4
2 4 8 4
2 6 4 6 8
2
n
-2 n
-8 -6 -4 -2 0 -2
-4
-4 -2 0 2
-6
-6
-8
1
= {𝑥 𝑛 + 𝑀% + 𝑥 𝑛 + 𝑀% − 1 + 𝑥 𝑛 + 𝑀% − 2 + ⋯ + 𝑥 𝑛
𝑀% + 𝑀! + 1
+ 𝑥 𝑛 − 1 + 𝑥 𝑛 − 2 + ⋯ + 𝑥 𝑛 − 𝑀! }
The system compute the nth sample of the output sequence as the average of
(𝑀% + 𝑀! + 1) samples of the input sequence around the nth samples.
14
• If x=[0,1,2,4,4,5,8,9,5,6,4,8,2,1,3,6,9,8,9,9,6,4,2,0]
• The procedure of finding output using moving average method for 5 point is:
• 𝑦 0 =𝑥 0
'
• 𝑦1 = 𝑥 0 +𝑥 1
(
'
• 𝑦 2 = (𝑥 0 + 𝑥 1 + 𝑥 2 )
)
'
• 𝑦 3 = (𝑥 0 + 𝑥 1 + 𝑥 2 + 𝑥[3])
*
'
• 𝑦 4 = (𝑥 0 + 𝑥 1 + 𝑥 2 + 𝑥 3 + 𝑥[4])
+
'
• 𝑦 5 = (𝑥 1 + 𝑥 2 + 𝑥 3 + 𝑥 4 + 𝑥[5])
+
'
• 𝑦 6 = (𝑥 2 + 𝑥 3 + 𝑥 4 + 𝑥 5 + 𝑥[6])
+
• …….………..
'
• 𝑦 24 = (𝑥 20 + 𝑥 21 + 𝑥 22 + 𝑥 23 + 𝑥[24])
+
Difference Equation
Representation of the
Moving-Average System
Block Diagram
16
The frequency response is - 1"
1
𝐻 𝑒 ,- = = 𝑒 0,-.
𝑀' + 𝑀( + 1
./01!
2𝑀! + 1
1 sin[𝜔 ]
𝐻 𝑒 *+
= 2
2𝑀! + 1 𝜔
sin
2
Taking different limiting value of 𝑀! 𝑎𝑛𝑑 𝑀% we can plot the magnitude and phase
of the frequency response of the moving average system.
17
taking 𝑀! = 0 𝑎𝑛𝑑 𝑀" = 4, magnitude and phase of the frequency response of the
moving average system is plotted.
Where,
• Convolution combines an input x[n] with a system impulse response h[n] to
produce a filter output y[n].
• 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].
The number of samples N in the output signal y[n] will be
N = M1 + M2 – 1
Where,
M1 is the number of samples in sequence x[x]
M2 is the number of samples in sequence h[x]
24
• The general form of the recursive difference equation is
25
Digital convolution can be performed by the
following methods
• Tabular method
• Graphical method
• Formula method
26
• Step-1: List the index k covering a sufficient range.
• Step-6: Repeat Step 4; stop if all the output values are zero
or if required. 27
Example-1: Write the equation of following signals in the graphs.
Solution
30
Example-3: Using the sequences defined in the following figure,
evaluate the digital convolution by the tabular method.
Y[n] = [9, 9, 11, 5, 2]
Example-4: Convolve the following two rectangular sequences using the tabular
method.
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,
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
41
Example-5: Using the sequences defined in Figure, evaluate the digital convolution.
42
43
44
Y[n] = [9, 9, 11, 5, 2] 45
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]
46
Example-7: Using the sequences defined in Figure, evaluate the digital convolution.
47
48
• A measure of similarity between a pair of energy
signals, x[n] and y[n], is given by the cross-
correlation sequence rxy[l]
49
• 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.
52
Example-9: Find the correlation b/w the two sequences x[n] and y[n] given by,
53
Cross correlation does not exhibit Commutative
54
Example-10: Find the correlation of the two sequences x[n] and
y[n] represented by,
Solution
55
Example-11: Find the correlation of the two sequences x[n] and
y[n] represented by,
Solution
Yxy[n] = [3, 5, 6, 6, 3, 1]
56
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,
57
58
59
60
Recovering a repeating pattern, or any periodic signal from its highly-
noisy version
Recovering the fundamental frequency of an otherwise random
signal
Solution
Yxx[n] = [4, 11, 20, 30, 20, 11, 4]
62
63