Class 6 Notes
Class 6 Notes
• Example - The impulse response of the • Example - The impulse response of the
system discrete-time accumulator
y[n] � �1x[n] � � 2 x[n � 1] � � 3 x[n � 2] � � 4 x[n � 3] n
is obtained by setting x[n] = �[n] resulting
y[n] � � x[�]
� � ��
in
is obtained by setting x[n] = �[n] resulting
h[n] � �1� [n] � � 2� [n � 1] � � 3� [n � 2] � � 4� [n � 3] in n
• The impulse response is thus a finite-length h[n] � � � [�] � � [n]
sequence of length 4 given by � � ��
{h[n]} � {�1, � 2 , � 3 , � 4}
43
� Copyright © 2005, S. K. Mitra
44
Copyright © 2005, S. K. Mitra
Time-
Time-Domain Characterization Time-
Time-Domain Characterization
of LTI Discrete-
Discrete-Time System of LTI Discrete-
Discrete-Time System
• Let h[n] denote the impulse response of a • Since the system is time-invariant
LTI discrete-time system input output
• We compute its output y[n] for the input: �[n � 2] � h[n � 2]
x[ n] � 0.5�[ n � 2] � 1.5�[n � 1] � �[ n � 2] � 0.75�[ n � 5]
�[n � 1] � h[n � 1]
• As the system is linear, we can compute its
�[n � 2] � h[n � 2]
outputs for each member of the input
separately and add the individual outputs to �[n � 5] � h[n � 5]
determine y[n]
47 48
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
8
Time-
Time-Domain Characterization Time-
Time-Domain Characterization
of LTI Discrete-
Discrete-Time System of LTI Discrete-
Discrete-Time System
• Likewise, as the system is linear
input output • Now, any arbitrary input sequence x[n] can
0.5�[n � 2] � 0.5h[n � 2] be expressed as a linear combination of
1.5�[n � 1] � 1.5h[n � 1] delayed and advanced unit sample
� �[n � 2] � � h[n � 2] sequences in the form
�
0.75�[n � 5] � 0.75h[n � 5] x[n] � � x[k ] �[n � k ]
• Hence because of the linearity property we k � ��
get • The response of the LTI system to an input
y[n] � 0.5h[n � 2] � 1.5h[n � 1]
x[ k ] �[n � k ] will be x[k ] h[n � k ]
49
� h[n � 2] � 0.75h[n � 5] 50
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Time-
Time-Domain Characterization
Convolution Sum
of LTI Discrete-
Discrete-Time System
• Hence, the response y[n] to an input • The summation
� � �
x[ n] � � x[k ] �[ n � k ] y[n] � � x[k ] h[n � k ] � � x[n � k ] h[n]
k � �� k � �� k � ��
will be � is called the convolution sum of the
y[n] � � x[k ] h[ n � k ] sequences x[n] and h[n] and represented
k � ��
which can be alternately written as compactly as
� y[n] = x[n] * h[n]
y[n] � � x[n � k ] h[k ]
51 k � �� 52
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
9
Convolution Sum Convolution Sum
• Schematic Representation - • We illustrate the convolution operation for
the following two sequences:
h[n � k ] v[k ]
h[� k ] zn � � y[n] �1, 0 � n � 5
k x[ n] � �
x[k ] �0, otherwise
• The computation of an output sample using �1.8 � 0.3n, 0 � n � 5
h[ n] � �
the convolution sum is simply a sum of � 0, otherwise
products • Figures on the next several slides the steps
• Involves fairly simple operations such as involved in the computation of
55
additions, multiplications, and delays 56
y[n] = x[n] * h[n]
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Amplitude
1
0.5 1
0
0
-0.5
-10 0 10 k� -10 0 10 k �
y[-4] y[n]
8 8
6 6
Amplitude
Amplitude
4 4
2 2
0 0
-10 0 10 -10 0 10
n n
57 58
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Amplitude
Amplitude
Amplitude
1 1
0.5 1 0.5 1
0 0 0
0
-0.5 -0.5
-10 0 10 -10 0 10 -10 0 10 -10 0 10
y[-1] k� y[n] k� y[0] k� y[n] k�
8 8 8 8
6 6 6 6
Amplitude
Amplitude
Amplitude
Amplitude
4 4 4 4
2 2 2 2
0 0 0 0
-10 0 10 -10 0 10 -10 0 10 -10 0 10
59 n n 60 n n
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
10
Convolution Sum Convolution Sum
Plot of x[1- k] and h[k] h[k]x[1- k] Plot of x[3- k] and h[k] h[k]x[3- k]
2 3 2 3
1.5 1.5
2 2
Amplitude
Amplitude
Amplitude
Amplitude
1 1
0.5 1 0.5 1
0 0 0 0
-0.5 -0.5
-10 0 10 -10 0 10 -10 0 10 -10 0 10
k� k� k� k�
y[1] y[n] y[3] y[n]
8 8 8 8
6 6 6 6
Amplitude
Amplitude
Amplitude
Amplitude
4 4 4 4
2 2 2 2
0 0 0 0
-10 0 10 -10 0 10 -10 0 10 -10 0 10
61 n n 62 n n
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Amplitude
Amplitude
Amplitude
1 1
0.5 1 0.5 1
0 0 0 0
-0.5 -0.5
-10 0 10
k�
-10 0 10
k�
-10 0 10 k� -10 0 10 k�
y[5] y[n] y[7] y[n]
8 8 8 8
6 6 6 6
Amplitude
Amplitude
Amplitude
Amplitude
4 4 4 4
2 2 2 2
0 0 0 0
-10 0 10 -10 0 10 -10 0 10 -10 0 10
63 n n 64 n n
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Amplitude
Amplitude
Amplitude
1 1
0.5 1 0.5 1
0 0 0 0
-0.5 -0.5
-10 0 10 -10 0 10 -10 0 10 -10 0 10
k� k� k� k�
y[9] y[n] y[10] y[n]
8 8 8 8
6 6 6 6
Amplitude
Amplitude
Amplitude
Amplitude
4 4 4 4
2 2 2 2
0 0 0 0
-10 0 10 -10 0 10 -10 0 10 -10 0 10
65 n n 66 n n
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
11
Convolution Sum Convolution Sum
Plot of x[12- k] and h[k] h[k]x[12- k] Plot of x[13- k] and h[k] h[k]x[13- k]
2 3 2 3
1.5 1.5
2 2
Amplitude
Amplitude
Amplitude
Amplitude
1 1
0.5 1 0.5 1
0 0 0 0
-0.5 -0.5
-10 0 10
k�
-10 0 10
k�
-10 0 10 k� -10 0 10 k�
y[12] y[n] y[13] y[n]
8 8 8 8
6 6 6 6
Amplitude
Amplitude
Amplitude
Amplitude
4 4 4 4
2 2 2 2
0 0 0 0
-10 0 10 -10 0 10 -10 0 10 -10 0 10
67 n n 68 n n
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Time-
Time-Domain Characterization Time-
Time-Domain Characterization
of LTI Discrete-
Discrete-Time System of LTI Discrete-
Discrete-Time System
• In practice, if either the input or the impulse • If both the input sequence and the impulse
response is of finite length, the convolution response sequence are of infinite length,
sum can be used to compute the output convolution sum cannot be used to compute
sample as it involves a finite sum of the output
products • For systems characterized by an infinite
• If both the input sequence and the impulse impulse response sequence, an alternate
response sequence are of finite length, the time-domain description involving a finite
output sequence is also of finite length sum of products will be considered
69 70
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Time-
Time-Domain Characterization Time-
Time-Domain Characterization
of LTI Discrete-
Discrete-Time System of LTI Discrete-
Discrete-Time System
• Example - Develop the sequence y[n] • As can be seen from the shifted time-
generated by the convolution of the reversed version {h[n � k ]} for n < 0, shown
sequences x[n] and h[n] shown below below for n � �3 , for any value of the
x[n]
sample index k, the k-th sample of either
3 h[n] {x[k]} or {h[n � k ]} is zero
2
1 1 h[�3 � k ]
0
2
3
4
n 0 1 2
3
n 2
1
–1 –1 1
–2
–6
–5 –4 –3 –2 –1 0
k
–1
71 72
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
12
Time-
Time-Domain Characterization Time-
Time-Domain Characterization
of LTI Discrete-
Discrete-Time System of LTI Discrete-
Discrete-Time System
• As a result, for n < 0, the product of the k-th • The product sequence {x[k ]h[�k ]} is plotted
samples of {x[k]} and {h[n � k ]} is always below which has a single nonzero sample
zero, and hence x[0]h[0] for k = 0
y[n] = 0 for n < 0 x[k ]h[ � k ]
0
k
• Consider now the computation of y[0] –5 –4 –3 –2 –1 1 2 3
• The sequence h[ � k ] –2
{h[� k ]} is shown
2
1
–3
• Thus y[0] � x[0]h[0] � �2
k
on the right –1
–6 –5 –4 –2 –1 0 1 2 3
73 74
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Time-
Time-Domain Characterization Time-
Time-Domain Characterization
of LTI Discrete-
Discrete-Time System of LTI Discrete-
Discrete-Time System
• For the computation of y[1], we shift {h[�k ]} • To calculate y[2], we form {h[2 � k ]} as
to the right by one sample period to form shown below on the left
{h[1 � k ]} as shown below on the left • The product sequence {x[k ]h[2 � k ]} is
• The product sequence {x[k ]h[1 � k ]} is plotted below on the right
shown below on the right h[ 2 � k ]
h[1 � k ] x[k ]h[1 � k ] 2
x[ k ]h[ 2 � k ]
0
2
2 3
k –1
1 1
k
–5 –4 –3 –2 –1 1
1
–4 –3 –2 0 1 2 3 4 5
k –3 –2 –1 0
–2 1 2 3 4 5 6
–5 –4 –3 –1 0 1 2 3
k –1
–1
–4
75 • Hence, y[1] � x[0]h[1] � x[1]h[0] � �4 � 0 � �4 76 y[2] � x[0]h[2] � x[1]h[1] � x[2]h[0] � 0 � 0 � 1 � 1
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Time-
Time-Domain Characterization Time-
Time-Domain Characterization
of LTI Discrete-
Discrete-Time System of LTI Discrete-
Discrete-Time System
• Continuing the process we get • From the plot of {h[n � k ]} for n > 7 and the
y[3] � x[0]h[3] � x[1]h[2] � x[2]h[1] � x[3]h[0] plot of {x[k]} as shown below, it can be
� 2 � 0 � 0 �1 � 3 seen that there is no overlap between these
two sequences
y[4] � x[1]h[3] � x[2]h[2] � x[3]h[1] � x[4]h[0]
� 0 � 0 � 2 � 3 �1 • As a result y[n] = 0 for n > 7
y[5] � x[2]h[3] � x[3]h[2] � x[4]h[1] x[k] h[8 � k ]
� �1 � 0 � 6 � 5 3
2
y[6] � x[3]h[3] � x[4]h[2] � 1 � 0 � 1 0
1
3
k
5
1
k
y[7] � x[4]h[3] � �3
1 2 4 2 3 4 6 7 8 9 10 11
77 78 –1 –1
Copyright © 2005, S. K. Mitra –2 Copyright © 2005, S. K. Mitra
13
Time-
Time-Domain Characterization
Time-
Time-Domain Characterization of LTI Discrete-
Discrete-Time System
of LTI Discrete-
Discrete-Time System
• Note: The sum of indices of each sample
• The sequence {y[n]} generated by the product inside the convolution sum is equal
convolution sum is shown below to the index of the sample being generated
y[n] by the convolution operation
5
• For example, the computation of y[3] in the
3
previous example involves the products
0 1
1 1 1
7
n
x[0]h[3], x[1]h[2], x[2]h[1], and x[3]h[0]
2 3 9
• The sum of indices in each of these
–2 –1 4 5 6 8
–2
–3 products is equal to 3
79 –4 80
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
14
Tabular Method of Tabular Method of
Convolution Sum Computation Convolution Sum Computation
• The method can also be applied to convolve • Finally, the decimal point is inserted
two finite-length two-sided sequences according to the rules of conventional
• In this case, a decimal point is first placed multiplication
to the right of the sample with the time • The sample immediately to the left of the
index n = 0 for each sequence decimal point is then located at the time
• Next, convolution is computed ignoring the index n = 0
location of the decimal point
85 86
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Simple Interconnection
Convolution Using MATLAB
Schemes
• The M-file conv implements the convolution
sum of two finite-length sequences • Two simple interconnection schemes are:
• If a �[� 2 0 1 � 1 3] • Cascade Connection
b �[1 2 0 -1] • Parallel Connection
then conv(a,b) yields
[� 2 � 4 1 3 1 5 1 � 3]
87 88
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
15
Cascade Connection
Cascade Connection
• An application of the inverse system
• An application is in the development of an concept is in the recovery of a signal x[n]
inverse system from its distorted version xˆ[n] appearing at
the output of a transmission channel
• If the cascade connection satisfies the
relation • If the impulse response of the channel is
h1[n] * h 2[n] � �[n] known, then x[n] can be recovered by
designing an inverse system of the channel
then the LTI system h1[n] is said to be the channel ^ inverse system
inverse of h 2[n] and vice-versa x[n ]
x[n ] h1[n] h2[n] x[n ]
91 92 h1[n] * h 2[n] � �[ n]
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
16
Simple Interconnection Schemes Simple Interconnection Schemes
97 98
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
17