Sie sind auf Seite 1von 6

Lab Experiment 6: Linear Time-

Invariant Systems and the


Convolution Integral
6.1 The Impulse Response and the 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 all we will see how we evaluate the


convolution integral if we have an expression for 𝑥𝑡 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 1 2 3 4 5

However, this takes a long time to compute because of


the way MATLAB implements it, as it evaluates the
integral at each point. An alternative is to evaluate the
integral, and store it manually:
>> y = @(t) (exp(-t).*(sign(t) + 1))/2;
>> plot(tr, y(tr))
You should notice that this evaluates much faster. One thing to take
care of is you must replace all operators by their
point-wise counterparts. Symbolic evaluation is very accurate.
6.3 Numerical Evaluation of the Convolution Integral
An alternative approach is to evaluate the integral
numerically. This may not be very accurate but is sometimes
needed when analytical solutions cannot be found. Here, we use
the property that if 𝑥𝑡 is nonzero only for 𝑡
𝑡 , is nonzero only for 𝑡15 ≤ 𝑡 ≤ 𝑡45, then 𝑥 ∗ ℎ 𝑡 is
nonzero for 𝑡12 + 𝑡15 ≤ 𝑡 ≤ 𝑡42 + 𝑡45. Let’s put this 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 1 1.5 2 2.5 3

Here, ts is the sampling time and the conv function


calculates the discrete-time convolution. We will learn more about this
in the next experiment.
6.4 Lab Tasks
6.4.1 Question 1
Calculate the symbolic convolution between the following
pairs of functions.
a. 𝑥1 𝑡 = 𝑢 𝑡 and ℎ1 𝑡 = cos 10𝑡 𝑒0>𝑢 𝑡 .
ANS—
ans =

-((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 c, what does your intuition tell you is correct?


Calculate the result manually and submit it as well.
Hint: Type help dirac if you are stuck.

You should submit a *.mat file that calculates the answers and
a handwritten sheet with the answer to part c.

Das könnte Ihnen auch gefallen