Overview of Convolution Integral Topics • Impulse response defined • Several derivations of the convolution integral • Relationship to circuits and LTI systems J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 1
Impulse Response h ( t ) x ( t ) y ( t ) • Recall that if x ( t ) = δ ( t ) , the output of the system is called the impulse response • The impulse response is always denoted h ( t ) • For a given input x ( t ) , it is possible to use h ( t ) to solve for y ( t ) • One method is the convolution integral • This is a important concept J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 2
RC Circuit Impulse Response R + x ( t ) C y ( t ) - t RC u ( t ) h ( t ) = RC · e − • Many of the following examples use the impulse response of a simple RC voltage divider • We will learn how to solve for this impulse response using the Laplace transform soon • In many of the following examples RC = 1 s J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 3
Continuous-Time Time Invariance • Recall that time invariance means that if the input signal is shifted in time, the output will be shifted in time also • Consider three separate inputs x 1 ( t ) = δ ( t ) x 1 ( t ) → y 1 ( t ) = h ( t ) x 2 ( t ) = δ ( t − 2) x 2 ( t ) → y 2 ( t ) = h ( t − 2) x 3 ( t ) = δ ( t − 5) x 3 ( t ) → y 3 ( t ) = h ( t − 5) • Let � e − t t > 0 h ( t ) = e − t u ( t ) = 0 t < 0 J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 4
Example 1: Continuous-Time Time Invariance Input Output 1 1 x 1 (t) = δ (t−0) y 1 (t) = h(t−0) 0.5 0.5 0 0 −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 1 1 x 2 (t) = δ (t−2) y 2 (t) = h(t−2) 0.5 0.5 0 0 −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 1 1 x 3 (t) = δ (t−5) y 3 (t) = h(t−5) 0.5 0.5 0 0 −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 Time (s) Time (s) J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 5
Example 1: MATLAB Code t = -2:0.001:10; tc = [0 2 5]; for c1 = 1:length(tc), subplot(length(tc),2,c1*2-1); h = plot(tc(c1)*[1 1],[0 1],’b’,tc(c1),0.95,’b^’); set(h,’MarkerFaceColor’,’b’); set(h,’MarkerSize’,3); st = sprintf(’x_%d(t) = \\delta(t-%d)’,c1,tc(c1)); disp(st) ylabel(st); box off; xlim([min(t) max(t)]); ylim([0 1]); subplot(length(tc),2,c1*2); y1 = exp(-(t-tc(c1))).*(t>=tc(c1)); % Unit impulse response h[n] h = plot(t,y1,’r’); st = sprintf(’y_%d(t) = h(t-%d)’,c1,tc(c1)); ylabel(st); box off; xlim([min(t) max(t)]); end; J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 6
Input Decomposition Let x ( t ) = r ( t ) − 2 · r ( t − 1) + · r ( t − 2) ⎧ 0 ≤ t ≤ 1 t ⎪ ⎨ = − ( t − 2) 1 ≤ t ≤ 2 ⎪ 0 otherwise ⎩ • We can approximate any bounded signal x ( t ) as a series of pulses with width w and height proportional to x ( t ) ∞ � t − ( k − 1 t − ( k + 1 � � � � �� x ( t ) ≈ x ( kw ) 2 ) w 2 ) w u − u k = −∞ J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 7
Example 2: Input Decomposition Input 1 x(t) 0.5 0 −0.5 0 0.5 1 1.5 2 2.5 1 w = 0.50 0.5 0 −0.5 0 0.5 1 1.5 2 2.5 1 w = 0.25 0.5 0 −0.5 0 0.5 1 1.5 2 2.5 1 w = 0.10 0.5 0 −0.5 0 0.5 1 1.5 2 2.5 1 w = 0.04 0.5 0 −0.5 0 0.5 1 1.5 2 2.5 Time (s) J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 8
Example 2: MATLAB Code fs = 1000; t0 = -0.5; t1 = 2.5; h = [0.50 0.25 0.10 0.04]; subplot(length(h)+1,1,1); t = t0:1/fs:t1; x = t.*(t>=0&t<1) + (-(t-2)).*(t>=1&t<2); hp = plot(t,x); set(hp,’MarkerFaceColor’,’b’); set(hp,’MarkerSize’,3); title(’Input’); ylabel(’x(t)’); box off; xlim([t0 t1]); for c1 = 1:length(h), subplot(length(h)+1,1,c1+1); t = t0:h(c1):t1; x = t.*(t>=0&t<1) + (-(t-2)).*(t>=1&t<2); hp = bar(t,x,1); set(hp,’FaceColor’,’w’); set(hp,’EdgeColor’,’r’); st = sprintf(’w = %4.2f’,h(c1)); ylabel(st); box off; xlim([t0 t1]); end; J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 9
Replacing Rectangles with Impulses • If an input consists of a pulse that is sufficiently short in duration, the continuous-time system will respond the same as it would to an impulse with the same area • The following example shows the response of an RC circuit to three different pulses • Each pulse has unit area • The impulse response is also shown • Since the response is the same, we can replace our approximate input signal that consists of rectangles with a train of impulses, if h is sufficiently small J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 10
Example 3: RC Pulse Response Input Output 1 0.4 h(t) y(t) x(t) y(t) 0.5 0.2 0 0 −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 Input Output 1 1 h(t) y(t) x(t) y(t) 0.5 0.5 0 0 −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 Input Output 10 1 h(t) y(t) x(t) y(t) 5 0.5 0 0 −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 Time (s) Time (s) J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 11
Example 3: MATLAB Code sys = tf([0 1],[1 1]); % Transfer function of an RC circuit with RC = 1 t = -2:0.001:10; ht = exp(-t).*(t>=0); % System impulse response h = [2.0 1.0 0.1]; for c1 = 1:length(h), subplot(length(h),2,(c1-1)*2+1); x = (t>0 & t<h(c1))/h(c1); plot(t,x); title(’Input’); ylabel(’x(t)’); box off; xlim([min(t) max(t)]); subplot(length(h),2,c1*2); y = lsim(sys,x,t); % Simulate the output of the system plot(t,ht,’g’,t,y,’r’); legend(’h(t)’,’y(t)’); title(’Output’); ylabel(’y(t)’); box off; xlim([min(t) max(t)]); end; J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 12
Impulse Input Decomposition x ( t ) can approximated as a sum of pulses. t − ( k − 1 t − ( k + 1 � � � � �� ∞ 2 ) w 2 ) w u − u � x ( t ) = x r ( t ) = w · x ( kw ) w k = −∞ Each pulse can be approximated as a unit impulse t − ( k − 1 t − ( k + 1 � � � � 2 ) w 2 ) w δ ( t − kw ) = d u ( t − kw ) u − u = lim d t w w → 0 so for small w , x ( t ) can also be approximated as a sum of impulses, ∞ � x ( t ) ≈ x δ ( t ) = w · x ( kw ) · δ ( t − kw ) k = −∞ Note that � ∞ � ∞ � � t − ( k − 1 � � t − ( k + 1 � � 2 ) w 2 ) w u − u δ ( t − kw ) d t = d t = 1 w −∞ −∞ J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 13
Example 4: Approximations to x ( t ) Approximation with Rectangles Approximation with Impulses 1 0.5 w = 0.50 0.5 0 0 −0.5 0 0.5 1 1.5 2 2.5 −0.5 0 0.5 1 1.5 2 2.5 1 0.2 w = 0.25 0.5 0.1 0 0 −0.5 0 0.5 1 1.5 2 2.5 −0.5 0 0.5 1 1.5 2 2.5 1 0.1 w = 0.10 0.5 0.05 0 0 −0.5 0 0.5 1 1.5 2 2.5 −0.5 0 0.5 1 1.5 2 2.5 1 0.04 w = 0.04 0.5 0.02 0 0 −0.5 0 0.5 1 1.5 2 2.5 −0.5 0 0.5 1 1.5 2 2.5 Time (s) Time (s) J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 14
Example 4: MATLAB Code fs = 1000; t0 = -0.5; t1 = 2.5; t = t0:1/fs:t1; x = t.*(t>=0&t<1) + (-(t-2)).*(t>=1&t<2); h = [0.5,0.25,0.10,0.04]; for c1 = 1:length(h), subplot(length(h),2,c1*2-1); th = t0:h(c1):t1; xr = th.*(th>=0&th<1) + (-(th-2)).*(th>=1&th<2); hb = bar(th,xr,1); set(hb,’FaceColor’,’w’); set(hb,’EdgeColor’,’b’); hold on; plot(t,x,’g’); hold off; st = sprintf(’w = %4.2f’,h(c1)); ylabel(st); box off; xlim([t0 t1]); subplot(length(h),2,c1*2); for c2 = 1:length(th), hp= plot(th(c2)*[1 1],[0 xr(c2)]*h(c1),’r’,th(c2),0.95*xr(c2)*h(c1),’r^’); hold on; set(hp(2),’MarkerFaceColor’,’r’); set(hp(2),’MarkerSize’,2); set(hp(2),’LineWidth’,0.001); end; hold off; box off; ylim([0 h(c1)]); xlim([t0 t1]); end; J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 15
Applying Linearity If ∞ � x ( t ) ≈ x δ ( t ) = w x ( kw ) δ ( t − kw ) , k = −∞ then by linearity and time invariance, ∞ � y ( t ) ≈ y δ ( t ) = w x ( kw ) h ( t − kw ) k = −∞ In the limit as w → 0 , if x ( t ) and y ( t ) are integrable, we have � ∞ x ( t ) = w → 0 x δ ( t ) = lim x ( τ ) δ ( t − τ ) d τ −∞ � ∞ y ( t ) = w → 0 y δ ( t ) = lim x ( τ ) h ( t − τ ) d τ −∞ This is the continuous-time convolution integral J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 16
Example 5: Impulse Approximation and Output Input Output 0.5 0.5 0 0 −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 0.5 0.5 0 0 −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 0.5 0.5 0 0 −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 0.5 0.5 True Approximate 0 0 −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 Time (s) Time (s) J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 17
Recommend
More recommend