Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

lecture4 (1)

The document discusses the convolution integral in the context of linear time-invariant (LTI) systems, detailing the mathematical formulation and providing examples of convolution evaluation. It includes MATLAB code for simulating the convolution process with specific input and impulse response functions, as well as step responses for RC circuits. The document also illustrates the process of finding system outputs through convolution with various inputs.

Uploaded by

chayanpol.ong
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

lecture4 (1)

The document discusses the convolution integral in the context of linear time-invariant (LTI) systems, detailing the mathematical formulation and providing examples of convolution evaluation. It includes MATLAB code for simulating the convolution process with specific input and impulse response functions, as well as step responses for RC circuits. The document also illustrates the process of finding system outputs through convolution with various inputs.

Uploaded by

chayanpol.ong
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

INC 233 Signals and systems

Lecture#4: Convolution integral


Assoc. Prof. Benjamas Panomruttanarug
benjamas.pan@kmutt.ac.th
The Convolution Integral
Input LTI system Output
x(t) H y(t)

¥
y(t) = x ( t ) * h ( t ) = ò-¥ x (t ) h ( t - t ) dt

where h(t) = H{d (t)} º Impulse response of LTI system H


= the output from the system given that the input is the delta function

BP INC212 2
Example 2.6 Reflect-and-shift Convolution
Evaluation
Given x ( t ) = u ( t - 1) - u ( t - 3) and h ( t ) = u ( t ) - u ( t - 2) , evaluate the convolution
integral y(t) = x(t) * h(t).

BP INC212 3
ì 0, t <1
ï t - 1, 1 £ t < 3
ï
y (t ) = í
ï5 - t , 3 £ t < 5
ïî 0, t ³5

(a) The input x(t) depicted above the reflected and time-shifted impulse
response. (b) The product signal wt(t) for 1 £ t < 3. (c) The product
BPsignal wt(t) for 3 £ t < 5. (d) The system
INC212 output y(t). 4
Matlab: conv x ( t ) = u ( t - 1) - u ( t - 3) h ( t ) = u ( t ) - u ( t - 2)

• clear;clc; close all; • t = 1:ts:5;


• y = ts*conv(h,x);
• ts = 0.01;
• for i = 1:401
• t = 1:ts:3;
• t(i) = 1+ts*(i-1);
• x = square(t); • if t(i) < 3
• figure; plot(t,x); • ya(i) = t(i)-1;
• m = length(x); • else
• t = 0:ts:2; • ya(i) = 5-t(i);
• end
• h = square(t);
• end
• hold on; plot(t,h,'r--'); • figure; plot(t,y,'b',t,ya,'r--');
• n = length(h);
Example 2.14 RC Circuit: Step Response
1 - RCt
The impulse response of the RC circuit h(t ) =
RC
e u (t )

Find the step response of the circuit.

BP INC212 6
Solving by convolution
t
t 1 - RC
s(t ) = ò e u (t )dt .
-¥ RC

ì 0, t<0
ï
s(t ) = í 1 t - t
ï
î RC -¥ ò e RC u (t )dt t ³ 0

ì 0, t<0
ï
s (t ) = í 1 t - t
ï
î RC 0 ò e RC dt t ³ 0

ìï 0, t<0
=í -
t
ïî1 - e , t ³ 0
RC

BP INC212 7
Matlab: conv x(t) = u(t) h(t ) =
1 - RCt
RC
e u (t )

• clear;clc; close all;


• ts = 0.01;
• t = 0:ts:50;
• x = square(t,100);
• figure;plot(t,x);

• h = exp(-t);
• y = ts*conv(x,h);
• ya = 1-exp(-t);
• figure; plot(t,y(1:5001),'b',t,ya,'r--');
Example 2.7 RC Circuit Output

Assume that the circuit’s time constant is RC = 1 sec.


• Find the impulse response of the circuit.
• Use convolution to determine the capacitor voltage, y(t), resulting
from an input voltage x(t) = u(t) - u(t - 2).

BP INC212 9
1. Fix h(t ) and flip x(t )
Growing Shrinking
x(t ) = u (t ) - u (t - 2)
0<t<2 t>2
x(-t ) = u (-t ) - u (-t - 2) y (t ) = x(t ) * h(t ) y (t ) = x(t ) * h(t )
¥ ¥

h(t ) = e -t u (-t ) = ò h(t ) x(-t + t ) dt =


t
ò h(t ) x(-t + t ) dt
= -¥
t= -¥
t t

ò
-t
= ò 1´ e -t
dt = 1´ e dt
t =0 t =t - 2

-t t -t t
= -e = -e
0 t -2

= -e -t + 1 [
= e -t e 2 - 1 ]
2. Fix x(t ) and flip h(t ) (Harder!!!)
Growing Shrinking
x(t ) = u (t ) - u (t - 2) 0<t<2 t>2
y (t ) = x(t ) * h(t ) y (t ) = x(t ) * h(t )
h(t ) = e -t u (-t ) ¥ ¥

= ò x(t ) h(-t + t ) dt = ò x(t ) h(-t + t ) dt


h(-t ) = et u (t ) t= -¥ t= -¥
t 2

= ò 1´ e t -t
dt = ò 1´ et -t dt
t =0 t =0

t -t t -t t 2
=e = e ´e
0 0

= 1 - e -t [
= e -t e 2 - 1 ]
ì 0, t <0
ïï
y ( t ) = í 1 - e- t , 0£t <2
ï 2
ïî ( e - 1) e -t
, t³2

(a) The input x(t) superimposed over the reflected and time-shifted impulse response
h(t – t), depicted as a function of t. (b) The product signal wt(t) for 0£ t < 2. (c) The
product signal wt(t) for t ³ 2. (d) The system output y(t).
BP INC212 12
Matlab: conv x(t) = u(t) - u(t - 2) h(t ) =
1 - RCt
RC
e u (t )

• clear;clc; close all; • for i = 1:5001


• ts = 0.01; • t(i) = (i-1)*ts;
• t = 0:ts:2; • if t(i) < 2
• x = square(t,100); • ya(i) = 1-exp(-t(i));
• t = 0:ts:50; • else
• h = exp(-t); • ya(i) = (exp(2)-1)*exp(-t(i));
• y = ts*conv(x,h); • end
• end
• figure; plot(t,y(1:5001),'b',t,ya,'r--');

You might also like