Upload
manisman-parida
View
1.866
Download
5
Embed Size (px)
Citation preview
Signals and Networks
Discussion#4
Tarun ChoubisaDept of ETC,
KIIT University
19 January 2011 1
Resources
• O & W
• Ch. 2, Sect. 1-8 in Linear Signals & Systems, 2nd Ed. by Lathi
• http://www.jhu.edu/signals/
• http://www.isip.piconepress.com/projects/speech/software/demonstrations/applets/util/convolution/v6.0/
• http://www.see.ed.ac.uk/~mjj/dspDemos/EE4/tutConv.html
• http://www.see.ed.ac.uk/~mjj/dspDemos/EE4/tutConvDisc.html
• http://dsp.feit.ukim.edu.mk/demos/Konvolucija.html
• http://dsp.feit.ukim.edu.mk/demos/analogconv/Analog%20Convolution.html
• http://users.ece.gatech.edu/~bonnie/book/OnlineDemos/CTConv/
Convolution• Definition: It is the tool or operation to determine the
response of the LTI system (h(n-k) is the output for shifted impulse and x(k) is the coefficient. )
• Convolution between two DT signals x(n) and h(n) is expressed as
Example: x(n) is input , h(n) = [ 1 0.8 0.4 0.01]• x(n)= { 1 3 2 1 2 2 1 1 3 2} y(n)
Put n-k=m where m is a Dummy variable.
Convolution, time-invariance and linearity
[ ]h n m[ ]n m System time-invariance
LTIh[n]
[n] Y[n]=h[n]* [n]=h[n]
Response of at time is h[n].
By time invarianceResponse of m at time n is h[n-m].
n n
Convolution, time-invariance and linearity
convolution is linear and shift/time invariant
Convolution, time-invariance and linearity
Linear time-invariant systems (LTI)• A sequence can be represented as a linear
combination of delayed impulses:
[ ] [ ] [ ]k
x n x k n k
• Let hk[n] be the response to [n-k] (an impulse at n = k)
If the system is linear
If the system is time-invariant
[ ] [ ]
[ ] [ ]k
y n T x n
T x k n k
[ ] [ ] [ ]
[ ] [ ]
[ ] [ ]
k
k
k
y n x k T n k
x k h n
x k h n k
Convolution sum or superposition sum
[ ] [ ] [ ]
[ ] [ ] [ ]
k
y n x k h n k
y n x n h n
• Linear Time-Invariant(LTI) systems can be described by the convolution sum!
Convolution sum
[ ] [ ] [ ]
[ ] [ ] [ ]
x n x k n k
y n x k h n k
k
k nhkxny ][][][
System Representation: Impulse Response
• Example: The discrete-time impulse response
Is completely described by the following LTI
• However, the following systems also have the same impulse response
• Therefore, if the system is non-linear, it is not completely characterised by the impulse response
]1[][][ nxnxny
2[ ] ( [ ] [ 1])
[ ] max( [ ], [ 1])
y n x n x n
y n x n x n
otherwise0
1,01][
nnh
Computing DT Convolution
Convolution: Graphical MethodSteps :
1) Reverse/flip one of the signal to get h[-k]
2) Shift right above signal by n to get h[-(k-n)]=h[n-k]
3) Multiply (dot product) h[n-k] with x[k] and sum up to get sample y[n]
4) Repeat step 2 and 3 for different values of n to get sample y[n]
Convolution: Graphical Method
Convolution: Graphical Method
• Shift by 0 to get y(0)
0 4 1 0 0 0 = 5 = y(0)
Convolution: Graphical Method
• Shift by -1 to get y(-1)
0 0 2 0 0 0 0 = 2 = y(-1)
Convolution: Graphical Method
• Shift by -2 to get y(-2)
0 0 0 0 0 0 0 0 = 0 = y(n) for n < -1
Convolution: Graphical Method
• Shift by 1 to get y(1)
-2 2 -1 0 0 = -1 = y(1)
Convolution: Graphical Method
• If x[n]=0 for n<N1 & h[n] is zero for n<N2, then x[n]*h[n]=0 for n<N1+N2 (O & W Q2.16a).• If x[n]=0 for n>N3 & h[n]=0for n>N4, then x[n]*h[n]=0 for n>N3+N4
Convolution Output: Sum of scaled, shifted impulse response
• Consider a LTI system with the following unit impulse response:
h[n] = [0 0 1 1 1 0 0]
• For the input sequence:
x[n] = [0 0 0.5 2 0 0 0]
• The result is:
y[n] = … + x[0]h[n] + x[1]h[n-1] + …
= 0 + 0.5*[0 0 1 1 1 0 0] +
2.0*[0 0 0 1 1 1 0] +
0
= [0 0 0.5 2.5 2.5 2 0]
Convolution Output: sample by sample• Consider the problem described
for previous example
• Sketch x[k] and h[n-k] for any particular value of n, then multiply the two signals and sum over all values of k.
• For n<0, we see that x[k]h[n-k] = 0 for all k, since the non-zero values of the two signals do not overlap.
• y[0] = kx[k]h[0-k] = 0.5
• y[1] = kx[k]h[1-k] = 0.5+2
• y[2] = kx[k]h[2-k] = 0.5+2
• y[3] = kx[k]h[3-k] = 2
• As found in Example 1
Examples of DT Convolution• Example: unit-pulse
][][][
][][][
][][
nxknkx
knhkxny
nnh
k
k
• Example: delayed unit-pulse
][][][
][][][
][][
00
0
nnxknnkx
knhkxny
nnnh
k
k
• Example: unit step
n
kk
k
kxknukx
knhkxny
nunh
][][][
][][][
][][
Convolution with impulse give the o/p which is equal to i/p
Convolution with shifted impulse give the o/p which is equal to i/p which is shifted by same amount
• Convolution with impulse make the accumulator
Convolution: Decaying signal to finally approach a constant value
Convolution: Decaying signal to finally approach a constant value
Convolution: Mathematical functions(both are infinitely right sided sequences)
• Consider a LTI system that has a impulse response h[n] = u[n] the unit step signal(special case when b=1)
• What is the response when an input signal of the form
x[n] = nu[n]
• where 0< <1, is applied?
• For n 0:
Therefore,
1
1
][
1
0
n
n
k
kny
][1
1][
1
nunyn
• When two causal systems are convolved, the final system will also be causal (O & W Q2.19b). • If x[n]=0 for n<N1 & h[n]=0 for n<N2, then x[n]*h[n]=0 for n<N1+N2 (O & W Q2.16a).
Convolution: Mathematical functions(one isinfinitely right sided and another is finite seq.)
Convolution: Mathematical functions(one isinfinitely right sided and another is finite seq.)
Convolution: Mathematical functions(one isinfinitely right sided and another is finite seq.)
Convolution: Mathematical functions(one isinfinitely right sided and another is finite seq.)
Convolution: Filtering
Convolution: Filtering
Matlab Exploration
Matlab Exploration: Visualization
32
Example: Find y(t) = x(t)*h(t) for x(t) and h(t) shown below using the graphical method. Follow the procedure listed on the previous slide.
0 1
1
x(t)
0 1
2
h(t)
3tt
Solution:
1. Form x( ):
0 1
1
x( )
Example: Convolution Integral of two different duration pulses
33
2. Form h(t - ):
0 1
2
h( )
3 0-1
2
h(- )
-3
0-1
2
h(t- )
-3
t
t-1t-3
Note: Remember that is the independent variable, not t. t is simply a constant. h(t - ) = h(- + t), so t is the amount of time shift.
3. Consider different ranges of t (time-shift):
Each range of t selected should result in different portions of the waveforms overlapping. The convolution y(t) = x(t)*h(t) is the area under the product of the overlapping portions.
Example: Convolution of two different duration pulses
34
3A. First range selected: (- <t < 1):
This range results in no overlap for all values of (i.e., - < < ).
0
2
h(t- )
t-1t-3
h(t- ) sliding as t varies over the range - < t < 1
1
1
No overlap
x( )
1 t -for 0 y(t) so
d0 )-h(t)x( y(t) and
) allfor overlap (no - 0, )-h(t)x(
--
d
Example: Convolution of two pulses
35
3B.Second range selected: (1 <t < 2): Left part come into overlap, right part not
This range results in an overlap from = 0 to = t-1.
0
2
h(t- )
t-1t-3
h(t- ) sliding as t varies over the range 1 < t < 2
1
1
Area of overlap between = 0 and = t-1
x( )
2 t 1for 1)-2(t 2 y(t)
d0 d2 d0 )-h(t)x( y(t) and
1-t0
1-t0221
00
)-h(t)x(
1t
0
0
-
1-t
0 1t-
d
Example: Convolution of two pulses
36
3C.Third range selected: (2 <t < 3): full overlap
This range results in an overlap from = 0 to = 1.
0
2
h(t- )
t-1t-3
h(t- ) sliding as t varies over the range 2 < t < 3
1
1
Area of overlap between = 0 and = 1
x( )
3 t 2for 2 0)-2(1 2 y(t)
d2 )-h(t)x( y(t) and
10
10221
00
)-h(t)x(
1
0
1
0-
d
Example: Convolution of two pulses
37
3D. Fourth range selected: (3 <t < 4): Right part is into overlap, left part go out
This range results in an overlap from = t-3 to = 1.
0
2
h(t- )
t-1t-3
h(t- ) sliding as t varies over the range 3 < t < 4
1
1
Area of overlap between = t-3 and = 1
x( )
4 t 3for 2t -8 t-42 3-t-12 2 y(t)
d2 )-h(t)x( y(t) and
10
13-t221
3t0
)-h(t)x(
1
3t
1
3t-
d
Example: Convolution of two pulses
38
3E.Fifth range selected: (4 <t): fully go outside, no overlap
This range results in no overlap for all values of (i.e., - < < ).
0
2
h(t- )
t-1t-3
h(t- ) sliding as t varies over the
range t > 4
1
1
No overlap
x( )
t 4for 0 y(t) so
d0 )-h(t)x( y(t) and
) allfor overlap (no - 0, )-h(t)x(
--
d
Example: Convolution of two pulses
39
5. Compile the results of y(t) over the five ranges. Also graph y(t).
t 40
4 t 382t-
3 t 22
2 t 12-2t
1 t 0
h(t)* x(t) y(t)
0
2
t431
y(t)
2
Example: Convolution of two pulses
Convolution: A mathematical operator which computes the “amount of overlap” between two functions. Can be thought of as a general moving average
Convolution: Graphical RepresentationFor the first pulseAmp= 0.5Time = -0.5 : 0.5 secGreen one is the output if blue and red will convolve.
Convolution demohttp://www.jhu.edu/signals/http://www.isip.piconepress.com/projects/speech/software/demonstrations/applets/util/convolution/current/index.htmlhttp://dsp.feit.ukim.edu.mk/demos/Konvolucija.htmlhttp://dsp.feit.ukim.edu.mk/demos/analogconv/Analog%20Convolution.htmlhttp://users.ece.gatech.edu/~bonnie/book/OnlineDemos/CTConv/
4 - 41
Communication:Transmit One Bit
• Transmission over communication channel (e.g. telephone line) is analog
h t
)(th
1
p t
)(1 tx
A
‘1’ bit
t
p
)(0 tx
-A
‘0’ bit
Model channel as LTI system with impulse responseh(t)
CommunicationChannel
input output
x(t) y(t)t
t
)(1 tyreceive‘1’ bit
)(0 ty
-A Th
receive ‘0’ bit
h+ p
th+ p
h
h
Assume that Th < Tp
A Th
4 - 42
Transmit Two Bits (Interference)
• Transmitting two bits (pulses) back-to-back will cause overlap (interference) at the receiver
• How do we prevent intersymbolinterference at the receiver?
h t
)(th
1
Assume that Th < Tp
tp
)(tx
A
‘1’ bit ‘0’ bit
p
* =)(ty
-A Th
tp
‘1’ bit ‘0’ bit
h+ p
intersymbol interference
13 - 43
Preventing ISI at Receiver• Option #1: wait Th seconds between pulses in
transmitter (called guard period or guard interval)
Disadvantages? Data rate reduces.
• Option #2: use channel equalizer in receiverFIR filter designed via training sequences sent by transmitterDesign goal: cascade of channel memory and channel
equalizer should give all-pass frequency response
h t
)(th
1
Assume that Th < Tb
* =
tb
)(tx
A
‘1’ bit ‘0’ bit
h+ b
t
)(ty
-A Th
b
‘1’ bit ‘0’ bit
h+ b
h
Convolution: AC Frequency doesn’t change
Convolution: AC Frequency doesn’t change
Convolution: AC Frequency doesn’t change
Convolution: AC Frequency doesn’t change
Convolution: AC Frequency doesn’t change
Convolution: AC Frequency doesn’t change
Convolution: Amplitude and phase change
Convolution: Amplitude and phase change
Convolution: Amplitude and phase change
Convolution: Amplitude and phase change
54
Convolution can be performed by direct evaluation of the convolution integral (without sketching graphs) for fairly straightforward functions. This becomes difficult for piecewise-continuous functions, such as were used in many of our graphical examples.
Example 6: Evaluate y(t) = x(t)*h(t) for: x(t) = u(t), h(t) = u(t) by directly evaluating the convolution integral rather than through a graphical approach.
-
-
)d -)u(t u( y(t)
) )d -)h(t x( h(t)* x(t) y(t)
:Solution
n(definitio
u( ) = 1 only for > 0 so change lower limit to 0
u(t - ) = 1 only for < t so change upper limit to t
tu(t) t 0- t 1d1 y(t)t
0
t
0
so
A graphical approach would show that the functions overlap for 0 < t < or else note that x(t) and y(t) both are non-zero for t > 0.
sou(t)*u(t) = tu(t)
Convolution: direct integration
55
Table 2-1 from Signals & Systems, 2nd Edition, by Lathi
Important Convolution
Important Convolution
Table 9-1 from
Signals & Systems,
2nd Edition, by Lathi
Convolution: Shifting Function Selection
Convolution: Shifting Function Selection
• Line equation for f2(t- )=
• For
• Case(1): -0.5<=t<0
• Case(2): -0.5+t<=-0.5, t<0.5; 0<t<=0.5
• Case(3): -0.5+t<=0.5; 0.5<t<=1
2( 0.5)
2[ ( ) 0.5] 2[ 0.5]
2[ 0.5]
t
t
Select a piecewise constant amplitude function for reversal and shifting function. http://cnyack.homestead.com/files/aconv/conv2.htm
Hint: Shift and delay the simplest waveform
• Solution• For this problem I choose to flip x[n]• Some authors prefer to flip the shorter signal. My
personal preference is to flip the simple signal although I sometimes don’t follow that “rule”…only through lots of practice you can learn how to best choose which one to flip.
Convolution: Shifting Function Selection
Convolution: Shifting Function Selection
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: Big Picture
Book: Kamen and Heck
Convolution
Convolution: Matrix methodExpand the formula of convolution and find out the terms for different value of n.
Convolution: Tabular Method
Convolution: Implementation
Uses/Application of Convolution
EXAMPLE OF CONVOLUTION
* =
(*)-1 =
DECONVOLUTION: A solution
DECONVOLUTION
0
1
0
1
0
[ ] [ ]* [ ] [ ] [ ]
[ ] [ ] [ ] [ ] [0]
[ ] [ ] [ ]
[ ][0]
N
k
N
k
N
k
y n x n h n x k h n k
y n x k h n k x n h
y n x k h n k
x nh
1
Y HX
X H Y
Acknowledgement
• Various graphics used here has been taken from public resources instead of redrawing it. Thanks to those who have created it.
• Thanks to:
– Signals and Systems, Haykin & Van Veen
20 January 2011 81