正文

Convolution

(2006-04-12 05:56:46) 下一個
convolution - 19.1 19. CONVOLUTION 19.1 INTRODUCTION • Can be used to find normal input reponses for linear systems • It is most useful for finding an output response for a system given an arbitrary input function • It is also the basis for other methods that come later for system analysis. 19.2 UNIT IMPULSE FUNCTIONS • A unit impulse function Topics: Objectives: convolution - 19.2 • For a unit step function, • If we look at an input signal (force here) we can break it into very small segments in time. As the time becomes small we can approximate it with a set of impulses. 1ε -- ε t Area ε 1ε -- =  =1 Unit impulse t δ(t) P(t) ε →0 = lim Area δ(t)dt –∞ ∞ =∫ =1 Dirac delta function P(t) This function is theoretically undefined, it goes to infinity for an instant, but it does have an area of 1. 0 u(t < 0)= 0 u(t ≥ 0)= 1 d dt ----u(t) = δ(t) convolution - 19.3 Figure 19.1 An impulse as a brief duration (instant) pulse 19.3 IMPULSE RESPONSE • If we put an impulse into a system the output will be an impulse response. Figure 19.2 Response of the system to a single pulse • If we add all of the impulse responses together we will get a total system response. This operation is called convolution. t F(t) Δt →0 An impulse t F(t) ∫g(t)F(t)dt t x(t) convolution - 19.4 Figure 19.3 A set of pulses for a system gives summed responses to give the output • Consider the unit impulse of a system with the given differential equation. Note: This method is only valid for trivial differential equations with only one homogeneous term. The preferred method is shown later. t F(t) t x(t) impulse responses sum of responses c(t) g(t – τ)r(τ)dτ 0 t = ∫ The convolution integral g(t – τ)F(τ)dτ 0 t ∫ convolution - 19.5 • Note that the derivation of the unit impulse function assumed zero initial conditions, so the process of convolution must also assume systems start at rest and undeflected. 19.4 CONVOLUTION • The following example shows the use of the convolution integral to find a numx · +0.5x =2F The following first order differential equation has an input ’F’. The input can be replaced with a unit impulse function. X · +0.5X =2δ(t) X · +0.5X =0 The homogeneous solution can be found. A+0.5 =0 Xh eAt guess, = Xh · AeAt = Xh Ce –0.5t = X · +0.5X =2δ(t) The particular solution is found. 0+0.5A =2(0) guess, Xp = A Xp · = 0 Xp=A=0 1 dt ----  X0+0.5(0) 2 1 dt ---- =   The initial condition caused by the impulse function found, assuming a zero initial condition. X0 = 2 X(t) Ce –0.5t = The initial condition caused by the impulse function found, assuming a zero initial condition. X(0) 2 Ce0 = = X(t) 2e –0.5t = convolution - 19.6 ber of responses. 19.5 NUMERICAL CONVOLUTION • The convolution integral can also be solved numerically. This is particularly useful for systems with arbitrary inputs. The unit impulse response to a step input can be calculated using the convolution integral. x(t) X(t – τ)F(τ)dτ 0 t ∫ 2e –0.5(t – τ) ( )(1)dτ 0 t ∫ 2e –0.5t e0.5τdτ 0 t ∫ 2e –0.5te0.5τ 0.5 ---------- 0 t = = = = The unit impulse response to a sinusoidal input can be calculated using the convolution integral. x(t) X(t – τ)F(τ)dτ 0 t ∫ 2e –0.5(t – τ) sin(τ)dτ 0 t ∫ 2e –0.5t e0.5τ sin(τ)dτ 0 t = = = ∫ x(t) 2e –0.5t e0.5t 0.5 --------- e0.5(0) 0.5  – --------------   4e –0.5t e0.5t ( – 1) 4 1 e –0.5t = = = (– ) x(t) = The unit impulse response to a unit ramp input can be calculated using the convolution integral. x(t) X(t – τ)F(τ)dτ 0 t ∫ 2e –0.5(t – τ)τ τ d 0 t ∫ 2e –0.5t e0.5ττdτ 0 t = = = ∫ x(t) = FINISH THE INTEGRAL FINISH THE INTEGRAL convolution - 19.7 • This can be applied to the previous example for a unit step input to find the system position at 10 seconds, with a 2 second time step. x(t) h X(t–(i+ 0.5)h)F((i+ 0.5)h) i = 0 n – 1 = Σ X(t) = the unit impulse response function where, F(t) = the input function n t h =--=number of steps h = step size (s) convolution - 19.8 • A Scilab program to perform the previous calculation numerically is shown below. x(t) h 2e –0.5(t–(i+ 0.5)h)F((i+ 0.5)h) i = 0 n – 1 = Σ n 10 2 =-----=5 x(10) 4 e – 4.5 + i i = 0 4 = Σ x(10) 2 2e –0.5(10 – 2(i + 0.5))(1) i = 0 5–1 = Σ x(10) 4 e –4.5 +0 e –4.5 +1 e –4.5 +2 e –4.5 +3 e –4.5 +4 =( + + + + ) x(10) 4 e –4.5 e –3.5 e –2.5 e –1.5 e –0.5 =( + + + + ) x(10) = 4(0.01111+0.03020+0.08208+0.22313+0.6065) x(10) 4 1 e –0.5(10) = ( – )=4(1 – 0.006738)= 3.973048 x(10) = 3.81208 This value can be compared to the exact value calculated below. The accuracy of the numerical value would increase substantially if the step size were decreased. convolution - 19.9 19.6 LAPLACE IMPULSE FUNCTIONS • The convolution integral can be difficult to deal with because of the time shift. But, the Laplace transform for the convolution integral turns it into a simple multiplication. // A numerical convolution example function foo=X(t) // The impulse response function foo = 2 * exp(-0.5*t); endfunction function foo=F(t) // The input function foo = 1; // a step function endfunction // define the variables function foo = convolution(t, h) // The integration function n = t / h; foo = 0; for i=0:n-1 foo = foo + h * X(t - (i+0.5)*h) * F((i+0.5)*h); end endfunction h = 1; // the time step for the integration t = 10; // the time point to calculate printf("The estimated value x(%fs) = %f \n", t, convolution(t, h)); x_calc = 4*(1-exp(-0.5*t)); printf("The actual value is x(%fs) = %f \n", t, x_calc); convolution - 19.10 Figure 19.4 The convolution integral in the Laplace s-domain 19.7 SUMMARY • 19.8 PRACTICE PROBLEMS 19.9 PRACTICE PROBLEM SOLUTIONS 19.10 ASSIGNMENT PROBLEMS 1. c(t) g(t – τ)r(τ)dτ 0 t = ∫ C(s) = G(s)R(s)
[ 打印 ]
閱讀 ()評論 (2)
評論
目前還沒有任何評論
登錄後才可評論.