Lec 23-27 LTI Systems&Convolution
Lec 23-27 LTI Systems&Convolution
Signal Processing I
Latha Srinivasan
Assistant Professor
Department of ECE
ASE, Bengaluru
What we have learned last few classes
• Different properties of continuous time and discrete time systems
• Among these properties linearity and time invariance play important role in analysis of signals and systems
• Many physical systems possesses both linearity property and time invariance property.
• A system that possesses linearity and time invariance property is called a Linear Time Invariant (LTI) system.
• Linearity and time invariance properties allow the mathematical analysis of LTI systems to be much simpler
when compared to non linear time variant systems
Why LTI systems are easier to analyse?
• If input to an LTI system -> linear combination of several signals then output -> same linear combination of
the individual outputs
• Let us assume that there is a set of elementary signals, and we know the output for these elementary signals.
• Suppose that any arbitrary signal x(t) can be represented as a linear combination of these elementary signals.
• Output will be the same linear combination of the outputs of these elementary signals
Why LTI systems are easier to analyse?
• Suppose the elementary signals are given by 𝑒1 𝑡 , 𝑒2 𝑡 , … , 𝑒𝑁 𝑡
• We assumed that any arbitrary signal x(t) can be represented using these elementary signals i.e,
• 𝑥 𝑡 = 𝑎1 𝑒1 𝑡 + 𝑎2 𝑒2 𝑡 + ⋯ + 𝑎𝑁 𝑒𝑁 𝑡
• If x(t) is applied as the input to the LTI system what would be the output?
• 𝑦 𝑡 = 𝑎1 𝑟1 𝑡 + 𝑎2 𝑟2 𝑡 + ⋯ + 𝑎𝑁 𝑟𝑁 𝑡
• For any x(t), the set of elementary signals remain same but the coefficients 𝑎1 , 𝑎2 , … , 𝑎𝑁 will be different
Why LTI systems are easier to analyse?
• The same holds true for discrete time systems also
• Let the output for the LTI system corresponding to 𝑒1 [𝑛], 𝑒2 [𝑛], … , 𝑒𝑁 [𝑛] be 𝑟1 [𝑛], 𝑟2 [𝑛], … , 𝑟𝑁 [𝑛] respectively.
• We assumed that any arbitrary discrete time signal x[n] can be represented using these elementary signals i.e,
• If x[n] is applied as the input to the LTI system the output will be 𝑦[𝑛] = 𝑎1 𝑟1 [𝑛] + 𝑎2 𝑟2 [𝑛] + ⋯ + 𝑎𝑁 𝑟𝑁 [𝑛]
• But again, you need to know how to represent x[n] as linear combination of 𝑒1 [𝑛], 𝑒2 [𝑛], … , 𝑒𝑁 [𝑛].
• Assume that all elementary signals 𝑒1 𝑡 , 𝑒2 𝑡 , … , 𝑒𝑁 𝑡 are shifted versions of a single elementary signal e(t).
• i.e, 𝑒1 𝑡 = 𝑒(𝑡 − 𝜏1 ), 𝑒2 𝑡 = 𝑒 𝑡 − 𝜏2 , 𝑒3 𝑡 = 𝑒 𝑡 − 𝜏3 , … 𝑒𝑁 𝑡 = 𝑒 𝑡 − 𝜏𝑁
• Suppose we know the output of the system when e(t) is given as input signal. Let it be r(t).
• 𝑟1 𝑡 = 𝑟(𝑡 − 𝜏1 ), 𝑟2 𝑡 = 𝑟 𝑡 − 𝜏2 , 𝑟3 𝑡 = 𝑟 𝑡 − 𝜏3 , … 𝑟𝑁 𝑡 = 𝑟 𝑡 − 𝜏𝑁
• If you know the output r(t) corresponding to the input as e(t), we can find out the outputs corresponding to 𝑟1 𝑡 , 𝑟2 𝑡 , … , 𝑟𝑁 𝑡
Why LTI systems are easier to analyse?
• The same holds true for discrete time systems also
• Suppose the elementary signal is e[n] whose output r[n] is known to us.
• All the elementary signals given by 𝑒1 [𝑛], 𝑒2 [𝑛], … , 𝑒𝑁 [𝑛] are shifted versions of e[n].
• If the system is time invariant (aka shift invariant) the system outputs corresponding to 𝑒1 [𝑛], 𝑒2 [𝑛], … , 𝑒𝑁 [𝑛]
are 𝑟1 𝑛 = 𝑟 𝑛 − 𝑛1 , 𝑟2 𝑛 = 𝑟 𝑛 − 𝑛2 , … , 𝑟𝑁 𝑛 = 𝑟[𝑛 − 𝑛𝑁 ]respectively.
• To find y(t) you only need to know the output r(t) corresponding to a single elementary signal e(t)
• If you know how to obtain linear combination coefficients 𝑎1 , 𝑎2 , … , 𝑎𝑁 for any arbitrary signal x(t), you need to
know only r(t) to find the corresponding output.
What is the advantage?
• Similarly in the discrete case suppose we can write any arbitrary signal x[n] as 𝑥[𝑛] = 𝑎1 𝑒1 [𝑛] + 𝑎2 𝑒2 [𝑛] +
⋯ + 𝑎𝑁 𝑒𝑁 [𝑛]
• We know the output of the system r[n] when the input is e[n]
Summary
• Assumptions: Any arbitrary signal x(t)/x[n] can be expressed as linear combination of elementary signals
𝑒1 𝑡 /𝑒1 [𝑛], 𝑒2 𝑡 /𝑒2 [𝑛], … , 𝑒𝑁 𝑡 /𝑒𝑁 [𝑛]
• The elementary signals 𝑒1 𝑡 /𝑒1 [𝑛], 𝑒2 𝑡 /𝑒2 [𝑛], … , 𝑒𝑁 𝑡 /𝑒𝑁 [𝑛]are generated as time shifted versions of a basic
signal e(t)/e[n].
• The output of LTI system when the input is e(t)/e[n] is known and is r(t)/r[n]
• Conclusions: Under these assumptions the output of the LTI system due to any arbitrary input x(t)/x[n] can be
computed.
• Do we have such e(t)/e[n] that generates 𝑒1 𝑡 /𝑒1 [𝑛], 𝑒2 𝑡 /𝑒2 [𝑛], … , 𝑒𝑁 𝑡 /𝑒𝑁 [𝑛]?
• If so, what is the value of N? How many elementary signals do we need to represent any arbitrary signal x(t)/x[n]
• Is it finite or infinite?
Answers for the discrete case
• The unit impulse signal 𝛿 𝑛 can be used as e[n].
• Any arbitrary signal x[n] can be represented as a linear combination of the shifted unit impulse signals.
• We obtain 𝑥 𝑛 = 𝑧1 𝑛 + 𝑧2 𝑛 + 𝑧3 𝑛 + 𝑧4 𝑛 + 𝑧5 𝑛
• 𝑧1 𝑛 = −2𝛿 𝑛 + 2
• 𝑧2 𝑛 = 𝛿 𝑛 + 1
• 𝑧3 𝑛 = 2𝛿[𝑛]
• 𝑥 𝑛 = −2𝛿 𝑛 + 2 + 𝛿 𝑛 + 1 + 2𝛿[𝑛] − 𝛿 𝑛 − 1 +
2𝛿[𝑛 − 2]
Another example
• Express the given signal as linear combination of shifted impulse signal
• 𝑥 𝑛 = 3𝛿 𝑛 + 2𝛿 𝑛 − 1 + 𝛿 𝑛 − 2 + 0.5𝛿 𝑛 − 3
• In this way we can represent any x[n] as linear
combination of shifted impulse signals.
• So 𝛿 𝑛 works as basic elementary signal e[n] in discrete
case.
• 𝑒1 [𝑛], 𝑒2 [𝑛], … , 𝑒𝑁 [𝑛] are shifted impulse signals.
• What is N?
• 𝑥 𝑛 = 𝑎−2 𝛿 𝑛 + 2 + 𝑎−1 𝛿 𝑛 + 1 + 𝑎0 𝛿 𝑛 +
𝑎1 𝛿 𝑛 − 1
x 1 𝛿 𝑛 − 1 + x 2 𝛿 𝑛 − 2 + ⋯+ x ∞ 𝛿 𝑛 − ∞
• We know that system is linear and time invariant. Let us consider just the linearity aspect for the time being.
• For computing y[n] we need to know the output of the system when the input is 𝛿 𝑛 + ∞ …, 𝛿 𝑛 + 2 ,
𝛿 𝑛 + 1 ,𝛿 𝑛 , 𝛿 𝑛 − 1 ,𝛿 𝑛 − 2 ,…𝛿 𝑛 − ∞
• In other words we need to know the output of the system corresponding to any 𝛿 𝑛 − 𝑘 .
Output of LTI system
• Let the output corresponding to 𝛿 𝑛 − 𝑘 be ℎ𝑘 [𝑛]
• What is ℎ0 [𝑛]?
• 𝛿[𝑛 − 1] → ℎ0 [𝑛 − 1]
• In general, 𝛿[𝑛 − 𝑘] → ℎ0 [𝑛 − 𝑘]
Output of LTI system
• 𝑦 𝑛 = x −∞ ℎ−∞ 𝑛 + ⋯ + x −2 ℎ−2 𝑛 + x −1 ℎ−1 𝑛 + x 0 ℎ0 𝑛 + x 1 ℎ1 𝑛 + x 2 ℎ2 𝑛 + ⋯ +
x ∞ ℎ∞ 𝑛
• 𝑦 𝑛 = σ∞
𝑘=−∞ 𝑥[𝑘] ℎ0 [𝑛 − 𝑘]
• Subscript 0 of h can be omitted since it is 0 for all values of k. So we can rewrite y[n] as
• 𝑦 𝑛 = σ∞
𝑘=−∞ 𝑥[𝑘] ℎ[𝑛 − 𝑘]
• Where h[n]= ℎ0 [𝑛] is the output of the system when the input is 𝛿[𝑛]
• h[n] is called impulse response of the system as it is the response of the system when a unit impulse signal is
applied at input.
Output of LTI system
• 𝑦 𝑛 = σ∞
𝑘=−∞ 𝑥[𝑘] ℎ[𝑛 − 𝑘] provides the output of the LTI system when the input is any arbitrary discrete time
signal x[n].
• Initially when we studied discrete time systems we represented them using input-output relation. For e.g: 𝑦 𝑛 =
2𝑥 𝑛 + 3, y n = 5x n − 2 + 4x n − 1 + 3x[n]
• 𝑦 𝑛 = σ∞
𝑘=−∞ 𝑥[𝑘] ℎ[𝑛 − 𝑘] is another way of representing input output relation of the LTI system. It
• Above equation is called Convolution sum. It is a mathematical operation between x[n] and h[n]
• Can be seen as an operation that takes x[n] and h[n] and produces y[n]
• 𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ[𝑛]
• Note that convolution is a general mathematical operation that provides a discrete sequence from 2 other
discrete sequence
• For 2 general discrete time sequences 𝑥1 [𝑛] and 𝑥2 [𝑛] the convolution can be written as 𝑥3 𝑛 = 𝑥1 𝑛 ∗
𝑥2 [𝑛]
Convolution sum
• As far as LTI systems are concerned, output y[n] of the system due to input x[n] is obtained by convolving
x[n] with impulse response h[n]
• 𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ 𝑛 = σ∞
𝑘=−∞ 𝑥[𝑘] ℎ 𝑛 − 𝑘
• Find system output y[n] for the given impulse response and input signal for a LTI system?
• 𝑦 𝑛 = σ∞
𝑘=−∞ 𝑥[𝑘] ℎ 𝑛 − 𝑘 = ⋯ + x −2 ℎ 𝑛 + 2 + x −1 ℎ 𝑛 + 1 + x 0 ℎ 𝑛 + x 1 ℎ 𝑛 − 1 +
x 2 ℎ 𝑛−2 +⋯
• 𝑦 𝑛 =x 0 ℎ 𝑛 +x 1 ℎ 𝑛−1 +x 2 ℎ 𝑛−2
Numerical Problem
Numerical Problem
• Obtain the output of the LTI system when the input signal and impulse response are given below:
• 𝑦 𝑛 = σ∞
𝑘=−∞ 𝑥[𝑘] ℎ 𝑛 − 𝑘 = ⋯ + x −2 ℎ 𝑛 + 2 + x −1 ℎ 𝑛 + 1 + x 0 ℎ 𝑛 + x 1 ℎ 𝑛 − 1 +
x 2 ℎ 𝑛−2 +⋯
• 𝑦 𝑛 = x −1 ℎ 𝑛 + 1 + x 0 ℎ 𝑛 + x 1 ℎ 𝑛 − 1
Numerical Problem
𝑦 𝑛 = x −1 ℎ 𝑛 + 1 + x 0 ℎ 𝑛 + x 1 ℎ 𝑛 − 1
Another way of interpreting convolution sum
• 𝑦 𝑛 = σ∞ ∞
𝑘=−∞ 𝑥[𝑘] ℎ 𝑛 − 𝑘 = σ𝑘=−∞ 𝑔[𝑘, 𝑛] where 𝑔[𝑘, 𝑛]= x k ℎ 𝑛 − 𝑘
• To find the output at time instance n=𝑛0 , substitute n=𝑛0 in the above equation
• 𝑦 𝑛0 = σ∞
𝑘=−∞ 𝑔[𝑘, 𝑛0 ]
• The output at time instance n=𝑛0 is obtained by substituting n=𝑛0 and then adding all values of 𝑔[𝑘, 𝑛0 ] for
k=-∞ to ∞
• We can interpret 𝑔[𝑘, 𝑛0 ] as a function of k and we have to add all values of 𝑔[𝑘, 𝑛0 ] for k=-∞ to ∞
• What is 𝑔[𝑘, 𝑛0 ]?
• 𝑔 𝑘, 𝑛0 = x k ℎ 𝑛0 − 𝑘 = x k ℎ −𝑘 + 𝑛0
Another way of interpreting convolution sum
• 𝑔 𝑘, 𝑛0 = x k ℎ 𝑛0 − 𝑘 = x k ℎ −𝑘 + 𝑛0
• What is x[k]?
• Depends on value of 𝑛0
• ℎ −𝑘 + 𝑛0 = ℎ −𝑘 − 2
• ℎ −𝑘 + 𝑛0 = ℎ −𝑘 + 3
• Case 3: 𝑛0 = 0
• ℎ −𝑘 + 𝑛0 = ℎ −𝑘
• Once we get x[k] and ℎ 𝑛0 − 𝑘 , find the product for each value of k.
• For all values of n≥3 we see that there is no overlap between x[k] and h[n-k]. So y[n]=0 for n≥3.
Numerical Example
Simplified graphical method for convolution sum
• To calculate y[-3] , we need x[k] and h[-k-3],get the product and then add over all values of k.
• To get h[-k-3] we need to first shift h[k] by 3 units to right and then reflect it.
• Can we find h[-3-k] in a single step?
Simplified graphical method for convolution sum
x[k] h[-k]
• Now y[-3] can be found by multiplying above h[-3-k] with x[k] and add the values.
• Similarly for y[2] we can find it by adding the product of h[2-k] with x[k] for all values of k.
• If you shift h[-k] further to the left, there will be no overlap. Hence y[n]=0 for n<-3
• In other words, the non-zero values of y[n] starts from n=-3 onwards.
• Next step is to find the largest value of n for which y[n] is non zero. Let us denote it as 𝑛2 . y[n]=0 for all
n>𝑛2 . We have to find it by trial and error. Check for n=3
Numerical Example
• If you shift h[-k] further to the right, there will be no overlap. Hence y[n]=0 for n>4
-4 -3 -2 -1 0
Numerical Example
y[3]=4x1+3x1=7
1 2 3 4
Numerical Example
y[4]=4x1=4
2 3 4 5
• If x[n] has length N1 and h[n] has length N2, what is the length of x[n]*h[n]?
• Consider 2 sequence x[n] and h[n] where x[n] starts at n=p1 and ends at n=p2 and h[n] starts at n=q1 and ends
at n=q2.
• For n≥0
• 𝑦[0] = 1, 𝑦 1 = 1 + 𝛼, 𝑦 2 = 1 + 𝛼 + 𝛼 2 , 𝑦 1 = 1 + 𝛼 + 𝛼 2 +𝛼 3 , …
1−𝛼𝑛+1
• The resultant value will be 1−𝛼
Convolution with infinite sequences
1−𝛼𝑛+1
• 𝑦𝑛 = for n≥0 and 0 otherwise
1−𝛼
1−𝛼𝑛+1
• We can rewrite it as 𝑦 𝑛 = 𝑢[𝑛]
1−𝛼
• Find y[n]=x[n]*h[n]
Problems involving time interval
• Interval 1: n<0, For n<0 we have y[n]=0