h t
play

h ( t ) y ( t ) Several derivations of the convolution integral - PowerPoint PPT Presentation

Overview of Convolution Integral Topics Impulse Response Impulse response defined x ( t ) h ( t ) y ( t ) Several derivations of the convolution integral Relationship to circuits and LTI systems Recall that if x ( t ) = ( t ) ,


  1. Overview of Convolution Integral Topics Impulse Response • Impulse response defined x ( t ) h ( t ) y ( t ) • Several derivations of the convolution integral • Relationship to circuits and LTI systems • 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 1 J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 2 RC Circuit Impulse Response Continuous-Time Time Invariance • Recall that time invariance means that if the input signal is R shifted in time, the output will be shifted in time also + • Consider three separate inputs x ( t ) C y ( t ) 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) t RC u ( t ) h ( t ) = RC · e − • Let � e − t t > 0 h ( t ) = e − t u ( t ) = • Many of the following examples use the impulse response of a 0 t < 0 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 J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 4

  2. Example 1: Continuous-Time Time Invariance Example 1: MATLAB Code t = -2:0.001:10; Input Output tc = [0 2 5]; 1 1 x 1 (t) = δ (t−0) y 1 (t) = h(t−0) for c1 = 1:length(tc), subplot(length(tc),2,c1*2-1); 0.5 0.5 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)); 0 0 disp(st) −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 ylabel(st); box off; 1 1 xlim([min(t) max(t)]); y 2 (t) = h(t−2) x 2 (t) = δ (t−2) ylim([0 1]); 0.5 0.5 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)); 0 0 ylabel(st); −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 box off; 1 1 xlim([min(t) max(t)]); end; 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 J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 6 Input Decomposition Example 2: Input Decomposition Let Input 1 x ( t ) = r ( t ) − 2 · r ( t − 1) + · r ( t − 2) x(t) 0.5 ⎧ 0 t 0 ≤ t ≤ 1 −0.5 0 0.5 1 1.5 2 2.5 ⎪ 1 ⎨ w = 0.50 = − ( t − 2) 1 ≤ t ≤ 2 0.5 ⎪ 0 otherwise ⎩ 0 −0.5 0 0.5 1 1.5 2 2.5 1 w = 0.25 • We can approximate any bounded signal x ( t ) as a series of pulses 0.5 with width w and height proportional to x ( t ) 0 −0.5 0 0.5 1 1.5 2 2.5 1 w = 0.10 ∞ 0.5 � � � t − ( k − 1 � � t − ( k + 1 �� x ( t ) ≈ x ( kw ) 2 ) w 2 ) w u − u 0 −0.5 0 0.5 1 1.5 2 2.5 1 k = −∞ 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 7 J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 8

  3. Example 2: MATLAB Code Replacing Rectangles with Impulses fs = 1000; • If an input consists of a pulse that is sufficiently short in duration, t0 = -0.5; t1 = 2.5; the continuous-time system will respond the same as it would to h = [0.50 0.25 0.10 0.04]; subplot(length(h)+1,1,1); an impulse with the same area t = t0:1/fs:t1; x = t.*(t>=0&t<1) + (-(t-2)).*(t>=1&t<2); • The following example shows the response of an RC circuit to hp = plot(t,x); set(hp,’MarkerFaceColor’,’b’); three different pulses set(hp,’MarkerSize’,3); title(’Input’); ylabel(’x(t)’); • Each pulse has unit area box off; xlim([t0 t1]); for c1 = 1:length(h), • The impulse response is also shown subplot(length(h)+1,1,c1+1); t = t0:h(c1):t1; x = t.*(t>=0&t<1) + (-(t-2)).*(t>=1&t<2); • Since the response is the same, we can replace our approximate hp = bar(t,x,1); set(hp,’FaceColor’,’w’); input signal that consists of rectangles with a train of impulses, if set(hp,’EdgeColor’,’r’); st = sprintf(’w = %4.2f’,h(c1)); h is sufficiently small ylabel(st); box off; xlim([t0 t1]); end; J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 9 J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 10 Example 3: RC Pulse Response Example 3: MATLAB Code sys = tf([0 1],[1 1]); % Transfer function of an RC circuit with RC = 1 Input Output t = -2:0.001:10; 1 ht = exp(-t).*(t>=0); % System impulse response 0.4 h(t) h = [2.0 1.0 0.1]; y(t) for c1 = 1:length(h), x(t) y(t) 0.5 subplot(length(h),2,(c1-1)*2+1); 0.2 x = (t>0 & t<h(c1))/h(c1); plot(t,x); title(’Input’); 0 0 ylabel(’x(t)’); −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 box off; Input Output 1 1 xlim([min(t) max(t)]); h(t) subplot(length(h),2,c1*2); y(t) y = lsim(sys,x,t); % Simulate the output of the system x(t) y(t) 0.5 0.5 plot(t,ht,’g’,t,y,’r’); legend(’h(t)’,’y(t)’); title(’Output’); ylabel(’y(t)’); 0 0 box off; −2 0 2 4 6 8 10 −2 0 2 4 6 8 10 xlim([min(t) max(t)]); Input Output 10 1 end; 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 J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 12

  4. Impulse Input Decomposition Example 4: Approximations to x ( t ) x ( t ) can approximated as a sum of pulses. Approximation with Rectangles Approximation with Impulses 1 0.5 t − ( k − 1 t − ( k + 1 ∞ � � � � �� w = 0.50 u 2 ) w − u 2 ) w � x ( t ) = x r ( t ) = w · x ( kw ) 0.5 w k = −∞ 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 Each pulse can be approximated as a unit impulse 0.2 w = 0.25 0.5 t − ( k − 1 t − ( k + 1 � � � � 0.1 δ ( t − kw ) = d u ( t − kw ) u 2 ) w − u 2 ) w = lim 0 0 d t w w → 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 so for small w , x ( t ) can also be approximated as a sum of impulses, w = 0.10 0.5 0.05 ∞ � x ( t ) ≈ x δ ( t ) = w · x ( kw ) · δ ( t − kw ) 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 k = −∞ w = 0.04 Note that 0.5 0.02 � ∞ � ∞ � � t − ( k − 1 2 ) w � � t − ( k + 1 2 ) w � � u − u δ ( t − kw ) d t = d t = 1 0 0 w −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 13 J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 14 Example 4: MATLAB Code Applying Linearity If fs = 1000; t0 = -0.5; ∞ t1 = 2.5; � t = t0:1/fs:t1; x ( t ) ≈ x δ ( t ) = w x ( kw ) δ ( t − kw ) , x = t.*(t>=0&t<1) + (-(t-2)).*(t>=1&t<2); h = [0.5,0.25,0.10,0.04]; k = −∞ for c1 = 1:length(h), subplot(length(h),2,c1*2-1); then by linearity and time invariance, 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’); y ( t ) ≈ y δ ( t ) = w x ( kw ) h ( t − kw ) hold on; plot(t,x,’g’); k = −∞ hold off; st = sprintf(’w = %4.2f’,h(c1)); ylabel(st); In the limit as w → 0 , if x ( t ) and y ( t ) are integrable, we have box off; xlim([t0 t1]); � ∞ subplot(length(h),2,c1*2); for c2 = 1:length(th), x ( t ) = w → 0 x δ ( t ) = lim x ( τ ) δ ( t − τ ) d τ 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); y ( t ) = w → 0 y δ ( t ) = lim x ( τ ) h ( t − τ ) d τ end; hold off; −∞ box off; ylim([0 h(c1)]); xlim([t0 t1]); end; This is the continuous-time convolution integral J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 15 J. McNames Portland State University ECE 222 Convolution Integral Ver. 1.68 16

Recommend


More recommend