Lab Experiment Invariant Systems Convolution Integral 6.1 The
Impulse
Response
6: and and
the
Linear the
Time-
Convolution Integral
The
impulse response of a continuous-time system π, denoted by β π‘ , is defined as βπ‘βππΏπ‘. In words, if a continuous-time system is given a Dirac delta function as an input, the resulting output is known as the impulse response. It turns out that for LSI (Linear Shift-Invariant) systems, knowing the impulse response β π‘ = π₯ β β and the input signal π₯ π‘ is enough to find the output π¦ π‘ . / In this case, the following equation holds: π¦π‘ π‘ β π₯πβπ‘βπ
ππ
0/
6.2 Symbolic Evaluation
of
the
Convolution Integral
with MATLAB
First of convolution βπ‘.
will if
see we
how have
the for
all we integral
we an
evaluate expression
π₯π‘
and
>> syms t tau >> x = @(t) dirac(t); >> h = @(t) exp(-t) .* heaviside(t); >> y = @(t) int(x(tau) .* h(t - tau), tau, -inf, inf); >> y(t) ans = (exp(-t)*(sign(t) + 1))/2 >> tr = -1:0.01:5;
1
>> plot(tr, y(tr)) 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1
0-1
0
However, the way integral integral,
1
2
this takes MATLAB at each and store
3
4
5
a long time to implements it, as point. An alternative it manually:
compute because it evaluates the is to evaluate
>> y = @(t) (exp(-t).*(sign(t) + 1))/2; >> plot(tr, y(tr)) You should notice that this evaluates much faster. One care of is you must replace all operators point-wise counterparts. Symbolic evaluation is very
6.3 Numerical
Evaluation
of
the
An alternative approach is to numerically. This may not be very needed when analytical solutions the property that if π₯π‘ is π‘ , is nonzero only nonzero for π‘12 + π‘15 β€ π‘ β€ π‘42 + π‘45. >> >> >> >> >> >> >> >> >> >> >> >> >> >>
thing to by their accurate.
of the
take
Convolution Integral evaluate the accurate but cannot be found. nonzero only for π‘15 β€ π‘ β€ π‘45, Letβs put this
integral is sometimes Here, we use for π‘ then π₯ β β π‘ is into practice.
x = @(t) heaviside(t) - heaviside(t - 1); h = @(t) heaviside(t) - heaviside(t - 2); tx = 0:0.01:1; t1x = 0; t2x = 1; t1h = 0; t2h = 2; ts = 0.01; tx = t1x:ts:t2x; th = t1h:ts:t2h; t1y = t1x + t1h; t2y = t2x + t2h; ty = t1y:ts:t2y; xr = x(tx); 2
>> hr = h(th); >> yr = ts * conv(xr, hr); >> plot(ty, yr) 1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
00
0.5
Here, ts calculates in the
is the next
6.4 Lab
Tasks
1
1.5
2
2.5
3
the sampling time and discrete-time convolution. We experiment.
6.4.1 Question 1 Calculate the symbolic pairs of functions. a. π₯1 π‘ = π’ π‘ and β1 π‘ ANSβ ans =
convolution
the will
between
conv function learn more about this
the
following
= cos 10π‘ π0>π’ π‘ .
-((exp(-t)*(exp(-t*10i)*(1/2 - 5i) + exp(t*10i)*(1/2 + 5i)))/101 1/101)*(sign(t)/2 + 1/2)
3
>>
b. π₯4 π‘
= sin 5π‘
and
β4 π‘
= π01B>π’ π‘ .
Ans ans =
(2*sin(5*t))/25 - cos(5*t)/25
4
>>
c. π₯C π‘
= π‘π’ π‘ and
βC π‘
= D>D πΏ π‘ .
ans =
int(tau*kroneckerDelta(t - tau, 0), tau, 0, Inf)
5
>>
For part Calculate Hint: Type You a
c, what does your the result manually help dirac if you
should submit a *.mat file handwritten sheet with the
intuition tell and submit it are stuck.
you as
is well.
correct?
that calculates answer to part
the c.
answers
and
6